[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2016-11-28
6
Medium Priority
?
48 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 32

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:Murray Brown
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 32

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Murray Brown
ID: 41905347
Thanks. How I do this?
0
 
LVL 32

Accepted Solution

by:
Pawan Kumar earned 2000 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:Murray Brown
ID: 41905358
Great. Thanks very much
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

656 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