Solved

SQL Server 2008 automate table update

Posted on 2011-09-26
6
235 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
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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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 setup several different housekeeping processes for a SQL Server.

832 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