Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-02-27 : 02:58:40
|
| Is there any idea regarding query to delete any operating system file from sql server.Basically i want to delete temp files in tmp folder of Windows.-----sim |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-27 : 03:34:42
|
| Youc can make use of xp_cmdshell provided SQL Server has access to the specified folder.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-02-27 : 04:33:46
|
| now the error is:Msg 15281, Level 16, State 1, Procedure xp_cmdshell, Line 1SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online. |
 |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-02-27 : 04:35:15
|
| thanx i got it...-- To allow advanced options to be changed.EXEC sp_configure 'show advanced options', 1GO-- To update the currently configured value for advanced options.RECONFIGUREGO-- To enable the feature.EXEC sp_configure 'xp_cmdshell', 1GO-- To update the currently configured value for this feature.RECONFIGUREGO |
 |
|
|
|
|
|