informix数据库的批处理渊源

The following command line options are available with the SQL Editor.

 

sqleditor [/ns] [/min] [[/s server [/d dbname]  [/u user [/pw password]]]...] [filename [/exec]]  [/output outfile] [/exit] 

 

If an error occurs due to incorrect parameters, the error message SQL Editor invoked with incorrect parameter: parameter. is displayed. If an error occurs when connecting to the specified database or database server, the engine or networking error is displayed. If the filename specified is not found, the following error message is displayed:The file filename cannot be found. Make sure that the correct file name is given.SQL Editor is still launched, regardless of any errors from the command line. If SQL Editor is already running, another instance of SQL Editor is started.
no arguments Launches SQL Editor with a new SQL file named Untitled.

----参数详细解释

/ns The splash box is not displayed when this parameter is specified.

---无提示信息

/nomsg No error or warning messages are displayed. If a warning or error occurs, the dialog box is not displayed. For the Commit/Rollback/Cancel warning prompt, the Rollback command is executed. For the Data Loss warning prompt, the Continue command is executed. This parameter is ignored if the /exec option is not specified. In addition, this setting only applies to SQL scripts executed on the command line.

---忽略错误

/ignoreerr If an error is encountered, it is ignored and processing continues. This option operates as if the /nomsg option was specified even if it was not present. However, for the Commit/Rollback/Cancel warning prompt, the Commit command is executed. If the /ignoreerr option is not specified, processing is stopped after the first error is encountered. This parameter is ignored if the /exec option is not specified. In addition, this setting only applies to SQL scripts executed on the command line.
---最小化

/min Launches SQL Editor in an iconified state (minimized).

---服务器(这里可跟多个服务器,方便的地方就在于此。)

/s server Launches SQL Editor and connects to the specified database server. If the filename /exec option is specified, then multiple /s parameters can be specified to execute the SQL statements in filename against each server/database listed. If multiple /s parameters are used, each /s parameter can have its own /d, /u, and /pw parameters. Each /s parameter is paired with the /d, /u, and /pw parameters that immediately follow.

 

---举例

For example:

sqleditor /s server1 /d db1 /s server1 /d db2 /server2 /d db3 /u sdavid /pw mypassword c:/sqlfiles/sqlfile1.sql /exec /output c:/temp/sqlout.txt

 

This command causes the file c:/sqlfiles/sqlfile1.sql to be written against 3 different databases, db1@server1, db2@server1, and db1@server2. All of the output is placed in the file c:/temp/sqlout.txt. If an error occurs connecting to a server or database, no further connections are attempted.If multiple /s parameters are specified without the /exec option, no  error message is displayed. If no /s option is provided, but the /d is, the message Use the /s option to specify the database server for the database dbname. is displayed. However, if multiple /s parameters are specified, then this error message occurs only if a /d option is discovered before any /s parameter is found. Otherwise, the generic incorrect parameter error message is used. For example, the following statement results in the generic incorrect parameter error message: sqleditor /s server1 /d db1 /d db2 sqlfile.sql /execThe User Login dialog box is displayed if the user and password are not specified and the login information can not be found in the registry.

 

---数据库
/d dbname Launches SQL Editor and connects to the specified database for the database server specified with the /s parameter.

 

---用户
/u user Specifies the name of the user for connecting to the database server specified with the /s parameter.

 

---密码
/pw password Specifies the password of the user specified with the /u parameter.
filename Loads the specified file.

--执行SQL文件

/exec Executes the SQL commands in the specified file name.

 

---输出到文件
/output outfile Appends any SELECT statement output and result history output to the specified file. If the specified file does not exist, it is created.If it does exist, the output is added to the end of the file. The SELECT statement output and result history output is still displayed in the appropriate locations in the GUI.

 

---退出(执行完成后退出)
/exit Exits SQL Editor after performing any other command line options.

 

Copyright (c) 1981-1999 Informix Corporation, Informix Software, Inc., or their subsidiaries

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值