?
Solved

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

Posted on 2016-11-28
6
Medium Priority
?
44 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 29

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 29

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
How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

 

Author Comment

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

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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

Optimized for private cloud infrastructures and datacenters, Nano Server is minimalistic, yet super-efficient, OS for services such as Hyper-V and Hyper-V cluster. Learn how you can easily deploy Nano Server and unlock its power!
Many of the companies I’ve worked with have embraced cloud solutions due to their desire to “get out of the datacenter business.” The ability to achieve better security and availability, and the speed with which they are able to deploy, is far grea…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

765 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