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 |
gpc44
Starting Member
35 Posts |
Posted - 2013-03-07 : 10:36:42
|
Hello,Is there a way to create a T-SQL an empty text file in the file system - no xp and sp_configure?RegardsNicole |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-03-07 : 10:45:37
|
You mean without using xp_cmdshell? You could use a CLR stored procedure. (You would need to mark the stored proc for EXTERNAL_ACCESS for it to have sufficient privilege to create files in the OS file system) |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-03-07 : 11:28:28
|
You could use sp_OACreate and create and instance of the FileSystemObject...assuming that OLE Automation is enabled and you (and the service account) have enough permissions.Not the best idea usually though. What is it that you need to accomplish? May be a better way...EDIT: 2nd link didn't format right...should be: http://msdn.microsoft.com/en-us/library/aa242706(v=vs.60).aspx |
|
|
|
|
|