Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1122
  • Last Modified:

changing the MS SQL database name

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
Artform04
Asked:
Artform04
  • 7
  • 5
1 Solution
 
sajuksCommented:
Use the sp_renamedb option
sp_renamedb 'oldname','newname'
0
 
Artform04Author Commented:
is that all you have to do???
0
 
Artform04Author Commented:
Just a second! but I need to rename the server you know. Not the database name!
0
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
Artform04Author Commented:
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
 
Artform04Author Commented:
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
 
sajuksCommented:
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
 
Artform04Author Commented:
Thanks sajuks, this wont delete my databases? Could you describe the process of doing this, please.
kind regards, Martin
0
 
Artform04Author Commented:
Could you walk me through this, as I've not done this before.
0
 
sajuksCommented:
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
 
Artform04Author Commented:
cheers sajuks. I've done it all successfully. Everything works now :)
0
 
sajuksCommented:
Thanks for the points and grade
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now