Solved

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

Posted on 2016-11-28
6
24 Views
Last Modified: 2016-12-27
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 25

Expert Comment

by:Pawan Kumar
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 25

Expert Comment

by:Pawan Kumar
ID: 41905343
So that name you already have in the system. You want to retire the existing one and use the new one.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

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

Accepted Solution

by:
Pawan Kumar 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

861 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

22 Experts available now in Live!

Get 1:1 Help Now