本地登录,或sa登录
执行SQL
例如: 用户名:bbbb,数据库名:aaaa
create login bbbb
with password = '密码',
DEFAULT_DATABASE = [aaaa],
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
DENY VIEW any DATABASE TO PUBLIC;
ALTER AUTHORIZATION ON DATABASE::[aaaa] TO bbb
本地登录,或sa登录
执行SQL
例如: 用户名:bbbb,数据库名:aaaa
create login bbbb
with password = '密码',
DEFAULT_DATABASE = [aaaa],
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
DENY VIEW any DATABASE TO PUBLIC;
ALTER AUTHORIZATION ON DATABASE::[aaaa] TO bbb