I read Amit’s blog on Replication regarding the server name change (http://www.sqlservergeeks.com/sql-server-replication-requires-the-actual-server-name-to-make-a-connection-to-the-server/). It also reminds me that after changing the name of the server, some jobs were failing because the original login name that owned the job was invalidated. Suppose the server name was changed from WIN2K8R2 to REPLDBMIRRNODE1 and the jobs were owned by the local administrator (Windows Authentication), WIN2K8R2\Administrator, then these job failed since the login was invalidated. What was required to be done was to change the login from [WIN2K8R2\Administrator] to [REPLDBMIRRNODE1\Administrator].

And the following script can do this:

After this, the jobs ran successfully.




Rahul Sharma

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook