Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Unanswered: List the folder contents using SQL

    Hi all,
    I have built a Disaster Recovery Site for my DB.on periodic basis, trn files from production server reach DR server and DR setup will apply them locally.

    If the flow is smooth then no issues, if one of the file does not reach DR
    the entire setup will halt for the want of the file and I dn't have any means to
    know which file is missing.

    Both my production and DR site located remotely behind firewalls, i.e i can't
    physically access the servers or remotely login to the server.

    Can anyone tell me how to see the contents in a folder in the server using
    SQL query .

    Any help is highly appreciated

    Thanks and Regards
    Srinivas Varanasi

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd use xp_cmdshell.

    -PatP

  3. #3
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    use

    master..xp_cmdshell 'dir c:\'

  4. #4
    Join Date
    Feb 2004
    Location
    india
    Posts
    67
    Thanks Pat.

  5. #5
    Join Date
    Feb 2004
    Location
    india
    Posts
    67
    Harshal, sorry to find "STUPID" as Ur Signature
    Last edited by vrsrinivas; 06-15-04 at 04:28. Reason: misspell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •