Showing posts with label failing. Show all posts
Showing posts with label failing. Show all posts

Friday, March 23, 2012

scheduled TRN backups failing (sql2000)

I have created a backup that does once weekly BAK and every night it does TRN backup. This is in the same maintaince plan, the jobs appear as seprate jobs as they should. I have noticed my TRN is always failing, after looking into the event logs i see this.

please note this is lastest time to early:

4:22pm
this is the warning that the event log gives:

SQL Server Scheduled Job 'Transaction Log Backup Job for DB Maintenance Plan 'xxxxxxxx TRN'' (0xB87B2FA07E4FB74CA01A1D38134C9C4F) - Status: Failed - Invoked on: 2007-03-09 16:19:40 - Message: The job failed. The Job was invoked by User domain\Administrator. The last step to run was step 1 (Step 1).

the next is
4:22pm
18265 :
Log backed up: Database: Staging, creation date(time): 2007/01/30(09:35:34), first LSN: 24624:14008:1, last LSN: 24624:14021:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'f:\program files\microsoft sql server\MSSQL\BACKUP\Staging\Staging_tlog_200703091622.TRN'}).

last is 4:21pm
18264 :
Database backed up: Database: Staging, creation date(time): 2007/01/30(09:35:34), pages dumped: 93982, first LSN: 24624:14008:2, last LSN: 24624:14018:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'f:\program files\microsoft sql server\MSSQL\BACKUP\Staging\Staging_db_200703091618.BAK'}).

So for some very strange reason its running a full backup then a Transactional, for this reason i would say its failing but why is it even doing this backup? the job is only for TRN?

A manual TRN backup works like a treat

Thanks

BRAD

CHECK what is the recovery model of your database... make sure it is not Simple... If it is simple it is normal to have this behaviour

Madhu

|||

ran sp_helpdb all of my databases are at full recovery apart from the tmpdb and another system DB but these are not in the backup plan only user databases are.

any other ideas?

|||

never mind you were right there was the northwind database still active (by default set to simple) this is classed as a user DB.

Thanks

Brad

Wednesday, March 21, 2012

Scheduled jobs suddenly failing

I have MS SQL Server 2000 sp? on Windows 2000.
I have various jobs set up to run with the SQL Server Agent. I have a
job that imports data from an Access database located on the same
server. Then later, a job runs that updates some rows.

The import job fails with an error saying the source data is opened
exclusively by someone else, or I don't have permission. I have
verifed through various tests that no one else is using the source
Access database. I have even tried this import from excel files and
csv text files.

The job which updates a few rows will run with no problem.

This is a newly created job (actually a DTS package that was saved and
scheduled to run as a job)

Recently though, the server was renamed, and I feel this is the cause.
I have checked the msdb.sysjobs table and some of the jobs with the
new server name work, and some of them don't. The DTS jobs don't seem
to work.

I have maintenace jobs that used to run successfully, but now fail.

I have also tried to run the job with various users as well as SA.

Any ideas would greatly be appreciated.<OakRogbak_erPine@.yahoo.com> wrote in message
news:13fdc9b4.0408100537.1b66cbec@.posting.google.c om...
> I have MS SQL Server 2000 sp? on Windows 2000.
> I have various jobs set up to run with the SQL Server Agent. I have a
> job that imports data from an Access database located on the same
> server. Then later, a job runs that updates some rows.
> The import job fails with an error saying the source data is opened
> exclusively by someone else, or I don't have permission. I have
> verifed through various tests that no one else is using the source
> Access database. I have even tried this import from excel files and
> csv text files.
> The job which updates a few rows will run with no problem.
> This is a newly created job (actually a DTS package that was saved and
> scheduled to run as a job)
> Recently though, the server was renamed, and I feel this is the cause.
> I have checked the msdb.sysjobs table and some of the jobs with the
> new server name work, and some of them don't. The DTS jobs don't seem
> to work.
> I have maintenace jobs that used to run successfully, but now fail.
> I have also tried to run the job with various users as well as SA.
> Any ideas would greatly be appreciated.

You might want to investigate if the server name was changed correctly - did
you follow the steps in Books Online exactly?

http://support.microsoft.com/defaul...4&Product=sql2k

You might also want to check if sp_helpserver and select @.@.servername return
the correct output. If you have data sources in DTS packages which reference
the old name, then they will need to be updated in each package also (unless
you set the name dynamically at runtime of course).

If this doesn't help, please post the precise error messages, as well as the
version of MSSQL/Excel.

Simon

Tuesday, March 20, 2012

Scheduled Jobs failing, unknown owner?

The job failed. The owner () of job SetShopperSiteReleaseTimes does not have server access
The majority of our Jobs, run by the SQL agent, return teh above messages when running our scheduled DTS packages. We recently went through a domain migration from one domain name to another
I have changed everything that I can identify as being a problem. The server works normally for normal user, and it is only the scheduled jobs (when run by the agent) that have a problem
The Agent is running under a proper domain trust account, as it needs it to enable replication between a few other servers. Owners of the DTS packages were set to the wrong name, this has since been changed using the sp_reassign_dtsowner (or similar, I forgot exact name) stored procedure
I'm loath to believe it is a domain authentication issue with the new domain, because normal Windows authentication between SQL and other applications works just fine. It is only the agent which seems to be having a problem. The agent also runs replication successfully
I suspect something is not quite right with the DTS packages themselves, but I don't know more than this
Anybody have any ideas? Thanks.Who owns the jobs ? If you set the job owner to sa does the job run ok ?
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Jerry Haltom" <jhaltom@.feedbackplusinc.com> wrote in message
news:C2372C43-2874-4B6E-9865-5AFB7016962C@.microsoft.com...
The job failed. The owner () of job SetShopperSiteReleaseTimes does not
have server access.
The majority of our Jobs, run by the SQL agent, return teh above messages
when running our scheduled DTS packages. We recently went through a domain
migration from one domain name to another.
I have changed everything that I can identify as being a problem. The server
works normally for normal user, and it is only the scheduled jobs (when run
by the agent) that have a problem.
The Agent is running under a proper domain trust account, as it needs it to
enable replication between a few other servers. Owners of the DTS packages
were set to the wrong name, this has since been changed using the
sp_reassign_dtsowner (or similar, I forgot exact name) stored procedure.
I'm loath to believe it is a domain authentication issue with the new
domain, because normal Windows authentication between SQL and other
applications works just fine. It is only the agent which seems to be having
a problem. The agent also runs replication successfully.
I suspect something is not quite right with the DTS packages themselves, but
I don't know more than this.
Anybody have any ideas? Thanks.|||A job has an owner... You may open a job and see the owner on the first
tab... When a job is scheduled to run from SQL Agent, the first thing that
happens is that the owner is validated ( the owner must exist.)... If the
owner exists, the job runs, if the owner does NOT exist, the error you are
seeing is returned...
After the owner has been successfully validated, the job actually runs under
the permissions that SQL Agent runs with, ( Not the owners permissions.)
Try changing the owner of the job to someone you know exists ( like YOUR
login) and see if it fixes the problem..
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Jerry Haltom" <jhaltom@.feedbackplusinc.com> wrote in message
news:C2372C43-2874-4B6E-9865-5AFB7016962C@.microsoft.com...
> The job failed. The owner () of job SetShopperSiteReleaseTimes does not
have server access.
> The majority of our Jobs, run by the SQL agent, return teh above messages
when running our scheduled DTS packages. We recently went through a domain
migration from one domain name to another.
> I have changed everything that I can identify as being a problem. The
server works normally for normal user, and it is only the scheduled jobs
(when run by the agent) that have a problem.
> The Agent is running under a proper domain trust account, as it needs it
to enable replication between a few other servers. Owners of the DTS
packages were set to the wrong name, this has since been changed using the
sp_reassign_dtsowner (or similar, I forgot exact name) stored procedure.
> I'm loath to believe it is a domain authentication issue with the new
domain, because normal Windows authentication between SQL and other
applications works just fine. It is only the agent which seems to be having
a problem. The agent also runs replication successfully.
> I suspect something is not quite right with the DTS packages themselves,
but I don't know more than this.
> Anybody have any ideas? Thanks.

Scheduled Jobs Failing

I have some Local Packages to import data from Access into SQL which run
fine on but wont run as a scheduled jobs with any steps. TSQL steps run fine
but
DTSRUN /S<server> /E /N<localpackagename>
fails even though it runs on its own.
I noticed that on SQL Server Agent Properties and the Job System tab there
is a checkbox at the bottom relating to CmdExec. On setting this on my
laptop then unsetting it the job does not run on that either now.
Can someone get me out of this hole
Thanks
Andy Willis
Have a look at this:
http://www.support.microsoft.com/?id=269074 How to Run a DTS Package as a
Scheduled Job
Andrew J. Kelly SQL MVP
"Andy Willis" <andrewrwillis@.blueyonder.co.uk> wrote in message
news:e8qeFIT4EHA.208@.TK2MSFTNGP12.phx.gbl...
>I have some Local Packages to import data from Access into SQL which run
> fine on but wont run as a scheduled jobs with any steps. TSQL steps run
> fine
> but
> DTSRUN /S<server> /E /N<localpackagename>
> fails even though it runs on its own.
> I noticed that on SQL Server Agent Properties and the Job System tab there
> is a checkbox at the bottom relating to CmdExec. On setting this on my
> laptop then unsetting it the job does not run on that either now.
> Can someone get me out of this hole
> Thanks
> Andy Willis
>

scheduled jobs are failing

I had about 30 schedule jobs that either import data or run sql queries.
They have worked wonderfully for months. All of a sudden they are failing.
I get the error message 203 ENVVAR_NOT_FOUND which translates to The system
could not find the environment option that was entered.
I don't understand what this means, nor how to fix it. I've spent almost 2
days searching for a solution. Even more complexing is why it all
changed...I haven't done anything different that I can think of.
Can someone please assist and point me in the right direction?
thanks in advance!!!Is it a specific type of step that is failing, or is your package not
starting at all? Have you enabled a package error log, to see if the log
file holds any further information?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"tag" <tag@.discussions.microsoft.com> wrote in message
news:20709349-62D5-436C-A256-F15AEA8A4D1E@.microsoft.com...
I had about 30 schedule jobs that either import data or run sql queries.
They have worked wonderfully for months. All of a sudden they are failing.
I get the error message 203 ENVVAR_NOT_FOUND which translates to The system
could not find the environment option that was entered.
I don't understand what this means, nor how to fix it. I've spent almost 2
days searching for a solution. Even more complexing is why it all
changed...I haven't done anything different that I can think of.
Can someone please assist and point me in the right direction?
thanks in advance!!!|||is sql agent running
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"tag" wrote:

> I had about 30 schedule jobs that either import data or run sql queries.
> They have worked wonderfully for months. All of a sudden they are failing
.
> I get the error message 203 ENVVAR_NOT_FOUND which translates to The syste
m
> could not find the environment option that was entered.
> I don't understand what this means, nor how to fix it. I've spent almost
2
> days searching for a solution. Even more complexing is why it all
> changed...I haven't done anything different that I can think of.
> Can someone please assist and point me in the right direction?
> thanks in advance!!!|||Yes, SQL server agent is running
"Jose G. de Jesus Jr MCP, MCDBA" wrote:
> is sql agent running
>
>
> --
>
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "tag" wrote:
>|||are the jobs running when executed manually?
check for any virus activity
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"tag" wrote:
> Yes, SQL server agent is running
> "Jose G. de Jesus Jr MCP, MCDBA" wrote:
>|||No, it appears that they are trying to kick off.
When I review the jobs I see that the last run status is "Failed".
When I review the job history I get
"The job failed. The Job was invoked by User sa. The last step to run was
step 1 (Census1 Load Text). Executed as user: CLFDATA\SYSTEM. The process
could not be created for step 1 of job 0xC4F7C84FC07C4A439571C7C4BE326910
(reason: The system could not find the environment option that was entered)
.
The step failed."
I noticed that the package error logs were not enabled. I'm correcting that
oversight now.
"Narayana Vyas Kondreddi" wrote:

> Is it a specific type of step that is failing, or is your package not
> starting at all? Have you enabled a package error log, to see if the log
> file holds any further information?
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "tag" <tag@.discussions.microsoft.com> wrote in message
> news:20709349-62D5-436C-A256-F15AEA8A4D1E@.microsoft.com...
> I had about 30 schedule jobs that either import data or run sql queries.
> They have worked wonderfully for months. All of a sudden they are failing
.
> I get the error message 203 ENVVAR_NOT_FOUND which translates to The syste
m
> could not find the environment option that was entered.
> I don't understand what this means, nor how to fix it. I've spent almost
2
> days searching for a solution. Even more complexing is why it all
> changed...I haven't done anything different that I can think of.
> Can someone please assist and point me in the right direction?
> thanks in advance!!!
>
>|||No, when I right click on the job and click on
"start job", they fail. I'm running the virus scan now.
"Jose G. de Jesus Jr MCP, MCDBA" wrote:
> are the jobs running when executed manually?
> check for any virus activity
>
> --
>
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "tag" wrote:
>|||try creating a new simple job then
try to run it manually
if it fails to run then
the box is in trouble
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"tag" wrote:
> No, when I right click on the job and click on
> "start job", they fail. I'm running the virus scan now.
> "Jose G. de Jesus Jr MCP, MCDBA" wrote:
>|||I've done that multiple times...and it fails.
why is the box in trouble?
"Jose G. de Jesus Jr MCP, MCDBA" wrote:
> try creating a new simple job then
> try to run it manually
> if it fails to run then
> the box is in trouble
> --
>
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "tag" wrote:
>|||I found my solution. I was missing a ; in my path. Full details are locate
d
at Microsofts site: http://support.microsoft.com/?kbid=322746
Thanks to all who responded!

Scheduled job fails because locks were not released on the table

Hi,
I have a scheduled job that has started failing frequently because of a user
who only works on the weekends. Even though the user stops working on the
application, somehow the locks stay on the table making the scheduled job to
fail. Is there a way to release the locks on a particular table through TSQL
before the job runs so that the job gets completed successfully?Not some general way. You could use procedures such as sp_who, sp_lock, sp_who2 etc to find the SPID
you need to get rid of and then use the KILL command to force a rollback and termination of the
connection in question. Another option is to set the database to single user and specify a ROLLBACK
option (see ALTER DATABASE).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"ronnie" <ronnie@.discussions.microsoft.com> wrote in message
news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> Hi,
> I have a scheduled job that has started failing frequently because of a user
> who only works on the weekends. Even though the user stops working on the
> application, somehow the locks stay on the table making the scheduled job to
> fail. Is there a way to release the locks on a particular table through TSQL
> before the job runs so that the job gets completed successfully?|||Well, what exactly is the user doing to lock the table? What do they do
when they "stop working" on it?
"ronnie" <ronnie@.discussions.microsoft.com> wrote in message
news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> Hi,
> I have a scheduled job that has started failing frequently because of a
> user
> who only works on the weekends. Even though the user stops working on the
> application, somehow the locks stay on the table making the scheduled job
> to
> fail. Is there a way to release the locks on a particular table through
> TSQL
> before the job runs so that the job gets completed successfully?|||The user works remotely and connects to the application through a VPN. I am
trying to find out from the user how he logs off after he stops working.
Maybe he doesn't even logs off and leave the application open on the machine
and just closes the VPN connection. I will post the answer as soon as I hear
from the user.
As this job runs during the night, I can get the spid from the username and
then put in a TSQL command to kill the spid/s created by this user so that
the locks get released from the table.
"Aaron Bertrand [SQL Server MVP]" wrote:
> Well, what exactly is the user doing to lock the table? What do they do
> when they "stop working" on it?
>
> "ronnie" <ronnie@.discussions.microsoft.com> wrote in message
> news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> > Hi,
> >
> > I have a scheduled job that has started failing frequently because of a
> > user
> > who only works on the weekends. Even though the user stops working on the
> > application, somehow the locks stay on the table making the scheduled job
> > to
> > fail. Is there a way to release the locks on a particular table through
> > TSQL
> > before the job runs so that the job gets completed successfully?
>|||I found out from the user that while running an update on the table, his
machine froze and he wasn't able to do anything afterwards. Since the machine
is at a remote location and he is connecting through VPN he wasn't even able
to reboot the machine. This might have caused the locks to remain on this
table.
What should be done to handle situations like this to prevent future
scheduled job failures?
"ronnie" wrote:
> The user works remotely and connects to the application through a VPN. I am
> trying to find out from the user how he logs off after he stops working.
> Maybe he doesn't even logs off and leave the application open on the machine
> and just closes the VPN connection. I will post the answer as soon as I hear
> from the user.
> As this job runs during the night, I can get the spid from the username and
> then put in a TSQL command to kill the spid/s created by this user so that
> the locks get released from the table.
> "Aaron Bertrand [SQL Server MVP]" wrote:
> > Well, what exactly is the user doing to lock the table? What do they do
> > when they "stop working" on it?
> >
> >
> >
> > "ronnie" <ronnie@.discussions.microsoft.com> wrote in message
> > news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> > > Hi,
> > >
> > > I have a scheduled job that has started failing frequently because of a
> > > user
> > > who only works on the weekends. Even though the user stops working on the
> > > application, somehow the locks stay on the table making the scheduled job
> > > to
> > > fail. Is there a way to release the locks on a particular table through
> > > TSQL
> > > before the job runs so that the job gets completed successfully?
> >|||> What should be done to handle situations like this to prevent future
> scheduled job failures?
Well, what I was trying to get at what was, what exactly is the user doing
to hold locks on the table in the first place? Using what app(s)? Is he
opening data in a grid? Ideally he should be submitting short transactions
(using stored procedures or insert/update statements) and should not be as
exposed to the risk of connection interruptions. If this has happened more
than once then my guess is his data manipulation techniques are not ideal.|||The user was working on an Microsoft Access application that uses SQL Server
database as the backend. This user did an update / insert into a table using
an Access Form and while he was doing that using VPN and remote desktop his
machine froze and the connection broke down. This somehow created the
situation where the entire table got locked and the connection to SQL Server
persisted even though the user's machine has frozen.
"Aaron Bertrand [SQL Server MVP]" wrote:
> > What should be done to handle situations like this to prevent future
> > scheduled job failures?
> Well, what I was trying to get at what was, what exactly is the user doing
> to hold locks on the table in the first place? Using what app(s)? Is he
> opening data in a grid? Ideally he should be submitting short transactions
> (using stored procedures or insert/update statements) and should not be as
> exposed to the risk of connection interruptions. If this has happened more
> than once then my guess is his data manipulation techniques are not ideal.
>

Friday, March 9, 2012

Scheduled Backup Jobs Failing Sporadically

I have 2 types of SQL Server backup jobs that keep failing
sporadically. There are nightly full backups that fail and
there are hourly Transaction Log backups that fail
sporadically as well.
The nightly backups are scheduled for 2:00 a.m. I've just
changed the times and staggered them seconds apart. The
hourly Tlog backups run every hour during the day time.
The only error message I can find is:
Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
[SQLSTATE 42000] (Error 22029). The step failed.Executed
as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
42000] (Error 22029). The step failed.
When a job fails I run it manually and the backup works.
These failures are only occuring on SQL Server 2000 SP3You need to specify a report file for your maint plan and look for error messages in that.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Kelly" <anonymous@.discussions.microsoft.com> wrote in message
news:046401c3c4e4$5e556c30$a301280a@.phx.gbl...
> I have 2 types of SQL Server backup jobs that keep failing
> sporadically. There are nightly full backups that fail and
> there are hourly Transaction Log backups that fail
> sporadically as well.
> The nightly backups are scheduled for 2:00 a.m. I've just
> changed the times and staggered them seconds apart. The
> hourly Tlog backups run every hour during the day time.
> The only error message I can find is:
> Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
> [SQLSTATE 42000] (Error 22029). The step failed.Executed
> as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
> 42000] (Error 22029). The step failed.
> When a job fails I run it manually and the backup works.
> These failures are only occuring on SQL Server 2000 SP3|||I've found this error message:
Microsoft (R) SQLMaint Utility (Unicode), Version
[Microsoft SQL-DMO (ODBC SQLState: HYT00)] Error 0:
[Microsoft][ODBC SQL Server Driver]Timeout expired
>--Original Message--
>I have 2 types of SQL Server backup jobs that keep
failing
>sporadically. There are nightly full backups that fail
and
>there are hourly Transaction Log backups that fail
>sporadically as well.
>The nightly backups are scheduled for 2:00 a.m. I've just
>changed the times and staggered them seconds apart. The
>hourly Tlog backups run every hour during the day time.
>The only error message I can find is:
>Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
>[SQLSTATE 42000] (Error 22029). The step failed.Executed
>as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
>42000] (Error 22029). The step failed.
>When a job fails I run it manually and the backup works.
>These failures are only occuring on SQL Server 2000 SP3
>.
>|||In the past I have found that SQLState42000 usually ment
the server was waiting on resources.
>--Original Message--
>I have 2 types of SQL Server backup jobs that keep
failing
>sporadically. There are nightly full backups that fail
and
>there are hourly Transaction Log backups that fail
>sporadically as well.
>The nightly backups are scheduled for 2:00 a.m. I've just
>changed the times and staggered them seconds apart. The
>hourly Tlog backups run every hour during the day time.
>The only error message I can find is:
>Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
>[SQLSTATE 42000] (Error 22029). The step failed.Executed
>as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
>42000] (Error 22029). The step failed.
>When a job fails I run it manually and the backup works.
>These failures are only occuring on SQL Server 2000 SP3
>.
>|||Seems like sqlmaint.exe get a timeout during some operation. I can't say why that is, if it is a
long running backup (how big db, do you do backup to network) or some other operation...
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
<anonymous@.discussions.microsoft.com> wrote in message
news:087701c3c57a$f6760ec0$a401280a@.phx.gbl...
> I've found this error message:
> Microsoft (R) SQLMaint Utility (Unicode), Version
> [Microsoft SQL-DMO (ODBC SQLState: HYT00)] Error 0:
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> >--Original Message--
> >I have 2 types of SQL Server backup jobs that keep
> failing
> >sporadically. There are nightly full backups that fail
> and
> >there are hourly Transaction Log backups that fail
> >sporadically as well.
> >
> >The nightly backups are scheduled for 2:00 a.m. I've just
> >changed the times and staggered them seconds apart. The
> >hourly Tlog backups run every hour during the day time.
> >The only error message I can find is:
> >
> >Executed as user: KYEANTD\SQLAdmin. sqlmaint.exe failed.
> >[SQLSTATE 42000] (Error 22029). The step failed.Executed
> >as user: KYEANTD\SQLAdmin. sqlmaint.exe failed. [SQLSTATE
> >42000] (Error 22029). The step failed.
> >
> >When a job fails I run it manually and the backup works.
> >These failures are only occuring on SQL Server 2000 SP3
> >.
> >

Wednesday, March 7, 2012

Schedule Job Keep on failing!

Hi,

Actually i saved a SSIS package into a SQL Server 2005, then scheduled to run a job from SQL Agent, but, the job keep on failing and no error message was returned in order for me to toubleshoot.

After the job failed, i restart the job again, and it actually continue to run, but unfortunately, it stopped again after some time.

And, before i sheduled the job, i actually tried to run the package itself in SQL Server Business Intelligent, it runs suceessfully.

In the package, i actually set the ProtectionLevel to DontSaveSensitive.

Another option that I used to run the pakage was using dtexex.exe:

dtexec.exe /FILE "E:\Package.dtsx" /MAXCONCURRENT " -1
"

But, the error message returned also not so useful.

So, can someone tell me how to troubleshoot this problem? What exactly the problem is that cause the job keep failing?

Thanks.

Hi, I dont know exactly about your problem but I hope this helps:

If you change the accounts for the SQL Server services you have to use the SQL Server Configuration Manager!

Otherwise (doing it by windows/services) the account wont be given the neccessary permissions in SQL Server.

Try to run SQL Server service and SQL Server Agent under the same account.

|||

New user to SQl 2005 wrote:

Hi,

Actually i saved a SSIS package into a SQL Server 2005, then scheduled to run a job from SQL Agent, but, the job keep on failing and no error message was returned in order for me to toubleshoot.

After the job failed, i restart the job again, and it actually continue to run, but unfortunately, it stopped again after some time.

And, before i sheduled the job, i actually tried to run the package itself in SQL Server Business Intelligent, it runs suceessfully.

In the package, i actually set the ProtectionLevel to DontSaveSensitive.

Another option that I used to run the pakage was using dtexex.exe:

dtexec.exe /FILE "E:\Package.dtsx" /MAXCONCURRENT " -1
"

But, the error message returned also not so useful.

So, can someone tell me how to troubleshoot this problem? What exactly the problem is that cause the job keep failing?

Thanks.

It might be helpfull if you post the error. Most of the time this kind of error are due to permissions: Protection level of the packge and/or permission of the account running SQL Agent service; so check that twice...

Rafael Salas

|||

Hi Suncream,

Actuallt the SQL Server service and SQL Server Agent service are using the same account (Local System). But the job anyhow will stop in the middle of executing.... But anyhow, when continue to start the job again, it still continue to run. And the error message returned:

Date 11/1/2006 5:49:02 PM
Log Job History (EXEC Package)

Step ID 2
Server SQLServer2005
Job Name EXEC Package
Step Name EXEC Package_Step2
Duration 02:24:19
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: SQLServer2005\SYSTEM. The package execution failed. The step failed.

Date 11/1/2006 5:48:35 PM
Log Job History (EXEC Package)

Step ID 0
Server SQLServer2005
Job Name EXEC Package
Step Name (Job outcome)
Duration 02:24:46
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
The job failed. The Job was invoked by User sa. The last step to run was step 2 (EXEC Package_Step2). The job was requested to start at step 1 (EXEC Package_Step1).

I still don't have any idea of solving this problem. Please help!!

Thanks.

|||Hi,
If using this protection level you would have to use configuration files to pass the credentials to your package at runtime when executed from the SQL Agent subsystem.
Try some research on this forum around Configuration, you will find plenty of answers.
Philippe|||

Hi Philippe,

Yes, actually I'm using a configuration file to pass all the credentials to my package at runtime when executing the package from SQL Agent. And the job is also running but just that not sure what has caused it to stop after running some time.

Do you have any idea?

Thanks.

|||When looking at your config file, did you set the format to be similar to the following?
Note that the password is not passed as the wizard suggest to put it in a separate xml tag (it would get stripped off the config).

<?xml

version="1.0" ?>

- <DTSConfiguration>

- <Configuration ConfiguredType="Property"

Path="\Package.Connections[datamart.SM.oledb].Properties[ConnectionString]" ValueType="String">

<ConfiguredValue>Data Source=datamart;User ID=ssis

agent;Password=VerySecret741;Initial Catalog=SM;Provider=SQLOLEDB.1;Persist Security

Info=True;</ConfiguredValue>

</Configuration>

</DTSConfiguration>


That would hold true for any provider you are connecting to.
Philippe|||Also try to set-up a text file SSIS log to see if you get any input.
Logs are not always generating errors logs as they should and this is a known problem but text logs are the best bet you have on hand.

On a personal note about logs, I would add to it that SQL Agent NEVER give a clue of what is wrong in an ssis package.
One can set-up an ssis log to be recorded in the MSDB database or in the text file.
MSDB is cool because you can easily generate a report but Text report seems to provide a little more insights of what is going wrong.
It is just not comfortable to work with text logs and they seems to be somewhat incomplete anyways, depending when the error occurs (pre-validation as an example) then text log is not helping you.

The problem here is that when you work with external datasources like Oracle, if Oracle is offline at the time, the log file does not tell you nothing while if you were working online you would get a tnsname error.

Philippe|||

Hi Philippe,

Below is the configuration file:

<?xml version="1.0"?>
<DTSConfiguration>
<Configuration ConfiguredType="Property" Path="\Package.Connections[DB].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=Server;User ID=sa;Initial Catalog=DB;Provider=SQLNCLI.1;Auto Translate=False; Password=sa;</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.Connections[DB].Properties[InitialCatalog]" ValueType="String">
<ConfiguredValue>DB</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.Connections[DB].Properties[Password]" ValueType="String">
<ConfiguredValue>sa</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.Connections[DB].Properties[ServerName]" ValueType="String">
<ConfiguredValue>Server</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.Connections[DB].Properties[UserName]" ValueType="String">
<ConfiguredValue>sa</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.Properties[ProtectionLevel]" ValueType="Int32">
<ConfiguredValue>0</ConfiguredValue>
</Configuration>
</DTSConfiguration>

And I think it's the same as yours.

So, do you think that the configuration is correct?

Thanks

|||

Judging by the error you posted:

Date 11/1/2006 5:49:02 PM
Log Job History (EXEC Package)

Step ID 2
Server SQLServer2005
Job Name EXEC Package
Step Name EXEC Package_Step2
Duration 02:24:19
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: SQLServer2005\SYSTEM. The package execution failed. The step failed.

it seems you are running the package in SQL Server agent as an 'SQL Server Integretaion Services Package' step type. If you use 'Operative System(CmdExec)' as step type you will receive more details on the actual error. You can use DTExecUI to generate the command line you will need (http://msdn2.microsoft.com/en-US/library/ms141707.aspx); but in general should look like:

DTEXEC /SQL "\SSIS_Package_Name" /SERVER "Server\Instance" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF

This link have some example of what I am saying:

http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html

Rafael Salas

|||

Judging by the error you posted:

Date 11/1/2006 5:49:02 PM
Log Job History (EXEC Package)

Step ID 2
Server SQLServer2005
Job Name EXEC Package
Step Name EXEC Package_Step2
Duration 02:24:19
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: SQLServer2005\SYSTEM. The package execution failed. The step failed.

it seems you are running the package in SQL Server agent as an 'SQL Server Integretaion Services Package' step type. If you use 'Operative System(CmdExec)' as step type you will receive more details on the actual error. You can use DTExecUI to generate the command line you will need (http://msdn2.microsoft.com/en-US/library/ms141707.aspx); but in general should look like:

DTEXEC /SQL "\SSIS_Package_Name" /SERVER "Server\Instance" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF

This link have some example of what I am saying:

http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html

Rafael Salas

Saturday, February 25, 2012

Schedule DTS to import data from Oracle to SQL

Hi, I am trying to schedule a DTS daily to get data from Oracle to SQL Serve
r
but the job are failing. It works if I manually run the DTS. I think it is
because the SQL Agent domain account doesn't have any access to Oracle
database. I don't have control over the Orcale DB. Any idea how I can solve
this problem? Any help will be greatly appreciated!
Thanks!
--
YuhongThat is most likely the problem. You could get away with
running the DTS in a task scheduler job and run that under
any windows account you want. Here's how to do run
a stored DTS package in SQL Server via VBScript.
http://www.eggheadcafe.com/articles/20030923.asp
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
"Yuhong" <Yuhong@.discussions.microsoft.com> wrote in message
news:592FEB50-7009-4D18-B0E5-9B8583159110@.microsoft.com...
> Hi, I am trying to schedule a DTS daily to get data from Oracle to SQL
> Server
> but the job are failing. It works if I manually run the DTS. I think it is
> because the SQL Agent domain account doesn't have any access to Oracle
> database. I don't have control over the Orcale DB. Any idea how I can
> solve
> this problem? Any help will be greatly appreciated!
> Thanks!
> --
> Yuhong