Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Exports in SQL Server Expand / Collapse
Author
Message
Posted Wednesday, September 22, 2010 2:42 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:01 PM
Points: 12, Visits: 161
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!
Post #990936
Posted Wednesday, September 22, 2010 2:46 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 12:45 AM
Points: 876, Visits: 3,952

just right click on database and select task option, you will be welcomed with import/export option


----------
Ashish
Post #990939
Posted Wednesday, September 22, 2010 3:08 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:01 PM
Points: 12, Visits: 161
Exports in SQL Server

Is there a script to export only data in all user tables in SQL Server 2005 database?
Post #990948
Posted Wednesday, September 22, 2010 3:16 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 12:45 AM
Points: 876, Visits: 3,952


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
Post #990953
Posted Wednesday, September 22, 2010 3:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:01 PM
Points: 12, Visits: 161
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;

Post #990964
Posted Wednesday, September 22, 2010 3:49 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:19 AM
Points: 41,558, Visits: 34,480
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 2008, MVP
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

Post #990977
Posted Wednesday, September 22, 2010 3:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:01 PM
Points: 12, Visits: 161
Exports In SQL Server

To Gail Shaw,
Outstanding! Thanks for the info! Have a great day!
Post #990983
Posted Wednesday, September 22, 2010 4:07 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:01 PM
Points: 12, Visits: 161
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?

Post #990992
Posted Wednesday, September 22, 2010 4:11 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:19 AM
Points: 41,558, Visits: 34,480
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 2008, MVP
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

Post #990995
Posted Wednesday, September 22, 2010 4:19 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:01 PM
Points: 12, Visits: 161
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).

Post #990997
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse