Author |
Topic |
sqlserverdeveloper
Posting Yak Master
243 Posts |
Posted - 2008-09-30 : 15:27:42
|
Hi, Our 3 scheduled SQL jobs failed last night, basically these jobs run DTS packages. I am getting the below error:Error: -2147467259 (80004005); Provider Error: 4064 (FE0) Error string: Cannot open user default database. Login failed. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0Thanks! |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sqlserverdeveloper
Posting Yak Master
243 Posts |
Posted - 2008-09-30 : 15:44:29
|
How do I fix the default db for the login? Do I need to run the below code at the command prompt, if so what 'New default database' should I use?OSQL -E -S "Servername" -d master -Q "EXEC sp_defaultdb 'Login', 'New default database'"Thanks! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sqlserverdeveloper
Posting Yak Master
243 Posts |
Posted - 2008-09-30 : 16:09:59
|
BTW that error is occuring on SQL 2000, those jobs were running fine till yesterday. All of a sudden I started getting this error. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sqlserverdeveloper
Posting Yak Master
243 Posts |
Posted - 2008-09-30 : 16:34:32
|
I fixed the default DB to master for that sa login. Actually we removed a database from that server by detaching the database and deleting the mdf and ldf files for that db which we no longer need. So did this removing of the database from the server caused this issue? Thanks! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sqlserverdeveloper
Posting Yak Master
243 Posts |
Posted - 2008-09-30 : 16:58:38
|
Actually sa was using a existing db as a default db, I do'nt think that login was using the removed database as the default db. But anyways, I changed the default db to master DB now. Usually which login do we use for running the sql jobs?Thanks! |
|
|
|