Solved

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

Posted on 2009-04-15
4
538 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now