• @chandu, I'm pretty sure the code will throw an error message.

    From BOL syntax for dropserver: sp_dropserver [ @server = ] 'server'

    [ , [ @droplogins = ] { 'droplogins' | NULL} ]

    It looks like you need to use old server name.

    @OP:

    select @@servername will show you current server name, copy that and replace 'server' in the following with the output:

    sp_dropserver 'old_server'

    GO

    sp_addserver 'new_server', local

    GO

    exec sp_helpserver