SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 creating database using my script, but got an erro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 04/17/2004 :  12:16:02  Show Profile  Reply with Quote
I generated a sqlscript of my entire db and created a new db from it. I received an error when I ran the sql script in QA.
Here is the error: "Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'LogDetails'. The stored procedure will still be created."


When I looked in the newly created database, the stored proc LogDetails is there? Could this be because of some PK or FK issues somehow?

gpl
Posting Yak Master

United Kingdom
195 Posts

Posted - 04/17/2004 :  12:38:39  Show Profile  Reply with Quote
What this is is that the procedure 'LogDetails' is needed by the procedure that failed ... it has been created but the reference to it hasnt been stored.

Rearrange the order of stored procedures so that 'LogDetails' is first and all should be well

Graham
Go to Top of Page

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 04/17/2004 :  20:06:17  Show Profile  Reply with Quote
Ok that's what I thought.
but what Reference wasnt' created?
Go to Top of Page

nr
SQLTeam MVY

United Kingdom
12543 Posts

Posted - 04/18/2004 :  00:37:39  Show Profile  Visit nr's Homepage  Reply with Quote
sql server holds a record of dependencies by object ID. If SP A calls SP B then it records this fact. If B has not yet been created then it doesn't have an object ID and so the dependency cannot be recorded and this is what the error message is saying.
For running it doesn't cause a problem as long as B is created before A is run as the query plan is created on first run.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000