we can get directory information by EnumDirectories method of sql server
object from a remote sql server, but how can I get the files under a special
directory on a remote sql server?
I tried finding result in MSDN, but I can't get it. Any one can help me?
Thanks in advance.
Bill WhiteBill White wrote:
> we can get directory information by EnumDirectories method of sql
> server object from a remote sql server, but how can I get the files
> under a special directory on a remote sql server?
> I tried finding result in MSDN, but I can't get it. Any one can help
> me?
> Thanks in advance.
> Bill White
From SQL Server?
Exec master..xp_cmdshell N'DIR C:\MyFolder\*.*'
You can create a temp table and insert the results of xp_cmdshell into
the temp table for processing if you need to. If this is SQL 2005, then
xp_cmdshell could be disabled on the server.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||It's a good idea, but I have another question about it.
Does SQL Server do it in this manner? or does it by another unopened method?
Thanks a lot.
Bill White
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:u4i%23wJL9FHA.2816@.tk2msftngp13.phx.gbl...
Bill White wrote:
> we can get directory information by EnumDirectories method of sql
> server object from a remote sql server, but how can I get the files
> under a special directory on a remote sql server?
> I tried finding result in MSDN, but I can't get it. Any one can help
> me?
> Thanks in advance.
> Bill White
From SQL Server?
Exec master..xp_cmdshell N'DIR C:\MyFolder\*.*'
You can create a temp table and insert the results of xp_cmdshell into
the temp table for processing if you need to. If this is SQL 2005, then
xp_cmdshell could be disabled on the server.
David Gugick
Quest Software
www.imceda.com
www.quest.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment