MSSQL isql command Detailed _mssql

Source: Internet
Author: User
Tags mssql sybase
For example, to do some advanced configuration, as well as in the client or remote database operations, such as work, isql is very convenient. Like invading a host with SQL services, what can you do when you invade SQL Server? The best tool is the isql.

Not only is Microsoft's SQL support isql, but Sybase's enterprise version of the database also supports Sybase's UNIX version, isql and other tools. ISQL applications that rely on the Db-library API do not support some features of SQL Server version 2000. For example, isql cannot access a column defined with a ntext data type and truncate any char, varchar, nchar, or nvarchar column that exceeds 255 bytes. It also fails to retrieve the results of the XML document form. In addition to these limitations in isql, osql and isql support the same functionality.

isql the parameters of the command:
isql [-u login ID] [-p password] [-s server]
isql [-?] | [-L] | [
{{u login_id [p password]} |-e}
[-s server] [H hostname] [-D use database name]
[-L Time_out] [-T Time_out] [H Headers]
[-S Col_separator] [-W Column_width] [-A packet_size]
[-E] [-X Max_text_size] [-C Cmd_end] [-Q "Query"] [-Q "Query"]
[-N] [M Error_level] [-r {0 | 1}]
[-I input file] [-O Output FILE] [-P] [b] [-O]]

All parameters should be case-sensitive, especially in use.
-? Displays the syntax summary for the isql switch.
-l lists the servers that are configured locally and the names of the servers that are broadcast on the network.
-U login_id User login ID. The login ID is case-sensitive.
-p password is a user-specified password. If the-P option is not used, isql prompts for a password. If you use the-P option at the end of the command prompt without a password, isql uses the default password null. Passwords are case-sensitive.
-S server_name Specifies the default instance of SQL Server to connect to. If you do not specify a server, isql connects to the default instance of SQL Server on the local computer. This option is required if you want to perform isql from a remote computer on a network.
-h hostname is the host name of the client used. The workstation name is stored in Sysprocesses.hostname and is displayed by sp_who. If not specified, the current computer name is used. Use this to spoof the host name displayed in process information in SQL Server.
-d use database name, used to specify the names of the databases.
-I input file, used to specify the loaded SQL statement files. When you do not want to enter too many SQL statements, you can write in a file, using this parameter as a batch processing to execute.

These are basically enough to use, the following server ABC as an example, user name SA, password for the empty, with isql login database db:
Isql-u Sa-p-S abc-d DB
If the connection succeeds, enter the SQL statement after "1>", enter the second line, type go return, and execute the previous SQL statement.
SQL statements can be entered into multiple lines until you execute a "go" commit before executing the SQL statement.
Quit can exit the current interactive life-line mode.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.