Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing SQL data into another SQL database

Status
Not open for further replies.

thysonj

Programmer
Jul 6, 2001
240
0
0
US
Why when I import my stored procedures from our local to our live servers do some of the ownerships get screwed up? In the local version all ownerships are dbo but in the live version some are dbo and some are my user login? I am assuming this is why the live web site can't find some of the stored procedures(the ones without dbo as owner).
 
CAn't tell you why it's happening (but I bet Terry can!).

However, if you want to fix the ownership once it happens, you can use the sp_changeobjectowner procedure to change the owner to dbo.
 
If you log in to your live database as administrator (sa) then all stored procedures will be created with an owener of dbo unless you have specifically specified this in the procedure code.

The fact that the ownership is not dbo could easily cause the problems you are experiencing
 
we figured it out...it really was a two prong problem.
1. For some reason when someone is set up with a default db it causes everything else you create outside of that particular db to have you as owner in stead of dbo.
we fixed that but the problem persisted when we figured out that whoever had written the SPs had not created them with dbo as owner ie:
CREATE PROCEDURE sp_getCAGEs
instead of
CREATE PROCEDURE dbo.sp_getCAGEs

that fixed it.

Unfortunatly we dont have a go to guy on SQL Server problems like this so these type of things pop up b/c we are limited in our knowledge right now.
Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top