Installation guide

D
Running osql to access
SQL Server data
The osql utility can be used to access and change data in instances of SQL Server. This command
prompt utility can execute one or more SQL statements and can either display the results of a query,
or save the results in a text file.
Use the osql utility to enter Transact-SQL statements, system procedures, and script files. The utility
uses ODBC to communicate with the server. As of SQL Server 2005, osql replaced the isql utility
entirely.
To run osql to access SQL Server data
1. Open a command prompt and type
osql -Ulogin_id -Ppassword -Sserver_name
where
login_id is the user login ID. It is case-sensitive.
password is a user-specified password. It is case-sensitive. If the -P option is not used,
you are prompted for a password.
server_name specifies the default instance of SQL Server to connect to or the named
instance of SQL Server on that server. If no server is specified, osql connects to the default
instance of SQL Server on the local computer. This option is required if you are executing
osql from a remote computer.
2. At the prompt, you can type SQL statements and run them interactively (for example).
Note:
As you type SQL statements and press Enter, osql caches the statements, but does
not run them. To run the cached statements, type go at the start of a new line, then
press Enter.
AS300 Preparing to Upgrade Guide—IMPAX 4.5, 5.2, 5.3,or WEB1000 to IMPAX 6.5.3 123
Agfa Company Confidential—Subject to Non-Disclosure Obligation