Monday, March 26, 2012

Rename of Server Name getting problem

I use win200 and SQL2000.
At the first time, I set the server name as "ABC" and then install SQL2000.
Then I rename the server name as "DEF"
Then I type "select @.@.servername" and find that the server name is still in
"ABC" so I get trouble in replication.
I have tried to drop "ABC" and then add "DEF" again but it prompts that
"DEF" exists in database. If I type "Select @.@.servername" again. It shows
"NULL"
How to solve it? thx.sp_dropserver oldname
sp_addserver newname, LOCAL
Also, you need to handle the originating_server column in msdb..sysjobs.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"12345" <tommychu@.landsearch.com.hk> wrote in message news:uWC0aGrdDHA.1620@.TK2MSFTNGP12.phx.gbl...
> I use win200 and SQL2000.
> At the first time, I set the server name as "ABC" and then install SQL2000.
> Then I rename the server name as "DEF"
> Then I type "select @.@.servername" and find that the server name is still in
> "ABC" so I get trouble in replication.
> I have tried to drop "ABC" and then add "DEF" again but it prompts that
> "DEF" exists in database. If I type "Select @.@.servername" again. It shows
> "NULL"
> How to solve it? thx.
>|||Look at sp_addserver and sp_dropserver in BOL
"12345" <tommychu@.landsearch.com.hk> wrote in message
news:uWC0aGrdDHA.1620@.TK2MSFTNGP12.phx.gbl...
> I use win200 and SQL2000.
> At the first time, I set the server name as "ABC" and then install
SQL2000.
> Then I rename the server name as "DEF"
> Then I type "select @.@.servername" and find that the server name is still
in
> "ABC" so I get trouble in replication.
> I have tried to drop "ABC" and then add "DEF" again but it prompts that
> "DEF" exists in database. If I type "Select @.@.servername" again. It shows
> "NULL"
> How to solve it? thx.
>|||Try this
Exec sp_dropserver 'Old Name'
Exec sp_addserver 'New Name','local'
Reboot
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"12345" <tommychu@.landsearch.com.hk> wrote in message
news:uWC0aGrdDHA.1620@.TK2MSFTNGP12.phx.gbl...
> I use win200 and SQL2000.
> At the first time, I set the server name as "ABC" and then install
SQL2000.
> Then I rename the server name as "DEF"
> Then I type "select @.@.servername" and find that the server name is still
in
> "ABC" so I get trouble in replication.
> I have tried to drop "ABC" and then add "DEF" again but it prompts that
> "DEF" exists in database. If I type "Select @.@.servername" again. It shows
> "NULL"
> How to solve it? thx.
>|||I have tried to run "sp_addserver newname, local" but it prompts it is
existing currently.
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
¼¶¼g©ó¶l¥ó·s»D:OFuuIIrdDHA.1876@.TK2MSFTNGP12.phx.gbl...
> sp_dropserver oldname
> sp_addserver newname, LOCAL
> Also, you need to handle the originating_server column in msdb..sysjobs.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "12345" <tommychu@.landsearch.com.hk> wrote in message
news:uWC0aGrdDHA.1620@.TK2MSFTNGP12.phx.gbl...
> > I use win200 and SQL2000.
> > At the first time, I set the server name as "ABC" and then install
SQL2000.
> > Then I rename the server name as "DEF"
> > Then I type "select @.@.servername" and find that the server name is still
in
> > "ABC" so I get trouble in replication.
> > I have tried to drop "ABC" and then add "DEF" again but it prompts that
> > "DEF" exists in database. If I type "Select @.@.servername" again. It
shows
> > "NULL"
> >
> > How to solve it? thx.
> >
> >
>|||the you probably added it without the LOCAL parameter by mistake (so SQL Server thinks it is a
remote server). If so, you need to use sp_dropserver first.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"12345" <tommychu@.landsearch.com.hk> wrote in message
news:%23$J5QcrdDHA.2516@.TK2MSFTNGP10.phx.gbl...
> I have tried to run "sp_addserver newname, local" but it prompts it is
> existing currently.
>
> "Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
> ¼¶¼g©ó¶l¥ó·s»D:OFuuIIrdDHA.1876@.TK2MSFTNGP12.phx.gbl...
> > sp_dropserver oldname
> > sp_addserver newname, LOCAL
> >
> > Also, you need to handle the originating_server column in msdb..sysjobs.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> > "12345" <tommychu@.landsearch.com.hk> wrote in message
> news:uWC0aGrdDHA.1620@.TK2MSFTNGP12.phx.gbl...
> > > I use win200 and SQL2000.
> > > At the first time, I set the server name as "ABC" and then install
> SQL2000.
> > > Then I rename the server name as "DEF"
> > > Then I type "select @.@.servername" and find that the server name is still
> in
> > > "ABC" so I get trouble in replication.
> > > I have tried to drop "ABC" and then add "DEF" again but it prompts that
> > > "DEF" exists in database. If I type "Select @.@.servername" again. It
> shows
> > > "NULL"
> > >
> > > How to solve it? thx.
> > >
> > >
> >
> >
>|||Just see the error message. You now have to remove the remote logins for that remote server before
you can drop that remote server.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"12345" <tommychu@.landsearch.com.hk> wrote in message news:O5spJordDHA.2640@.TK2MSFTNGP09.phx.gbl...
> I can sure that "LOCAL" parameter is typed. e.g. exec sp_addserver
> 'serverABC', local
> It prompts following error.
> Error Message :
> Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44
> There are still remote logins for the server 'server231'.
>
>
>
> "Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
> ¼¶¼g©ó¶l¥ó·s»D:OchG2hrdDHA.2560@.TK2MSFTNGP10.phx.gbl...
> > the you probably added it without the LOCAL parameter by mistake (so SQL
> Server thinks it is a
> > remote server). If so, you need to use sp_dropserver first.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> > "12345" <tommychu@.landsearch.com.hk> wrote in message
> > news:%23$J5QcrdDHA.2516@.TK2MSFTNGP10.phx.gbl...
> > > I have tried to run "sp_addserver newname, local" but it prompts it is
> > > existing currently.
> > >
> > >
> > > "Tibor Karaszi"
> <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
> > > ¼¶¼g©ó¶l¥ó·s»D:OFuuIIrdDHA.1876@.TK2MSFTNGP12.phx.gbl...
> > > > sp_dropserver oldname
> > > > sp_addserver newname, LOCAL
> > > >
> > > > Also, you need to handle the originating_server column in
> msdb..sysjobs.
> > > >
> > > > --
> > > > Tibor Karaszi, SQL Server MVP
> > > > Archive at: http://groups.google.com/groups?oi=djq&as
> > > ugroup=microsoft.public.sqlserver
> > > >
> > > >
> > > > "12345" <tommychu@.landsearch.com.hk> wrote in message
> > > news:uWC0aGrdDHA.1620@.TK2MSFTNGP12.phx.gbl...
> > > > > I use win200 and SQL2000.
> > > > > At the first time, I set the server name as "ABC" and then install
> > > SQL2000.
> > > > > Then I rename the server name as "DEF"
> > > > > Then I type "select @.@.servername" and find that the server name is
> still
> > > in
> > > > > "ABC" so I get trouble in replication.
> > > > > I have tried to drop "ABC" and then add "DEF" again but it prompts
> that
> > > > > "DEF" exists in database. If I type "Select @.@.servername" again. It
> > > shows
> > > > > "NULL"
> > > > >
> > > > > How to solve it? thx.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

No comments:

Post a Comment