Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

BCP OUT tables from any database

By SanjayAttray,

This script will help DBA's who wants to BCP out required tables form any database. This script can be run through as a job. Before running you have to create a table in any given database and store the table names in it, which you want to Bulk copy. Query in this procedure will check the table for table names and will copy data in .txt files and store the out put in given path.

(You can change the paths for storing the out put and data text files. Also change the database name. By default I have given pubs..)

Total article views: 267 | Views in the last 30 days: 1
 
Related Articles
BLOG

SQL Script to search stored procedures containing a given text

Sometimes we need to find out how many stored procedures contains a given text. Below SQL query can ...

FORUM

minimum roles (server/database) should be given to a user to run jobs

minimum roles (server/database) should be given to a user to run jobs

FORUM

stored procedures in a database

stored procedures in a database

FORUM

Synonym-Given String

Sql Server Query -help(Synonym for Given String)

FORUM

"USE DATABASE" in stored procedure workaround?

2 customer databases using the same stored procedure

 
Contribute