Guest_imported
New member
- Jan 1, 1970
- 0
I have made a stored procedure (am using SQL Server7) like:
CREATE PROCEDURE AddUser AS
GO
USE Database1
GO
sp_grantdbaccess 'Albino'
GO
USE Database2
GO
sp_grantdbaccess 'Albino'
GO
But when I run this from Query Analyzer and I open the stored procedure in enterprise manager, it only looks like:
CREATE PROCEDURE AddUser AS
that's all. And it tries to apply the access to the databases when I run it from query analyzer. I wonder how I could make a stored procedure that gives the user Albino access to those databases when I run the stored procedure, like:
EXECUTE AddUser
Thanks for your time!
-Bob
CREATE PROCEDURE AddUser AS
GO
USE Database1
GO
sp_grantdbaccess 'Albino'
GO
USE Database2
GO
sp_grantdbaccess 'Albino'
GO
But when I run this from Query Analyzer and I open the stored procedure in enterprise manager, it only looks like:
CREATE PROCEDURE AddUser AS
that's all. And it tries to apply the access to the databases when I run it from query analyzer. I wonder how I could make a stored procedure that gives the user Albino access to those databases when I run the stored procedure, like:
EXECUTE AddUser
Thanks for your time!
-Bob