Is there a way to find the server name in a stored procedure?
I would like to encrypt my procedures when they are created on my clients'
databases, but I do not want them encrypted when I install them on my box fo
r
testing.
Thanks.>> Is there a way to find the server name in a stored procedure?
See @.@.SERVERNAME in SQL Server Books Online.
Anith|||is there a way to determine the server name prior to running the
WITH ENCRYPTION statement?
"Anith Sen" wrote:
> See @.@.SERVERNAME in SQL Server Books Online.
> --
> Anith
>
>|||>> is there a way to determine the server name prior to running the WITH
It is not fully clear what you are trying to achieve. In the case of a
stored procedure, WITH ENCRYPTION indicates that SQL Server encrypts the
data containing the text of the CREATE PROCEDURE statement in the system
procedure syscomments.
You will have to maintain multiple copies of the stored procedure to switch
between servers based on the server names.
Anith
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment