Solved

Azure SQL - Restoring database and keeping same connection string and name

Posted on 2016-11-28
6
11 Views
Last Modified: 2016-11-29
Hi

I just restored my SQL Azure database and saw that an additional database was created with a new name.
How do I rather keep the same SQL database with it's connection string etc remaining the same.

Is the answer to delete my original database and just rename the backup? Will the connection string be different if I do it this way?
0
Comment
Question by:murbro
  • 3
  • 3
6 Comments
 
LVL 18

Expert Comment

by:Pawan Kumar Khowal
ID: 41905264
Do not use the delete approach. What is the point in keeping the same DB name again when you already have one ?

Normally we do this when we have to move the DB from one server to another. We take backup and restore.
0
 

Author Comment

by:murbro
ID: 41905340
Hi. I need to keep the name the same because there are hundreds of people that are connecting to it with various apps
0
 
LVL 18

Expert Comment

by:Pawan Kumar Khowal
ID: 41905343
So that name you already have in the system. You want to retire the existing one and use the new one.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:murbro
ID: 41905347
Thanks. How I do this?
0
 
LVL 18

Accepted Solution

by:
Pawan Kumar Khowal earned 500 total points
ID: 41905350
Rename the current DB from CurrenName to CurrentName_Old

Try..

USE master
GO  
ALTER DATABASE [Oldbname] MODIFY NAME = [Yournewdbname]
GO

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 41905358
Great. Thanks very much
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now