Create a SQL USER user

  • question :

    Create a SQL USER  user called [veeresh], whose default database is [nokia], His password should be [vee],He can read data from any tables from his default database, he can create table or any object  but he cannot modify the data and cannot drop objects . He can take backups .

    I am running Sql server 2000 Personal Edition..

    I tried these steps , but user can drop table. that should not happen .. help me

    ..

     sp_addlogin [veeresh]

     go

     sp_defaultdb [veeresh],[nokia]

     go

     sp_password null,[vee],[veeresh]

     go

     use [nokia]

     go

     sp_grantdbaccess [veeresh]

     go

     sp_addrolemember [db_datareader],[veeresh]

     go

     sp_addrolemember [db_denydatawriter],[veeresh]

     go

     sp_addrolemember [db_backupoperator],[veeresh]

     go

     sp_addrolemember [db_ddladmin],[veeresh]

     go

     

     go

    sp_helpuser [veeresh] 

    give me TSQL-Statements for the same....

     

     

  • sp_addrolemember [db_denydatawriter],[veeresh]

     

    This statement keeps him from modifying data - add him to the datawriter instead of denydatawriter role

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

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