简体   繁体   中英

Append data to SQL Server from MS Access

I have an Access database that pulls info from SQL Server.

I have linked Access files that work perfectly but the down side is sometimes our connectivity is not great and populating SQL Server from MS Access is very slow.

What I would like to achieve is open the database in the morning have the data pulled down into access from SQL Server (Refresh), then work locally (offline mode) then at the end of the day hit a button that will append the changes into SQL Server.

Not sure exactly what this process is called sorry if this is already covered.

This process is called ETL - Extract, Translate, and Load.

I did this before when working in HR at a bank (SQL 2000 to MS ACCESS 2000).

Here are the steps you do.

1 - Remove all data from target table in MS ACCESS.

2 - Drop any indexes, they will just add extra time.

This step is optional.

3 - Make sure there is a linked source table in MS ACCESS.

4 - Create a append table query.  
     In SQL terms, INSERT INTO <target table> SELECT * FROM <source table>

5 - Add back the indexes you dropped.

     This step is needed if you did step 2.

The good part about MS Access is that this can all be wrapped up in a MACRO to be executed.

The only bad thing is that credentials have to be supplied to MS ACCESS.

If you look around, I am sure I have it in some deep dark corner of my software library that I have written, you can re-link them with a STANDARD SQL SERVER application account. Do this at start up.

Then, this issue will go away!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM