I would recommend setting up a SSIS ETL Process to transfer the data. You can set a flag in a control table that is checked every few minutes by a job, and it the flag is found the Job will start the ETL Process (SSIS formerly DTS)... then delete the flag from the table.
Another approach is to use a SQL Server Stored Procedure that will simply execute a few TSQL commands...
- Trauncate Target Table
- Select * INTO Target Table from Source Table
And, if really needed you can execute the TSQL commands above directly from MS Access via ADO Calls in VBA Code provided you have the necessary SQL Server Permissions and ADO connection set up.
Thanks for the thoughts. I'll look into those. I'm afraid I may not have appropriate permissions. Of course, I could get those permissions, if that ends up being best and gets approved, but I'm really hoping to get this setup for someone else.. and they may not then have the right permissions. So, I'll look, but may end up just leaving this part manual, and automate the rest... I'll keep thinking though, and looking... Thanks for the suggestions. I'll post back and let you know what if any of that I can use..
Thanks as well for any other thoughts or suggestions..
Alright, I sorted out a solution. I'll basically be using passthrough queries via VBA to do the work. The servers have a connection between them already, so I can just do straight queries.
What I'll do is use Chunking to keep from overloading the connection, since the recordset is currently at 150k records and growing - only 5 or 6 columns, but still 150k records. That's not super terrible, but I'll chunk it just to make sure no issues arise.
So it'll be like this:
--If the table exists on the "to" server, then drop it.
--create the table on the "to" server.
--Insert into the "to" server table, Select * from the "from" from server table, chunked sets..
I tested it with 1,000 rows and it worked perfectly.
What I'll have is a couple of passthrough query objects set up, and I'll modify the SQL of those objects for each step, run, and move on to the next step afterwards.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.