Solved

Creating a Script to schedule a data dump from SQL Server 2005 to Access

Posted on 2009-04-15
4
539 Views
Last Modified: 2012-05-06
Hi there,
I have a db in SQL Server 2005 and would like to dump all the data from one table on to an Access db on the same computer. This job would be running twice, @ 8 AM/PM. What would be the best procedure to do this? Create a Job? Package in SSIS? I'm not that familiar with SSIS...
Also, the destination table has different field names than the source table, so mapping would probably come into play.
I'm a little comfortable with the insert statement, it's the scripting from SQL Server to Access is what I'm having trouble with...

Thanks for your input,
Classic
0
Comment
Question by:Classic1
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 500 total points
ID: 24149486
you can create one linked server and create one job which will dump your data from SQL Server to linked access table. here is one example to create linked server with Access

http://www.sqlhub.com/2009/03/linked-server-in-sql-server-2005-from.html
0
 

Author Comment

by:Classic1
ID: 24150557
Hi there,
Thanks for the link, the sp_addlinkedserver worked well! I was able to execute a select statement within SQL...

Now is there a chance I can do an insert statement to the linked Access db? I tried doing this, but I got this error: (This was executed in the actual db, not in the master environment.

Msg 215, Level 16, State 1, Line 1
Parameters supplied for object 'AutoSolLink...AuditTrail' which is not a function. If the parameters are intended as a table hint, a WITH keyword is required.

I've attached the code as well..

Much appreciated,
Classic
Insert into [AutoSolLink]...AuditTrail ('Data1', 'Data2')
Select ADR.Reg_000, ADR.Reg_001
from MercuryAuditDRecords ADR

Open in new window

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24150652
run this

Insert into [AutoSolLink]...AuditTrail (Data1, Data2)
Select ADR.Reg_000, ADR.Reg_001
from MercuryAuditDRecords ADR

Open in new window

0
 

Author Closing Comment

by:Classic1
ID: 31570480
Thank you very much! I was able to insert the data successfully...much appreciated,
Classic
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about achieving the basic levels of HRIS security in the workplace.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question