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


Exports in SQL Server


Exports in SQL Server

Author
Message
Ed.Edwards
Ed.Edwards
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 278
I don't understand why there are no export/import utilities in SQL Server. Oracle, DB2 (LUW), and MySQL have export and import utilities. SQL Server 6.5 had export/import utilities. With export/import utilities, one does not have to restore the entire database to recover data. You just restore the applicable table(s).

And, I would like to thank that the Microsoft SQL Server team is just as smart as the Oracle, DB2 (LUW), and MySQL teams!
crazy4sql
crazy4sql
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1469 Visits: 4461
just right click on database and select task option, you will be welcomed with import/export option

----------
Ashish
Ed.Edwards
Ed.Edwards
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 278
Exports in SQL Server

Is there a script to export only data in all user tables in SQL Server 2005 database?
crazy4sql
crazy4sql
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1469 Visits: 4461


Is there a script to export only data in all user tables in SQL Server 2005 database?


if you mean by 'export only data FROM all user tables' then yes select only users table and the data from those tables will be export to destination.

yes,before you blame me...... Limitation is one database at a time.

----------
Ashish
Ed.Edwards
Ed.Edwards
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 278
Exports in SQL Server

Thanks for the info. Also, I found this script to export only data in all user tables in a database (OnlineApplication). Now, I can put the output from the script below in a .bat job and schedule it to run daily.

use OnLineApplication

select 'bcp OnlineApplication..' +
name + ' out ' + name + '.txt -c -t , -r -e ' +
name + '.err -m100 -b500 -a4096 -S servername-U userid -P password'
from sys.tables
where name <> 'sysdiagrams'
order by name;
GilaMonster
GilaMonster
SSC Guru
SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)

Group: General Forum Members
Points: 71290 Visits: 44957
Ed.Edwards (9/22/2010)
I don't understand why there are no export/import utilities in SQL Server. Oracle, DB2 (LUW), and MySQL have export and import utilities. SQL Server 6.5 had export/import utilities.


You mean like bcp, BULK INSERT and SSIS?

You can set up an export package via the import/export wizard (right click a database, tasks-> export data), save the package and then set it up as a SQL Agent job. Same with an import wizard package

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Ed.Edwards
Ed.Edwards
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 278
Exports In SQL Server

To Gail Shaw,
Outstanding! Thanks for the info! Have a great day!
Ed.Edwards
Ed.Edwards
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 278
Exports In SQL Server

To Gail Shaw,
When I used the Export/Import Wizard via the instructions you send, it only let me pick one user table. How do I select all user tables in a database at one time?
GilaMonster
GilaMonster
SSC Guru
SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)

Group: General Forum Members
Points: 71290 Visits: 44957
If you right-click the database and select tasks -> export, the fourth page of the wizard allows you to select any number of tables and map them to a destination.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Ed.Edwards
Ed.Edwards
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 278
Exports In SQL Server

To Gail Shaw,
I am sorry that I did not explain clearly the task I was trying to do. The task I am trying to do is "export" only data in all user tables in a SQL Server database to .txt files (each individual .txt file for each user table).
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search