|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
xp_cmdshell to open/close fileHi all,
Does any one know tsql syntax to open and close a file on network drive? Of course this command should execute in proper security context. TIA.. Sqlster,
What are you trying to do? Open the file with what? HTH Jerry Show quote "sqlster" <nospam@nospam.com> wrote in message news:89729D7E-E476-420D-872D-48795088DCE5@microsoft.com... > Hi all, > > Does any one know tsql syntax to open and close a file on network drive? > > Of course this command should execute in proper security context. > > TIA.. What do you mean by "open and close a file"? You can import a file using BCP
or DTS. -- Show quoteDavid Portas SQL Server MVP -- "sqlster" wrote: > Hi all, > > Does any one know tsql syntax to open and close a file on network drive? > > Of course this command should execute in proper security context. > > TIA.. Please excuse me for not providing some background early on.
The asp.net application caches some values that its not supposed to. The new ..net code to fix that issue will not go into production for some weeks. In the mean time, we just open/close the web.config manually to refresh the cache. One way to address this issue would be is to write a sql job that on a nightly basis would simply open/close the web.config to refresh the cache. My intention is to have a very short term solution to address this issue immediately. TIA... Show quote "David Portas" wrote: > What do you mean by "open and close a file"? You can import a file using BCP > or DTS. > > -- > David Portas > SQL Server MVP > -- > > > > "sqlster" wrote: > > > Hi all, > > > > Does any one know tsql syntax to open and close a file on network drive? > > > > Of course this command should execute in proper security context. > > > > TIA.. I wouldn't choose T-SQL to do this. I'd use a BAT/CMD, EXE or VBScript as a
Scheduled Task in Windows or you could use a scheduled SQL job as well. HTH Jerry Show quote "sqlster" <nospam@nospam.com> wrote in message news:569737E7-ED64-43EA-95F5-6BD022DA62A1@microsoft.com... > Please excuse me for not providing some background early on. > > The asp.net application caches some values that its not supposed to. The > new > .net code to fix that issue will not go into production for some weeks. In > the mean time, we just open/close the web.config manually to refresh the > cache. > > One way to address this issue would be is to write a sql job that on a > nightly basis would simply open/close the web.config to refresh the cache. > > My intention is to have a very short term solution to address this issue > immediately. > > TIA... > > "David Portas" wrote: > >> What do you mean by "open and close a file"? You can import a file using >> BCP >> or DTS. >> >> -- >> David Portas >> SQL Server MVP >> -- >> >> >> >> "sqlster" wrote: >> >> > Hi all, >> > >> > Does any one know tsql syntax to open and close a file on network >> > drive? >> > >> > Of course this command should execute in proper security context. >> > >> > TIA.. |
|||||||||||||||||||||||