The script mentioned below will export data in all tables into textfiles to a physical path on your system using BCP utility from a Database. The sql commands used in this stored procedure are BCP utility,Identity function and temporary tables.
Here you required to give 4 input parameters, they are path to export data to textfiles,user name of the database, password of that database and servername.
For example EXEC USP_BCPOUT 'C:\TEMP\','SA','',''
2001-08-22
729 reads