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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

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

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?

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

Go to Top of Page

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


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  
 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.04 seconds. Powered By: Snitz Forums 2000