February 3, 2006 at 10:13 am
Dear All,
I have the following situation:
I have an application where my users are using MSDE 2000 as their DB and a VB6 interface. Periodically the users connect to a main server (SQL Server 2000) from where they download via FTP any SQL scripts needed in order to update their DB. These scripts are run using the "osql" utility (the actual command is : osql -S <ServerName> -U <UserName> -d <DB_Name> -P "<Password>" -i "<FileName>". This process is not visible to the user which means there is no indication if something goes wrong. If a statement in my script fails it goes on to the next statement and I have no way of knowing if everything was OK.
Does any one have an idea as to how I should approach this matter in order to make sure tha if anything goes wrong I notify the user somehow ...
Thanks,
Andreas
February 3, 2006 at 10:53 am
Have your script file update a log file. Before executing the next step in your program, check the log file to make sure log says the script ended sucessfully. I had a solution a few years back that did this, and seemed to work fine.
It may be a good idea to see if you can achieve the same thing using DTS. If you need a command line solution, you can use dts run to run any DTS package you create.
HTH
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 8:15 pm
You could also embed the OSQL command in a Batch file that could provide instant gratification as to the outcome...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply