How to use OSQL to run SQL queries against the IM Manager MSDE database

Article:HOWTO59451  |  Created: 2011-10-05  |  Updated: 2011-11-16  |  Article URL
Article Type
How To



IM Manager can be installed with a built-in MSDE database.  Perform the following steps on the IM Manager server to check if IM Manager is using an MSDE database :

1. Open the IM Manager MMC Snap In. This is accessible from the Start menu.
2. Right click IM Manager icon and select Properties.
3. Click the Database tab.
4. If the Database Type dropdown is MSDE then IM Manager is using an MSDE database.

The Microsoft OSQL tool is installed by default when IM Manager is using an MSDE database.  See this Microsoft regarding osql: Using the osql Utility

1. Create a text file containing the SQL Query and save it.  The filename is unimportant.  For the purpose of this document the example will use SQL.TXT.  
2. Open a command prompt and change to the directory where the query text file was saved.  
3. Type in the following command:
osql -S\IMLOGICINST -U sa -E -i sql.txt

This prompts for the sa password.  This password was created when IM Manager was installed.  See the following article if the password is unknown: How To Retrieve and/or Reset IM Manager MSDE Password.

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

Article URL

Terms of use for this information are found in Legal Notices