Server specific

  • Is there a way to write a stored procedure that would allow a stored procedure to be executed only a server specified in the procedure?  Something like this that would be encrypted.

    CREATE PROCEDURE

    p_Copyright

    WITH ENCRYPTION

    AS

    DECLARE @AllowedServer as varchar(100)

    SELECT @AllowedServer = 'MainServer'

    IF <???????> = @AllowedServer BEGIN

    EXEC blah blah blah

    END

     

     

     

  • IF SERVERPROPERTY('servername') = 'MainServer' BEGIN 

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply