Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL 2000 Job is failing

Author  Topic 

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2007-12-12 : 21:00:18
Job is failing for one DB

I receive below errors

EVENT LOG:

sql server scheduled job 'db name'
(0x5EA2833965097647B1D375899CE3E179)-Status Failed-Invoked on 2007-12-09 00:01-Message: The Job Failed.The job was invoked by schedule1 (sunday 12 am) . The last step to run was step 2(db name)

Job History:

step 1:
Excuted as user NT AUTHORITY\SYSTEM. The step succeeded
step 2:
Excuted as user: NT AUTHORITY\SYSTEM . Invalid object name '#DiskSize'.[SQL STATE 42S02][Error 208]. The step failed.
step 3:
The job failed. The job was invoked by Schedule 1 (sun 12 am). The last step to run was step 2{db name}

I am new to SQL server, please help?
Thanks in advance

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-12-12 : 23:32:50
Check package executed in second step, find out if created #DiskSize somewhere.
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2007-12-13 : 02:48:37
DiskSize table is there in the database
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-13 : 03:09:13
quote:
Originally posted by laddu

DiskSize table is there in the database


Is it a temp table or permanent table?
Make sure to qualify database name as well

dbname.dbo.DiskSize

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2007-12-13 : 21:54:42
Hi Madhivanan, thanks for your speedy reply
it is a temp table.
Do i need to create it explicitly, if so please let me know?

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-14 : 02:17:48
Try and see

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-14 : 03:38:28
quote:
Originally posted by laddu

Hi Madhivanan, thanks for your speedy reply
it is a temp table.
Do i need to create it explicitly, if so please let me know?




Well, if it starts with a # then it is a temp table. Whether you have to create it explicitly or not depends on your code. if you do a select into #DiskSize, then no, if you do an insert into #DiskSize select from then yes.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-12-15 : 01:07:59
And you can only access temp table in same session that created it.
Go to Top of Page
   

- Advertisement -