Mssql isql command details

Source: Internet
Author: User

For example, ISQL is very convenient when you perform advanced configurations, such as running database operations on a client or remotely. For example, what can I do if I intrude into a host with SQL services? ISQL is the best tool.

Not only does Microsoft SQL support ISQL, but also supports Sybase Enterprise databases. Sybase's Unix and ISQL tools are even more useful. The application that ISQL depends on the DB-Library API does not support some functions of SQL Server 2000. For example, isql cannot access columns defined using the ntext data type and truncates any char, varchar, nchar, or nvarchar columns that exceed 255 bytes. It cannot retrieve results in XML format. In addition to the restrictions in isql, osql and isql support the same functions.

Detailed description of isql command parameters:
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 prepare _end] [-q "query"] [-Q "query"]
[-N] [-m error_level] [-r {0 | 1}]
[-I input file] [-o output file] [-p] [-B] [-O]

All parameters must be case sensitive.
-? Displays the syntax Summary of the isql switch.
-L lists the names of the Servers configured locally and the servers broadcast on the network.
-U login_id: User Logon ID. The logon ID is case sensitive.
-P password is the password specified by the user. If the-P option is not used, isql prompts you to enter the password. If the-P option is used at the end of the command prompt without a password, isql uses the default password NULL ). The password is case sensitive.
-S server_name specifies the default instance of SQL Server to be connected. If no Server is specified, isql connects to the default instance of SQL Server on the local computer. This option is required if you want to execute isql from a remote computer on the network.
-H hostname is the host name of the client used. The workstation name is stored in sysprocesses. hostname and displayed by sp_who. If not specified, the current computer name is used. This can be used to spoof the host name displayed in the process information in SQL Server.
-D use database name, used to specify the database name.
-I input file: used to specify the mounted SQL statement file. If you do not want to input too many SQL statements, you can use this parameter to execute them as a batch.

The above is basically enough. The following uses the server ABC as an example. The user name sa and password are empty. Use ISQL to log on to the database DB:
ISQL-U sa-P-s abc-d DB
If the connection is successful, enter the SQL statement after "1>", Press enter, and enter go to press enter in the second line to execute the previous SQL statement.
The SQL statement can be input in multiple rows. The SQL statement is not executed until "go" is submitted.
Quit can exit the current interactive life-line mode.

Related Article

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.