December 29, 2005 at 3:34 pm
Hello,
I use to work with informix and was wondering if anyone knows the way in tsql to unload to a file
in informix it was
UNLOAD TO '/tmp/dump.txt' SELECT * FROM tablename;
Thanks in advanced
December 29, 2005 at 4:39 pm
December 29, 2005 at 10:15 pm
Trigger,
How do you use BCP from T-SQL without using xp_CmdShell which is normally off limits to all but those members of the SA role?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 29, 2005 at 10:46 pm
osql from the command line with a script might be easier, but it's not T-SQL.
December 30, 2005 at 3:20 am
bcp isn't by far T-SQL either, it's a commandline exe just like isql and osql. You do need to use xp_cmdshell for all of these if you want to exec them from T-SQL code.
BULK INSERT is T-SQL, however it only does load from file, not unload to file.
xp_cmdshell by default is sa/sysadmin only privs required, however you can use the proxy account for non-admin users to use xp_cmdshell
/Kenneth
December 30, 2005 at 12:02 pm
Steve and Ken...
Yup, I knew that... I just thought that since Trigger recommended it as a T_SQL command, there might be some neat trick he was using to use it without xp_CmdShell and I wanted to know what the trick was...
Trigger?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 2, 2006 at 4:14 pm
January 2, 2006 at 7:43 pm
That's what I thought... thanks for the feedback, Trigger.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy