I am trying to bulk export data from several tables to separate CSV files. I created a small .bat file to do the lift, but it keeps failing.
Here is the code:
bcp DB_name.Table_Name out C:\path_to_local_folder\table1.csv -S server_name\DB_Name -T
I don't know what I'm missing here, because this seems so simple, but I just can't get this to spit out any data. I'm guessing it doesn't work because the database is on a remote server, and I'm trying to dump the data to my local drive. Maybe that's the issue. Not sure.
I also tried the script from the link below, and that didn't do anything either.
SQL Server Management Studio 2012 - Export all tables of database as csv
Any thoughts, anyone?