?
Solved

changing the MS SQL database name

Posted on 2004-10-04
12
Medium Priority
?
1,118 Views
Last Modified: 2008-02-26
I would like to set up replication for my (MS-Sql 2000) database, however at the moment the database I want to do this with is called local, I must rename it (I want to give it the machine name). Can I do this by SQL server registration? Whats the process involved. Obviously I dont want to loose any data in it.
0
Comment
Question by:Artform04
[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
  • 7
  • 5
12 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 12215208
Use the sp_renamedb option
sp_renamedb 'oldname','newname'
0
 
LVL 1

Author Comment

by:Artform04
ID: 12215221
is that all you have to do???
0
 
LVL 1

Author Comment

by:Artform04
ID: 12215226
Just a second! but I need to rename the server you know. Not the database name!
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 1

Author Comment

by:Artform04
ID: 12215664
I've first has a look at other contribution on here whether they are relevant. In my case I'm seeting up merge replication - so I want to set up a publication!
I've been told that I need to rename the (local) db name (or is this a server instance?) to an actual name, apparently best is the machine name. This needs to be done in order to be able to publish the MS SQL db.

kind regards. Martin
ps.:
I've increased the points for this question by a substantial amount.

0
 
LVL 1

Author Comment

by:Artform04
ID: 12215716
SQL Server replication does not support nicknames, such as "." or "(local)", as server names.

Delete the SQL Server registration for this server and register it using the actual server name.

Thats the error message we are getting.
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12215758
Remove your (local) SQL SERVER registration from Enterprise Manager
Create a new sql server registration wizard and enter the computer name of the server then try configuring Replication
0
 
LVL 1

Author Comment

by:Artform04
ID: 12215849
Thanks sajuks, this wont delete my databases? Could you describe the process of doing this, please.
kind regards, Martin
0
 
LVL 1

Author Comment

by:Artform04
ID: 12215943
Could you walk me through this, as I've not done this before.
0
 
LVL 33

Accepted Solution

by:
sajuks earned 2000 total points
ID: 12216065
When you remove the Server in the Enterprise Manager, you only delete the link .
Just register the server with the new name and thats it. All your dbs will be accounted for.

Go to Ent Manager > right click on the Local name> Delete SQL SERVER REG
Say Yes To it.
Crate a new reg one with your machine name and thats it
0
 
LVL 1

Author Comment

by:Artform04
ID: 12216359
cheers sajuks. I've done it all successfully. Everything works now :)
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12217713
Thanks for the points and grade
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 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