SQL Server 2005创建远程登录帐户的SQL语句

栏目:MSSQL 来源:网络 关注: 时间:2019-11-30
/*创建服务器登录角色*/
CREATE LOGIN xyz WITH PASSWORD='xyz123'
/*打开指定数据库*/
USE [job]
GO
/*创建数据库角色 并关联服务器登录角色*/
CREATE USER xyz FOR LOGIN xyz
/*赋予某个表给角色权限*/
GRANT SELECT ON ServerAttachments TO xyz
GRANT SELECT ON ServerCompanies TO xyz
GRANT SELECT ON ServerDocument TO xyz
GRANT SELECT ON ServerFrontUsers TO xyz
GRANT SELECT ON ServerJobPostings TO xyz
GRANT SELECT ON ServerRecommendedCompanies TO xyz
GRANT SELECT ON ServerRecommendedPostings TO xyz
GRANT SELECT ON ServerCompanyJobPostingUpdate TO xyz

本文标题:SQL Server 2005创建远程登录帐户的SQL语句
本文地址:http://www.q0738.com/mssql/1475.html