Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Friday, March 30, 2012

Renaming a sql server instance after you rename the server

I installed sql server on one of my test servers, and I am eventually going to rename this server and put it into production. This server will replace one of my old servers with the same name. I was wondering if there was a way to rename the SQL Server instance after you rename your server without having to reinstall SQL Server. Thanks in advance for all the help.Originally posted by svanati
I installed sql server on one of my test servers, and I am eventually going to rename this server and put it into production. This server will replace one of my old servers with the same name. I was wondering if there was a way to rename the SQL Server instance after you rename your server without having to reinstall SQL Server. Thanks in advance for all the help.

Done this many times. If you are using replication it gets more complex. I've done that as well but I will assume you aren't

Accommodate change in NetBIOS name:

sp_dropserver 'oldname', 'droplogins'
sp_addserver 'newname', local

use msdb
go
SELECT * FROM sysjobs -- Check which jobs have which server name...
update sysjobs set originating_server = 'newname' -- Assumes no jobs intentionally use a different server name

restart SQL Server

SELECT @.@.servername -- The result should match the systems NetBIOS name|||Thanks for the help.sql

Renaming a SQL Cluster

Can anyone tell me if it's possible to rename a cluster?
Fro example, we have an Active/Passive cluster made up of two servers.
'Server1' and 'Server2' which make up the cluster 'Cluster1' is it
possible to rename this to 'Cluster2' without affecting the servers that
make it up?
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Yes, you can rename the cluster. You can't rename SQL Instances though.
Start Cluster Administrator from the Cluster Group Controlling node - use a
"." as the cluster name.
Take the Cluster Group Offline.
Double click on the Network Name resource and change the parameters
information.
Bring the Cluster Group Online.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://www.msmvps.com/clustering - Blog
"Dave" <Anonymous@.devdex.com> wrote in message
news:O$m1e2McFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Can anyone tell me if it's possible to rename a cluster?
> Fro example, we have an Active/Passive cluster made up of two servers.
> 'Server1' and 'Server2' which make up the cluster 'Cluster1' is it
> possible to rename this to 'Cluster2' without affecting the servers that
> make it up?
> Thanks
>
>
> *** Sent via Developersdex http://www.codecomments.com ***

Monday, March 12, 2012

Removing replications

I have two servers (let's call them SQL01 and SQL02), and SQL01 is our main SQL-server.

I have been doing som replication to SQL02, and I want to remove ALL replications. I have an publication on a database called DB1.

The distributor is set to be SQL02.

I used the wizard 'disable....', and stupid as I was I removed the distributor before removing the publications.

Something went wrong, and now the distributor is removed, but the publications are still there (not working, but they are there).

When I try to remove them I get the error:

'Error 2812: Could not find stored procedure ''

I am in deep trouble, and I hope that someone can help me with the problem.

Best regards...
SrenGo to the menu Tools -> Replication -> Generate SQL Script (select disable/drop components). You can use this to run to drop replication. Follow the stored procedures as listed in the order they are provided.|||Hi,
Thanks for the answer, but when I try to do that, I get the same error...

I have really messed things up, and I you have other suggestions, I would really thankful.

Sren|||Were you able to generate the script ? If so, run the script line by line - let me know where it fails - that will give us an indication as to what is broken.|||Hi,
Sorry for not writing back earlier. I have been on a businesstrip to Finland.

I unfortunately still have the problem, and if I uncheck "Distributor attributes", then I can generate the following script:

<B> use [MarliDK]
GO

-- Dropping the merge subscription
exec sp_dropmergesubscription @.publication = N'MarliDK_NEW', @.subscriber = N'ODSSQL02', @.subscriber_db = N'MarliDK', @.subscription_type = N'push'
GO

-- Dropping the merge publication
exec sp_dropmergepublication @.publication = N'MarliDK_NEW'
GO

-- Disabling the replication database
use master
GO

exec sp_replicationdboption @.dbname = N'MarliDK', @.optname = N'merge publish', @.value = N'false'
GO
</B>

When i Run the first statement I get the following:

<B> Server: Msg 2812, Level 16, State 62, Procedure sp_dropmergesubscription, Line 401
Could not find stored procedure ''.
Server: Msg 14056, Level 16, State 1, Procedure sp_dropmergesubscription, Line 444
The subscription could not be dropped at this time.</B>

I would like to thank you many times for trying to help me. I really appreciate that.

Best regards and greetings from Denmark
Sren