Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a an access DB that is to be eventually be replaced by a SQL DB with a web front end. The web application is currently in development. I have copied the Access DB to SQL using the Migration Assistant, unfortunately we can't just link the Access front-end to the SQL DB and use only the SQL DB, they must remain separate until we can switch from one to the other. Therefore there is data being added to the Access DB that I need to regularly copy to the SQL db.

Is there a script or easy process that will copy just the data from the Access tables to the SQL ones, that I can run as a scheduled task once a week?

share|improve this question

5 Answers 5

up vote 2 down vote accepted

As well as the SSIS option, you can link directly to an access DB in SQL Server as if the database was any other linked database. You can use this to copy data accross using a task scheduled by the SQL Server Agent or some other task runner. For instance a simple "completely refresh one table from the Access DB" job might look like:

EXEC sp_addlinkedserver
   @server = 'mdb',
   @provider = 'Microsoft.Jet.OLEDB.4.0',
   @srvproduct = 'OLE DB Provider for Jet',
   @datasrc = 'c:\path\to\db\db.mdb'
GO
DELETE table_to_refresh
INSERT table_to_refresh SELECT * FROM mdb...table_to_refresh_from
GO
EXEC sp_dropserver 'mdb', NULL
GO

I've used this as a quick way to copy data from an Access DB when other tools like SSIS were not available. You can use the tables (and, I assume, views) in the DB just like any other, so you are not limited to simple "select all" queries as the example above.

share|improve this answer

Not that you or I have any say on the matter but I'd push for getting the Access app upsized to SQL Server. Then develop just the functionality required for Web access which may not be a lot depending on the requirements. Leave as much functionality in the Access app as possible simply because it's a better RAD tool.

share|improve this answer

You may use SSIS packages and save them to disk. See http://msdn.microsoft.com/en-us/library/ms141209.aspx as a starting point and also check out http://www.codeproject.com/KB/aspnet/Schedule__Run__SSIS__DTS.aspx

share|improve this answer

Another easy way to import data from a MS Access source is to import the data directly through the management studio. Right click the database > Tasks > Import.

I found this worked a lot easier than using SSIS or the migration tool.

share|improve this answer

Access to MSSQL might be useful: http://www.bullzip.com/products/a2s/info.php

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.