sql2005创建远程登录帐户的sql语句
复制代码 代码如下:
/*创建服务器登录角色*/
CREATE LOGIN HNJM WITH PASSWORD='hnjmxy123'
/*打开指定数据库*/
USE [job]
GO
/*创建数据库角色 并关联服务器登录角色*/
CREATE USER HNJM FOR LOGIN HNJM
/*赋予某个表给角色权限*/
GRANT SELECT ON ServerAttachments TO HNJM
GRANT SELECT ON ServerCompanies TO HNJM
GRANT SELECT ON ServerDocument TO HNJM
GRANT SELECT ON ServerFrontUsers TO HNJM
GRANT SELECT ON ServerJobPostings TO HNJM
GRANT SELECT ON ServerRecommendedCompanies TO HNJM
GRANT SELECT ON ServerRecommendedPostings TO HNJM
GRANT SELECT ON ServerCompanyJobPostingUpdate TO HNJM
/*创建服务器登录角色*/
CREATE LOGIN HNJM WITH PASSWORD='hnjmxy123'
/*打开指定数据库*/
USE [job]
GO
/*创建数据库角色 并关联服务器登录角色*/
CREATE USER HNJM FOR LOGIN HNJM
/*赋予某个表给角色权限*/
GRANT SELECT ON ServerAttachments TO HNJM
GRANT SELECT ON ServerCompanies TO HNJM
GRANT SELECT ON ServerDocument TO HNJM
GRANT SELECT ON ServerFrontUsers TO HNJM
GRANT SELECT ON ServerJobPostings TO HNJM
GRANT SELECT ON ServerRecommendedCompanies TO HNJM
GRANT SELECT ON ServerRecommendedPostings TO HNJM
GRANT SELECT ON ServerCompanyJobPostingUpdate TO HNJM
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
本文地址:/shujuku/MsSQL/107828.html