Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6817705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:05:17+00:00 2026-05-26T21:05:17+00:00

I have two servers on my network, one for RDBMS (Sql Server 2005) and

  • 0

I have two servers on my network, one for RDBMS (Sql Server 2005) and the second is Web Server (which runs IIS 7.5).

RDBMS server’s local IP is 192.168.1.5 and UNC name is DataOne

Web Server’s local IP is 192.168.1.4 and UNC name is FirmWebOne

With following block i can run a query and create a xml file on C: for the RDBMS server machine.
It works fine.

DECLARE @FileName VARCHAR(50)
DECLARE @SQLCmd   VARCHAR(500)

SELECT  @FileName = N'\\192.168.1.5\c$\trial_1.xml'

SELECT  @SQLCmd = 'bcp ' +
 '"SELECT I.code,L.name  ' +

' FROM Portal.dbo.inventory I LEFT JOIN Portal.dbo.inventoryLocalization L ON I.code = L.code AND L.language =''en'' ' +

' FOR XML PATH(''Product''), ROOT(''Products''), TYPE "' +

' queryout '  + @FileName +
' -w -T -S' + @@ServerName

SELECT @SQLCmd AS 'Command to execute'

EXECUTE master..xp_cmdshell @SQLCmd

Can i create that xml file on Web Server disk ?

I have tired Web Server’s IP as N’\192.168.1.4\c$\trial_1.xml’

and web server’s UNC address as N’\FirmWebOne\c$\trial_1.xml’

but it returns following errors.

SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file

Any idea ?

Thanks in advance…

PS:by the way, i have checked the account with EXECUTE master..xp_cmdshell ‘whoami.exe’
it returns nt authority\system and this account have permissions on the network

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:05:18+00:00Added an answer on May 26, 2026 at 9:05 pm

    NT Authority\System is a local user and I guess you didn’t explicitly give permissions to him on \FirmWebOne\c$.
    I would change account under which xp_cmdshell is running by setting proxy account. Then you can grant access to this user on \FirmWebOne\c$

    BTW: I’d better avoid using C$ and create a share folder. It’s more manageable and secure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if i have two IIS servers 5v on one network running winxp each hosting
I have two SQL Server 2005 databases, one is for development and the other
We have two servers in the same network. One of them is the server
I have two servers where I installed SQL Server 2008 Production: RAID 1 on
You have two servers when you perform a SQL Server database mirroring You have
I have two grails servers: Server - has read/write access to the database Web
Scenario. I have a client with two network connections to a server. One connection
I have a server with two different network interfaces, each with a different IP
I have two servers - one Django, the other likely to be written in
I have two IIS servers running using NLB. Unfortunatelly I cannot use shared session

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.