Using OSQL to run queries against the Backup Exec for Windows Servers Database (BEDB)

Problem

Using OSQL to run queries against the Backup Exec for Windows Servers Database (BEDB)

Solution


To run a SQL Query against the Backup Exec for Windows Servers Database (BEDB) without using SQL Query Analyzer, you can use an application that is packaged with MSDE called OSQL as follows:


 
1. First, create the SQL Query and save it as a text file (although any extension can be used).  This file can be called anything.  For the purpose of this document the example will use SQL.TXT.  
 

 
2. Next, open a command prompt and change to the directory where the query text file was saved.  
 

 
3. Then type in the following command:
 

 
osql -S <computername>\bkupexec -dbedb -E -i sql.txt
 

 
This will run the query(s) in the text file that was created.
 

To see a full listing of all osql switch parameters and their functions simply enter "osql -?"

 

Terms of use for this information are found in Legal Notices.

Search

Survey

Did this article answer your question or resolve your issue?

No
Yes

Did this article save you the trouble of contacting technical support?

No
Yes

How can we make this article more helpful?

Email Address (Optional)