Saturday, February 25, 2012

New db cant be found

We have a brand new sql 2k server. Its all up to date on service packs
(both win2k and SQL).

I went in to enterprise manager and added a new db. I can run sprocs
and raw sql against the new db just fine from Query Analyzer.

When I try to make a dts package that refers to my new db I get the
following error:

Error desription: deferred prepare could not be completed.
Could not locate entry in sysdatabases for database 'mydbname'. No
entry found with that name. Make sure that the name is entered
correctly.

OK, so I look in sysdatabases and see 'mydbname'. Just in case im an
idiot... I actually copied the db name from that table and paste it in
my dts window.

My dts package is using an "execute SQL task" to call a stored proc.

To be ecxact:
USE mydbname
GO
EXEC MyProc

When I click on the parse button, is when I get that error message.

I have deleted the db, restarted the server, and recreated the db with
a slightly different name. I can replace mydbname with pubs or
northwind and all is ok. It just doesnt like new db's.

Any help would be greatly appreciated.

Thanks,
DaveHi

I am not sure why you need the USE statement if the associated connection is
already setting this as the database.

John

"Dave" <funkdm1@.yahoo.com> wrote in message
news:f5174e0f.0407130507.ac071b@.posting.google.com ...
> We have a brand new sql 2k server. Its all up to date on service packs
> (both win2k and SQL).
> I went in to enterprise manager and added a new db. I can run sprocs
> and raw sql against the new db just fine from Query Analyzer.
> When I try to make a dts package that refers to my new db I get the
> following error:
> Error desription: deferred prepare could not be completed.
> Could not locate entry in sysdatabases for database 'mydbname'. No
> entry found with that name. Make sure that the name is entered
> correctly.
> OK, so I look in sysdatabases and see 'mydbname'. Just in case im an
> idiot... I actually copied the db name from that table and paste it in
> my dts window.
> My dts package is using an "execute SQL task" to call a stored proc.
> To be ecxact:
> USE mydbname
> GO
> EXEC MyProc
> When I click on the parse button, is when I get that error message.
> I have deleted the db, restarted the server, and recreated the db with
> a slightly different name. I can replace mydbname with pubs or
> northwind and all is ok. It just doesnt like new db's.
> Any help would be greatly appreciated.
> Thanks,
> Dave

No comments:

Post a Comment