Speed up export from SQL server 2008 R2 to Microsoft Access - sql-server

I need to export 700,000 records from an SQL Server 2008 R2 table to a Microsoft Access database in 2002-2003 format. I am using the SQL Server Import and Export Wizard. This is currently taking over 2.5 hours. Because this is all taking place on a high secure server I am limited in my choice of tools. I could export to a text file but that loses some of the formatting.
I need a copy of one table from the database in either Access or Excel with formatting preserved. Exporting to text/CSV is not available as some of the fields may have commas. Also I cannot use Excel as the target because 2008 R2 does not support mode that 64K rows
Are there any ways to speed this us?

Using Access it should be a snap:
Link the table via ODBC, create an empty table in Access as it should appear.
Then run an append query using the linked table as source, and writing the data to the local table. The query can also rename the fields (alias) and perform minor modifications as to your needs.
If you don't have Access (Office) 2016 installed, I believe a 30 day evaluation version is for download.

Related

Export SQL Server 2019 database to pure SQL (UTF-8)

I have some problems moving a database to another computer having tried both manual-file-copy with attach in SSMS and backup/restore in SSMS (Moving SQL Server 2019 database to another computer).
However the entire database is only a few tables and 15 megabytes.
So why not simply export to pure SQL I am thinking... That could work for me in this case. So in SSMS I right click database, tasks and select export data...
It appears the closest I can get in SSMS is picking "flatfile" which is essentially a CSV file which can contain single table... I want a SQL file that can create database, tables, add data etc.
What am I overlooking? Is this not possible in SSMS?

Oracle to SQLServer export

I have to move data from existing database oracle to which I don't have direct access. The data is about 11 tables, 5GB each. The database admin can export the tables to some .csv or xml. The problem with csv is that some data is textual with lots of special characters. The problem with xml is that the markup is an overhead which will increase significantly the size of the files. The DBA admin is not competent enough to provide a working and neat solution. He uses toad as the database tool. Can you provide some ideas how to perform such a migration in the best possible way?
Please refer the below steps to migrate the data from Oracle to SQL server.
Recommended Migration Process
To successfully migrate objects and data from Oracle databases to SQL Server, Azure SQL DB, or Azure SQL Data Warehouse, use the following process:
1.Create a new SSMA project.
2.After you create the project, you can set project conversion, migration, and type mapping options. For information about project settings, see Setting Project Options (OracleToSQL). For information about how to customize data type mappings, see Mapping Oracle and SQL Server Data Types (OracleToSQL).
3.Connect to the Oracle database server.
4.Connect to an instance of SQL Server.
5.Map Oracle database schemas to SQL Server database schemas.
6.Optionally, Create assessment reports to assess database objects for conversion and estimate the conversion time.
7.Convert Oracle database schemas into SQL Server schemas.
8.Load the converted database objects into SQL Server.
You can do this in one of the following ways:
* Save a script and run it in SQL Server.
* Synchronize the database objects.
9. Migrate data to SQL Server.
10.If necessary, update database applications.
For more details :
[https://learn.microsoft.com/en-us/sql/ssma/oracle/migrating-oracle-databases-to-sql-server-oracletosql?view=sql-server-2017]
After the admin export data into CSV, try to convert it into a character set which will recognize all special characters.
Then, try to follow the steps from this link: link, it might work.
If after the import, there are still special characters, thy to manually convert them.
Get the DBA to export the tables using the ASCII delimiters which were designed for this purpose:
Row delimiter: Decimal 30 / 0x1E
Column delimiter: Decimal 31 / 0x1F
Then you can use BCP (or any other similar product) to upload the data to SQL Server.

Possible ways to migrate data from MS Access to SQL Server 2008 Express

I have database in MS Access in which new table is generated to store the records of each day. I want to transfer the data from the current day table to SQL Server Table.
In SQL server I have only one table and Data will append everyday.
What are the possible ways to achieve this functionality.
Thanks
There are many ways you can do this.The one is Import Export Wizard which is listed below:
1) Using Import-Export wizard: This will do is get the data from source (for you will be Access) and put it in Destination database ( which will be SQL Server)
You can call this package through SQL Agent ( you can make it run every day, weekly, monthly)
Import and Export wizard
http://www.packtpub.com/article/transferring-data-ms-access-2003-to-sql-server-2008
I would explore creating a Linked Server to Access, and create a stored procedure to load the data, which you could schedule with the Windows Task Scheduler and sqlcmd.
Taken from MSDN post
http://social.msdn.microsoft.com/forums/sqlserver/en-US/015d8295-a57a-4dc9-b3e2-6da1cfe8ab6d/convert-an-access-db-to-sqlexpress
Access has a tool called the Upsize Wizard built directly into the product to help you do this. A second alternative is the SQL Server Migration Assistant for Access, which you can learn about here http://technet.microsoft.com/en-us/library/hh313039.aspx.
Download link below
http://www.microsoft.com/en-in/download/details.aspx?id=28763

Bulk export of data from SQL Server 2008 into XML file (without using BCP)

I have a requirement whereby I need to refresh databases on Server A with data from Server B (the schemas will always be the same) with subsets of data
Unfortunately, due to the way the servers have been set up and are run (hosted), the option of using BCP is not available to me. Also, the servers may not be able to see each other/are linked so a SP on Server B will not be able to access Server A directly.
Because of this, my plan is to run an export procedure on Server A to create a file (XML?) which is placed on to a location available to Server B. I would then create a procedure on Server B to consume the data into the database
My question is: without the use of BCP, what options are available to me for the bulk exporting of data (with selection criteria) from my source server? And does my plan sound sensible? Am I missing any obvious approach/have others solved this problem before?
Helo Mike,
have you considered using of SQL Server Integration Services? You could export your data by dynamic SELECT statemenet save them into binary file and transfer them (FTP) to the second locality for loading.

How can I migrate database from SQL Server 2008 to SQL Server 2000

I am replacing an Access application with a web app, but the client is using SQL Server 2000, and I am using SQL Server 2008.
So, I have the database redesigned, with foreign keys, but now I need to get the data on the client's system.
Part of the problem is that they have images that are over 32k, so osql failed as the command buffer filled up.
I should be able to use osql to import the new schema at least, and perhaps all of the data except for the images.
The Export wizard just wouldn't work, even though I tried the Native SQL Driver and the OLE DB Sql Driver.
Flat files seems like a bad choice, as I don't know if it can do the images.
So, what is a good way to copy a 330M database from 2008 -> 2000?
Not sure about performance or time needed, but you could always try a tool like
Red-Gate SQL Compare / SQL Data Compare
Apex SQL Diff / SQL Data Diff
These will allow you to compare both the schema of two databases, as well as the data, and allow you to create synchronization scripts, or synchronize online.
Marc
I set the image column to null, which reduced the size of the insert statements.
This enabled me to import the data into the target database.

Resources