MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 30th, 2004, 12:03 PM
vule vule is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 7 vule User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How to write Script to update the database?

Hi folks,
Do you guys know how to write the Script to update the SQL database? please help me out? For example, the script will update SQL database at 1:00 am every day...some like that?

Thanks,
Vu

Reply With Quote
  #2  
Old May 12th, 2004, 02:05 AM
Zveroa Zveroa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 6 Zveroa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't think you can write a perioded script in SQL. But if you write the script that shall be ran at 1:00 am every night, you can set up a scheduled task (XP) or by using at-command for earlier NT versions. I think the AT command is part of the old SDK for NT.

Reply With Quote
  #3  
Old May 12th, 2004, 08:13 AM
punkisdead's Avatar
punkisdead punkisdead is offline
Moron
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Michigan, USA
Posts: 170 punkisdead User rank is Private First Class (20 - 50 Reputation Level)punkisdead User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 10 h 31 m 37 sec
Reputation Power: 6
You could create a DTS package and schedule that to run every night at 1:00am....

Reply With Quote
  #4  
Old November 24th, 2004, 04:53 AM
fhanif fhanif is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: London
Posts: 6 fhanif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to fhanif Send a message via MSN to fhanif
DTS automation

There are lots of ways doing this. I think you are upto of some automation.

You can you dtsrun or dtsrunui utility by typing these commands on dos prompt. I am using 3 DTS which I want to run from a single click without loging on to servers and running one by one.

This is the script:
DTSRun /S "serverName" /N "packageName" /G "{version of package which you will get by using dtsrunui and you can generate this version from there}" /L "C:\Documents and Settings\fhanif\Desktop\dts\Error.txt" /W "0" /E

You can put the above command in a file and name it as dts.bat and schedule it to run at any time or even you can run it by double clicking on it.

So one batch file contains multiple DTS and it will start executing one by one after running dts.bat at command prompt or double clicking on the dts.bat file.

That is the best approach I have found
Quote:
Originally Posted by vule
Hi folks,
Do you guys know how to write the Script to update the SQL database? please help me out? For example, the script will update SQL database at 1:00 am every day...some like that?

Thanks,
Vu

Reply With Quote
  #5  
Old November 24th, 2004, 04:54 AM
fhanif fhanif is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: London
Posts: 6 fhanif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to fhanif Send a message via MSN to fhanif
DTS automation

There are lots of ways doing this. I think you are upto of some automation.

You can you dtsrun or dtsrunui utility by typing these commands on dos prompt. I am using 3 DTS which I want to run from a single click without loging on to servers and running one by one.

This is the script:
DTSRun /S "serverName" /N "packageName" /G "{version of package which you will get by using dtsrunui and you can generate this version from there}" /L "C:\Documents and Settings\fhanif\Desktop\dts\Error.txt" /W "0" /E

You can put the above command in a file and name it as dts.bat and schedule it to run at any time or even you can run it by double clicking on it.

So one batch file contains multiple DTS and it will start executing one by one after running dts.bat at command prompt or double clicking on the dts.bat file.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > How to write Script to update the database?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT