Solved

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

Posted on 2016-11-28
6
28 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 28

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 28

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

776 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