on 05-22-2015 10:31 AM
Hi,
I was wondering if there is a simple command to create a new user for our DEV database, who will only have read permissions?
I created a user test, in the DEV database.But now I want to give it read access to the entire DEC database.
In the documentaton I can only find how to give the permission per table, but not for the entire database.
Best regards,
Menno
Menno,
Also check the below link:
Regards
Kiran K Adharapuram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Menno,
Try this below query may be this will help.
select 'grant select on ' + name + ' to <user_name>' from sysobjects where type = 'U' or type = 'P'
go
select 'grant update on ' + name + ' to <user_name>' from sysobjects where type = 'U' or type = 'P'
go
select 'grant execute on ' + name + ' to <user_name>' from sysobjects where type = 'U' or type = 'P'
go
select 'grant all on ' + name + ' to <user_name>' from sysobjects where type = 'U' or type = 'P'
go
U - User Objects, P - Stored Procedures
Regards
Kiran K Adharapuram
Menno,
There is a stored procedure called sp_addalias whcich allows an Adaptive Server user to be known in a database as another user.
Example:
There is a user named “albert” in the database’s sysusers table and a login for a user named “victoria” in master.dbo.syslogins. This command allows “victoria” to use the current database by assuming the name “albert”:
sp_addalias victoria, albert
Regards
Kiran K Adharapuram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.