SQL修改数据库的系统时间

1.启用sp_configure
-- To allow advanced options to be changed. EXEC sp_configure 'show advanced options', 1 GO -- To update the currently configured value for advanced options. RECONFIGURE GO -- To enable the feature. EXEC sp_configure 'xp_cmdshell', 1 GO -- To update the currently configured value for this feature. RECONFIGURE GO

2.修改系统时间
exec master..xp_cmdshell 'date 2008-10-23' 
exec master..xp_cmdshell 'time 11:30:15'
posted @ 2014-03-21 09:57  宋佳莉  阅读(2537)  评论(0)    收藏  举报