[摘] SQLPLUS Syntax
You use the SQLPLUS command at the operating system prompt to start
command-line SQL*Plus:
SQLPLUS [ [Options] [Logon] [Start] ]
Options has the following syntax:
[-H[ELP]|-V[ERSION] [-C[OMPATIBILITY]] [-F[AILOVER]] [-L[OGON]] [-M[ARKUP] markup_option] [-R[ESTRICT] {1|2|3}] [-S[ILENT]]]
MARKUP option:
HTML [ON|OFF] [HEAD text] [BODY text] [TABLE text] [ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] {ON|OFF}]
Logon has the following syntax:
{username[/password][@connect_identifier]| / } [AS {SYSOPER|SYSDBA|SYSASM}]|/NOLOG
HELP Option
-H[ELP]
Displays the usage and syntax for the SQLPLUS command, and then returns control to the operating system.
VERSION Option
-V[ERSION]
Displays the current version and level number for SQL*Plus, and then returns control to the operating system.
COMPATIBILITY Option
-C[OMPATIBILITY] {x.y[.z]
Sets the value of the SQLPLUSCOMPATIBILITY system variable to the SQL*Plus release specified by x.y[.z]. Where x is the version number, y is the release number, and z is the update number. For example, 9.0.1 or 10.2. For more information, see the SET
FAILOVER Option
-F[AILOVER]
Enables SQL*Plus to receive FAN events when connected to a Real Application Cluster (RAC) database. In this mode a service or instance failure is transparently handled with transaction status messages if applicable.
LOGON Option
-L[OGON]
Specifies not to reprompt for username or password if the initial connection does not succeed. This can be useful in operating system scripts that must either succeed or fail and you don't want to be reprompted for connection details if the database server is not running.
MARKUP Options
-M[ARKUP]
You can use the MARKUP option to generate a complete stand alone web page from your query or script.
HTML [ON|OFF]
HTML is a mandatory MARKUP argument which specifies that the type of output to be generated is HTML. The optional HTML arguments, ON and OFF, specify whether or not to generate HTML output. The default is OFF.
MARKUP HTML ON generates HTML output using the specified MARKUP options. You can turn HTML output ON and OFF as required during a session. The default is OFF.
RESTRICT Option
-R[ESTRICT] {1|2|3}
Enables you to disable certain commands that interact with the operating system.
(EDIT,GET,HOST,SAVE,SPOOL,START, @, @@,STORE)
SILENT Option
-S[ILENT]
Suppresses all SQL*Plus information and prompt messages, including the command prompt, the echoing of commands, and the banner normally displayed when you start SQL*Plus. If you omit username or password, SQL*Plus prompts for them, but the prompts are not visible! Use SILENT to invoke SQL*Plus within another program so that the use of SQL*Plus is invisible to the user. SILENT is a useful mode for creating reports for the web using the SQLPLUS -MARKUP command inside a CGI script or operating system script. The SQL*Plus banner and prompts are suppressed and do not appear in reports created using the SILENT option.
Logon
username[/password]
Represent the username and password with which you wish to start SQL*Plus and connect to Oracle Database.
Warning: Including your password in plain text is a security risk. You can avoid this risk by omitting the password, and entering it only when the system prompts for it.
/
Represents a default logon using operating system authentication. You cannot enter a connect identifier if you use a default logon. In a default logon, SQL*Plus typically attempts to log you in using the username OPS$name, where name is your operating system username. Note that the prefix "OPS$" can be set to any other string of text. For example, you may wish to change the settings in your INIT.ORA parameters file to LOGONname or USERIDname. See the Oracle Database Administrator's Guide for information about operating system authentication.
AS {SYSOPER|SYSDBA|SYSASM}
The AS clause enables privileged connections by users who have been granted SYSOPER, SYSDBA or SYSASM system privileges.
/NOLOG
Establishes no initial connection to Oracle Database. Before issuing any SQL commands, you must issue a CONNECT command to establish a valid logon. Use /NOLOG when you want to have a SQL*Plus script prompt for the username, password, or database specification. The first line of this script is not assumed to contain a logon.
[摘] SQLPLUS Syntax的更多相关文章
- AspNetPager控件报错误: Syntax error, unrecognized expression: input#ctl00$ContentPlaceHolder1$Aspnetpager1_input问题解决[摘]
高版本IE,如IE10或者IE11在浏览页面时出现错误: Syntax error, unrecognized expression: input#ctl00$ContentPlaceHolder1$ ...
- Oracle数据库间的数据复制 - SQLPlus中的COPY命令
Copy命令可以实现不同Oracle数据库间的数据的复制,也是可以实现同一数据库的数据复制,其性能表现和导入/导出相同. 根据9i文档,说Copy命令未来会不支持,但实际上Oracle 11g仍然支持 ...
- Oracle sqlplus 语法
目录: 0. FREFACE 1. 执行一个SQL脚本文件 2. 对当前的输入进行编辑 3. 重新运行上一次运行的sql语句 4. 将显示的内容输出到指定文件 5. 关闭spool输出 6.显示一个表 ...
- sqlplus 链接数据库
实验目的:在虚拟机中用sqlplus工具访问真实机的数据库: 实验环境: 真实机(windows系统,数据库服务名 orcl): SQL> select * from v$version; BA ...
- sqlplus handbook
1.直接敲sqlplus并回车就是启动SQL*PLUS,输入user及password将使用户登陆到缺省的数据库. 请输入用户名: 2.sqlplus user/password@SERVICE_NA ...
- oracle sqlplus 常用命令大全
show和set命令是两条用于维护SQL*Plus系统变量的命令 SQL> show all --查看所有68个系统变量值 SQL> show user --显示当前连接用户 SQL> ...
- sqlplus语句示例
我们通常所说的DML.DDL.DCL语句都是sql*plus语句,它们执行完后,都可以保存在一个被称为sql buffer的内存区域中,并且只能保存一条最近执行的sql语句,我们可以对保存在sql b ...
- 如何在Open Live Writer(OLW)中使用precode代码高亮Syntax Highlighter
早先Microsotf的Windows Live Writer(WLW)现在已经开源了,并且更名为Open Live Writer,但是现在Windows Live Writer还是可以现在,Open ...
- Linix登录报"/etc/profile: line 11: syntax error near unexpected token `$'{\r''"
同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登 ...
随机推荐
- Recovery启动流程(3)--recovery.cpp分析
转载请注明来源:cuixiaolei的技术博客 这篇文章主要通过分析高通recovery目录下的recovery.cpp源码,对recovery启动流程有一个宏观的了解.MTK和高通的recovery ...
- Kali+Win7双系统
----------------------------------------------------------前言---------------------------------------- ...
- javascript一些常用操作
一:验证日期 1:日期必须满足yyyy-MM-dd格式 2:日期必须是合法的日期,如2016-02-30就是不存在 //验证就诊日期 function checkVisitDate(date){ va ...
- ibatis返回结果映射到HashMap时,列名无效的问题
遇到问题: 1.项目开发过程中在xml配置文件中使用$tableName/sql$时,报"列名无效"错误,后来经过查询,发现是ibatis缓存 了上一次查询的表结构的原因.解决办法 ...
- 如何识别Baiduspider
上周百度站长平台接到某站长求助,表示误封禁了Baiduspider的IP,询问是否有办法获得Baiduspider的所有IP,打算放入白名单加以保护,防止再次误封.在此要告诉各位站长,Baiduspi ...
- BZOJ 3505
3505: [Cqoi2014]数三角形 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 1171 Solved: 703[Submit][Statu ...
- 浅谈call和apply的联系&区别&应用匹配
call和apply的联系和区别在之前查过资料了解了一番,昨天晚上睡不着觉忽然想到了这个问题,发现对于他们的联系和区别理解的还是很模糊.看来还是欠缺整理,知识没有连贯起来.反思一二,详情如下: 1作用 ...
- 【转载】Android推送方案分析(MQTT/XMPP/GCM)
http://m.oschina.net/blog/82059 本文主旨在于,对目前Android平台上最主流的几种消息推送方案进行分析和对比,比较客观地反映出这些推送方案的优缺点,帮助大家选择最合适 ...
- .net中判断该应用程序是否已经启动,防止重复启动,监控程序启动是否正常
//获取配置文件中的需要监控项 private static string MonitorServe = ConfigurationSettings.AppSettings["Monitor ...
- 剑指offer_快速查找递增二维数组中是否存在目标
[编程题]二维数组中的查找 在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数 ...