MS SQL 2000 Assigning permissions

Source: Internet
Author: User

/** Assigning Permissions **/

Use [master]
Create login [Ln-tf\liaobin] from windows;
Go
Grant control server to [Ln-tf\liaobin]; --Give administrators Full Control permissions
Go

Create login [ln-tf\shipping staff] from windows
With Default_database=[db_packs];
Go

use [db_packs];
Go
Create user ln_shp for login [ln-tf\shipping staff];
Go
--Grant the packing section table operation permission
Grant Select,delete,update,insert on database::d b_packs to [ln_shp];
Go

use [master];
Go
Create DATABASE [DEMO1];
Go
use [demo1];
Go
Create schema Sch_demo1;
Go
CREATE TABLE table1 (tid int);
CREATE TABLE table2 (tid int);
Go
CREATE TABLE Sch_demo1.table3 (tid int);
Go
Create login [Ln-tf\liaobin] from Windows
With Default_database=demo1;
Go

/** SQL 2000 Assigning permissions **/
use [db_packs];
Go
Sp_adduser @loginame = ' Ln-tf\liaobin '
Go


Use [master]
EXEC sp_grantlogin [Ln-tf\liaobin];
Go
Grant all to [Ln-tf\liaobin] with GRANT option; --Give administrators Full Control permissions
Go
EXEC sp_grantlogin [ln-tf\shipping staff];
Go

--Grant the packing section table operation permission
Grant Select,delete,update,insert on Db_packs to [ln-tf\shipping staff];
Go

MS SQL 2000 Assigning permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.