How can we place a file in a particular location on a server

Posted on 2005-05-10
Last Modified: 2010-03-19
How to execute bcp (which calls xp_cmdshell using the SQLAgentCmdExec id) from within a stored procedure and copy data into an Excel file on a file server?  Does SQLAgentCmdExec need rights to the location on the file server?
Question by:charmedimsure
    1 Comment
    LVL 13

    Accepted Solution

    SQLAgentCmdExec is a proxy for non-sysadmins. Sysadmins are accessing files by xp_cmdshell under SQL Server account, users under SQLAgentCmdExec account. So it depends on user, general user must have access thru  SQLAgentCmdExec account.  

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now