Database Change Management
Database Change Management
Home | Profile | Register | Active Topics | Active Polls | Members | Private Messages | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 Managing Changes To SQL Server Code
 General SQL Change Management Discussions Forum
 script to allow for Dev,Prod differences
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


2 Posts

Posted - 03/10/2006 :  10:32:56  Show Profile Send dgall a Private Message  Reply with Quote
In our environment we have different servers for prod and dev, different servers for our external environments dev and prod
and corresponding different AS400's for dev and prod. Our application code in the database includes OPENQUERY statements and four part object addresses. These constructs cannot be replicated directly between the environments and work without changing of the statements ie change the prod server name to the dev server name.

I believe that we are not alone in this regard and i would like to know what techniques are recommended or being used to allow for a smooth DbGhost build of a dev database without environment problems. I am currently considering creating all affected object scripts with " if @@servername= prod " type syntax.


Google AdSense

Mountain View


1 Posts

Posted - 10/23/2006 :  17:41:06  Show Profile Send mlange a Private Message  Reply with Quote
We do a similar thing where I work and use linked servers to connect to different SQL Server databases. Each linked server points to a different database in each environment, but because the linked server name is the same in all environments our db ghost scripts do not have to change.

I'm pretty sure you can use OPENQUERY with linked servers.


Go to Top of Page


1 Posts

Posted - 11/21/2006 :  11:32:31  Show Profile Send scott a Private Message  Reply with Quote
We had the same problem until we replaced all 4 part object references to use Synonyms (new in SQL2005). We manage the Synonyms outside of DBGhost, i.e. we don't script them up. They remain static to the db they belong in so they can keep pointed at their correct "dancing partner". For similar reasons we replaced all user based permissions with role based because our DMZ domain users don't exist outside of the DMZ... and grants fail. Hope this helps.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Jump To:
Database Change Management © Copyright 2005 Innovartis Ltd. Go To Top Of Page
Snitz Forums 2000
RSS Feed 1 RSS Feed 2
Powered by ForumCo 2000-2008
TOS - AUP - URA - Privacy Policy
ForumCo Free Blogs and Galleries
Signup for a free forum or Go Banner Free