Solved

SQL Server 2008 automate table update

Posted on 2011-09-26
6
241 Views
Last Modified: 2012-05-12
I need guidance on how best to automate the daily update of a table containing employee info for our company's intranet.
What happens today:
I have automated the first part of this task by scheduling a nightly extract out of our Peoplesoft system.  The resulting EXCEL file is then manually imported into the target SQL Server 2008 database table using the Import and Export Data (32-bit) utility pgm, which drops the existing data before importing the new stuff.  This is done from my PC, obviously.  I then manually verify the load was successful by using the SQL Server 2008 Management Studio and running a query to display the most recently added employee.  This table is a critical table providing employee reporting relationships on our (SharePoint) intranet.
While the entire process only takes a minute or two to complete, I'm wondering if this can be automated somehow.  Any suggestions?
0
Comment
Question by:OGSan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:mozcullu
ID: 36707650
on the last step of your import export utility there is an option to save that import job as an SSIS package. You can save its definition to filesystem of SQL Server. the second job is a SQL query. This job can be an scheduled SQL Agent job with 2 steps inside. 1st step type will be SQL Server Integration Services package and the second step will be Transact-SQL Script.
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 36707761
Its good to create SSIS package to get new or updated rows or create Replication
0
 
LVL 11

Expert Comment

by:SThaya
ID: 36708861
Hi,

  Create a Job sechdule in SQL job Agent and sechdule the package in your convinent timings .
 like 2 times in a day
 
0
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
LVL 1

Author Comment

by:OGSan
ID: 36712580
When I step through that Import/Export Utility, it displays a msg saying:
In SQL Server Express, Web, or Workgroup, you can run the package that the Import and Export Wizard creates, but cannot save it.  To save packages that the wizard creates, you must upgrade to SQL Server Standard, Enterprise, Developer or Evaluation.
I'm not sure how to get around this problem.
Any suggestions?
0
 
LVL 7

Accepted Solution

by:
mozcullu earned 500 total points
ID: 36715515
yes that is true.

to overcome this problem for the first step you can use linked server feature of sql and connect your excel file as a linked server to sql server and run a query to import your data to you database. here is an example how to connect excel as a linked server to SQL Server: http://blogs.msdn.com/b/rdas/archive/2008/08/15/excel-as-a-linked-server.aspx After connecing it you can run a distributed query to get data out of excel to SQL Server.

The second step remains the same.
0
 
LVL 1

Author Comment

by:OGSan
ID: 36719825
Thank you for that suggestion, mozcullu.  I'm working with our IT team now to get this done.  Yeehaw!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

752 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