Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2002
    Posts
    11

    Question Unanswered: Renaming SQLServer in SQL7.0

    I would like to rename my Sql server from the name is has at the moment but am not able to do so...

    I want to name a new servers sql server the same as the old one. The new server has a different host name (bob) but we will use an alias on the new one and it will be old servers host name (sally).

    SO the old sql server is called 'sally sql' (sally being the Servers host, or computer, name) and the new one is 'bob sql' (bob being the host name) - I want to rename it to 'sally sql' so my ODBC connections on all my pc's and an app I have running connecting to the sql server doesn't have to be changed....

    HELP!

  2. #2
    Join Date
    Feb 2002
    Location
    Denmark
    Posts
    4
    hi

    try using the following

    sp_addserver '<name>',local

    Remarks

    Only members of the setupadmin and sysadmin fixed server roles can execute sp_addserver.

    Sincerily
    Sniskeren

  3. #3
    Join Date
    Feb 2002
    Posts
    11

    renaming sqlserver

    Thanks I did try that but did not change the name... probably had the syntax incorrect or some silly little thing... will try again.

    did not give any error messages about syntax so I had assumed it just did not work...

    Thanks again... heres hoping...

  4. #4
    Join Date
    Jan 2002
    Location
    Ireland
    Posts
    32
    Newbie but I am pretty sure the syntax is

    sp_renamedb 'old_name','new_name'

  5. #5
    Join Date
    Feb 2002
    Posts
    11

    renaming sqlserver - to R12

    R12: Thanks - but its not the Database itself that I want to rename... its the actual SQL Server (found under the SQL Server Group). There is nothing wrong with the Database name - I was well able to copy the database (from the old SQL Server) over the the New SQL Server.

    I have found out that I have to first rename the actual Server (NT Server) > reboot > run the setup for the SQL Server > and then it will rename the actual SQL Server.

    The reason I want to rename the SQL Server with out renaming my actual NT Server is we have a new naming convention here so I cannot use the old NT Servers name on the New one... go figure - I call it job security all this fussing about...

    Anyway it looks like I cannot rename the actual SQL Server without renaming the NT Server with it... I may have to actually go and strip my application down make the changes for it to look to the new SQL Server and recompile it AND then reinstall on all those darn workstations... Like I said job security!!!!

    If anyone does know anythink though please let me know

    Thanks

  6. #6
    Join Date
    Feb 2002
    Posts
    7
    This is what I found in the BOL. Its from the 2000 BOL, but I think this applies to the 7.0 as well. Mind you ,make sure there are no remote logins defined on your server.


    Renaming a Server
    When you change the name of the computer that is running Microsoft® SQL Server™ 2000, the new name is recognized during SQL Server startup. You do not have to run Setup again to reset the computer name.

    You can connect to SQL Server using the new computer name after you have restarted the server. However, to correct the sysservers system table, you should manually run these procedures:

    sp_dropserver <old_name>
    go
    sp_addserver <new_name>

    HOPE THIS HELPS, GL

  7. #7
    Join Date
    Feb 2002
    Posts
    11
    Yes it does pick up on the name change in SQL 2000 but not in SQL 7. In 7 you have to run the setup.

    Regardless I do not want (or can) change my new NT Server name. I just want to be able to rename the SQL Server itself...

    That is the crux of my problem... I do not think I can do so... If not then I am stuck with having to rewrite my application and reinstall....

    Being basically lazy I don't want to do that - looks like I will have to though!

    Thanks for the try though much appreciated

    Never thought I would have this much problems!!!

  8. #8
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    in v7 sql server inherits the name from the server.
    It is normal for an application to obtain the connection string from a single place so that it is no trouble to change it. Either in an odbc dtasource, ini file, registry entry or anything that is read at application startup.

    What will you do if your server crashes and you want to move to a backup?

  9. #9
    Join Date
    Feb 2002
    Posts
    11
    In case of a 'melt down' I will have my old production server (that will be my test server when this new one gets moved to production...). The new NT Server has to have a different naming convention - otherwise I would just name it the same as the old one... The old server will be on a test environment after its removed from Production so its too bad they wont let me name it the same...

    Actually in ALL the time we have had the SQL Server up and running I have never had any problems with it - it runs very stable (hahaha now I hope I have not jinxed it!), not like the App I am running in conjunction with it though... regardless, we have many safe guards here in case of problems... which I am very familar with as my other App frequently does things to drive me mad....

    So if it is not a problem to rename the SQL Server how do I go about renaming it? Were exactly and how exactly do I go about doing this???

    So far I have only come across the one way - to rename the actual NT Server and then I can rename the SQL Server... back to my original problem...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •