Solved

.bat file to automate database task

Posted on 2004-04-23
2
677 Views
Last Modified: 2007-12-19
We run Veritas Netbackup Proffesional and unfortuantley it has started failing its maintainence routine. To fix this Veritas sent me a .sql file that I have to run manually usint their Interactive SQL interface. The problem is that this is a user intensive task and really needs to be run every day, so is really starting to grind.
Is there some way I can script the tast into a batch file that I can then run at scheduled times?? I have tried and got as far as the following, but this doesnt seem to work:

>
dbisqlc.exe" -c uid=dba;pwd=sql;dbf="C:\Program Files\VERITAS NetBackup Professional\Data\Catalog\NBP.db" "C:\Documents and Settings\Administrator\Desktop\GroomError-DiffChainCut_262513\GroomError-DiffChainCut.sql"
>

Can anyone help??
0
Comment
Question by:GrantMitchell
2 Comments
 
LVL 1

Accepted Solution

by:
yoav_aviram earned 130 total points
ID: 10917299
If you can provide a little more information, such as what database you are working
with and on what platform, i might be able to help you more.

I suggest you try:

dbisqlc.exe [Arguments] < [SQL File]

-- The important part here is the "<" charecter.
0
 

Author Comment

by:GrantMitchell
ID: 10917365
Sybase Adaptive Server Anywhere version 8.0.2.4272 running on Windows Server 2003.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

830 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