Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I do not have access to the server since I am not an administrator. But I need to export the result of a query to a TXT file. I do not have access to BCP or the xp_cmdshell store procedure. I require a solution that does not involve requesting execution permissions on the server.

What I have tried:

OPENROWSET but i don't know the version of Microsoft OLEDB are instaled
Posted
Updated 24-Jul-17 10:03am
Comments
Atlapure Ambrish 25-Jul-17 2:49am    
Have looked at this? it might be helpful to you.. https://stackoverflow.com/questions/9219557/creating-text-file-without-using-bcp-in-sql

1 solution

Hi,
You have to connect as minimum in order to run something on the server.
For this you need login (credentials) to authenticate :
- windows
- SQL user/password
In the both cases you should have minimum SELECT permissions on the objects you want to query.
If it is the case, no need xp_cmdshell enabled.
You can use :
1)BCP.exe which is part of almost any machine.
2)Powershell
3)ISQL
3)Any language to connect to server and execute queries.

GB
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900