Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO SCRIPT THE DATA ONLY 1

Status
Not open for further replies.

JOHN94

Technical User
Nov 13, 2001
11
0
0
FR
HOW COULD I SCRIPT ONLY THE DATAS ON SQL SERVER 7.0 ?????
thanks !!
 
Try using XML AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
XML ?? Explain... i don t know XML
 
XML is a programing laguage that is used mostly to wrap data, basicaly what it does is scripts the data into a format that is easy to understand and present it.
It is not hard to learn though you can get an visual tool to do it for you. AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 

John,

Explain what you mean by "script only the datas."

Thanks, Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Well : in enterprise manager i succeed in scripting :

*tables
*users
*roles
*permissions

in one script...

But i d like to have the datas of all the tables too...
do you understand ?

thanks !
 

I understand the question now but not your purpose. If you want to export or transfer the data, use DTS or BCP. You can't "script" data in the same manner as you script database objects. Scripts drop and/or create objects. You don't drop/create data.

Perhaps you could give more detail about your process and what you need to accomplish. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
of course : i have to change the codepage of sql server...
so i have to rebuild the master database.

then i will generate the scripts : databases , roles , users and permission

but for the datas.. ? how could i do ?
 
You will need to use BCP or DTS to export and then import the data. Check out a stored procedure uploaded by Jeroen Meijerink to SWYNK.COM. The procedure, sp_bcpout_alltables.sql, will export alll tables in a database. Download the procedure from the following link.

Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
thanks : could you pleas explain me how to use this script ?
 

The script creates a stored procedure. Open a database such as master. Run the script to create the stored procedure. Make sure you review the script first to change the BCP login and password as needed for your server.

You execute the stored procedure with two parameters, database name and path for the data.

exec master.dbo.BCP_out_AllTables 'MyDatabase', 'c:\mysqldata\'

All the data will be dumped to the specified directory. You will need to use BCP or DTS to import the data after changing the code page. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
could you please explain me how to import the data : i don t understand... sorry. how could i import files with DTS ???

thanks


 

Use the Import/Export wizard to set up a DTS package. It will allow you to choose an input file and the destination table. You'll need to create a package for each file if you use the wizard. When you become comfortable with DTS pacakages, you can create multiple transfers in one package. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top