Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In order to upgrade a database with no client disconnects, I clone an existing database and put it in a readonly mode. Now, I want all user traffic to be redirected from the original database to the cloned one (both are on the same server). I want to do it with SQL aliases. However, I see that aliasing is possible for server instances and protocols. Is there another way to go about database redirects on the same server?

share|improve this question

migrated from stackoverflow.com Oct 25 '11 at 12:54

This question came from our site for professional and enthusiast programmers.

1  
Yes, rename your databases. –  RBarryYoung Oct 17 '11 at 22:37

2 Answers 2

Aliases are only for server/instances of SQL Server, not for databases.

In your case I'd create a database snapshot of the current database (so there's no need for a new read-only copy of your db), redirect all user connections there, do you update, then drop the snapshot. Please take into consideration that a snapshot can take a lot of space if forgotten there, not dropped on time.

share|improve this answer
    
+1 for I think this is the way to go unless you have access to a redundant server and mirroring or similar. –  Martin Sjöberg Dec 21 '11 at 20:21

Not sure if thats something easily achieved in this way. Youll probably want something similar to transactional replication / failover. Not sure how your structure has altered though. If the structure isnt changing, I would run with this solution so that you can take down the original and everything will simply divert.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.