SQL SERVER sp_configure 配置并通过 xp_cmdshell 调用控制台程序
2012-04-09 15:56
393 查看
-- 启用 cmdshell 权限
EXEC sp_configure 'show advanced options', 1
GO
-- 重新配置
RECONFIGURE
GO
-- 启用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
--重新配置
RECONFIGURE
GO
-- 启用 cmdshell 才能正常运行
exec xp_cmdshell 'java -jar "C:\HelloWorld.jar'
-- 禁止用 cmdshell 权限
EXEC sp_configure 'show advanced options', 1
GO
-- 重新配置
RECONFIGURE
GO
-- 启用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 0
GO
--重新配置
RECONFIGURE
GO
// Java 代码
public class HelloWorld
{
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
System.out.print("HelloWorld.");
}
}
EXEC sp_configure 'show advanced options', 1
GO
-- 重新配置
RECONFIGURE
GO
-- 启用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
--重新配置
RECONFIGURE
GO
-- 启用 cmdshell 才能正常运行
exec xp_cmdshell 'java -jar "C:\HelloWorld.jar'
-- 禁止用 cmdshell 权限
EXEC sp_configure 'show advanced options', 1
GO
-- 重新配置
RECONFIGURE
GO
-- 启用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 0
GO
--重新配置
RECONFIGURE
GO
// Java 代码
public class HelloWorld
{
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
System.out.print("HelloWorld.");
}
}
相关文章推荐
- SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_co
- 调用SERVER的系统过程xp_cmdshell发生错误:xpsql.cpp:错误来自GetProxyAccount
- 报的错误是:创建userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings 的配置节处理程序时出错:
- Microsoft OLE DB Provider for SQL Server (0x80040E14) 已拒绝对 OLE DB 提供程序 'Microsoft.Jet.OLEDB.4.0' 的特殊访问。必须通过链接服务器来访问此提供程序。
- MS sqlserver 数据库异地备份到其他计算机(xp_cmdshell)
- SQL 不常用的一些命令sp_OACreate,xp_cmdshell,sp_makewebtask
- 打开sql的xp_cmdshell配置
- SQL Server 阻止了对组件“Ad Hoc Distributed Queries”的 STATEMENT“OpenRowset/OpenDatasource”的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用“Ad Hoc Distributed Queries”。有关启用“Ad Hoc Distributed Queries”
- sql_server sa开启xp_cmdshell
- A Security Problem Caused by xp_cmdshell in SQL Server.
- SQL Server sp_configure 控制内存使用
- python写的调用ms sqlserver数据并发送邮件的小程序
- Configure Always On Availability Group for SQL Server on Ubuntu——Ubuntu上配置SQL Server Always On Avail
- 代理 XP”组件已作为此服务器安全配置的一部分被关闭。系统管理员可以使用 sp_configure 来启用“代理 XP”。
- sqlserver setting(sp_configure,alter database,set)
- 通过 sp_configure 进行 Database Mail 配置
- python写的调用ms sqlserver数据并发送邮件的小程序
- sql server xp_cmdshell 过程中报错原因
- Dos打开sp_configure启用xp_cmdshell
- MicroSoft SQL Server Manager 通过ODBC与VS进行连接操作示例程序