[摘] 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一登 ...
随机推荐
- Visual studio 2012 添加 GitHub
文件-新建项目
- 【KMP原理】【整理回顾】
今儿套KMP模板做了个题,敏敏找我讲next[]数组的时候把我问懵了.具体原理都记不清了光靠模板凑得了一时凑不了一世啊,所以再捋一捋顺一顺,这次印象要深刻一点了: KMP与暴力匹配的优化区别就不再提了 ...
- hdu 4632 动态规划
思路:dp[i][j]表示区间(i,j)中回文串的个数,那么dp[i][j]=dp[i+1][j]+dp[i][j-1]-dp[i+1][j-1]:如果str[i]==str[j],那么dp[i][j ...
- 自动化中的PageObject思想
谈着这个话题很大,因为我自己在自动化分层的方面做的就不是很好,最近在做java+selenium中,如果不分层去管理,代码就显得很乱,如下: 下面代码主要是做了一个登录,登录后在修改自己的一些个人信息 ...
- 看linux连接进程占用的实时流量iftop netatop NetHogs
因为新工厂的机器上面的业务混合部署非常严重,加上内网外网共用一个网卡(这个更不可思议),导致有时要定位一些进程流量的问题非常困难,所以最近花了点时间在网上搜集了一把 (aptitude search ...
- PhotoShop—剪贴蒙版
工作中发现剪贴蒙版方便好用,所以简单分享下~ 一.剪贴蒙版有什么作用 1.文字上色 2.裁剪图片 3.添加背景 等 二.剪贴蒙版怎么使用 1.新建层,打上字如图 2.文字上面再建层加上效果如渐变 3. ...
- this.class.getClassLoader()怎么理解?
this.class.getClassLoader()怎么理解? java是面向对象语言,面向对象的语言的宗旨就是万事万物皆对象,那么类也是一个对象,类里面的属性和方法也是对象.java里面的所 有的 ...
- JMS - 基本概念
连接工厂创建连接对象的工厂. 连接客户端与 JMS 服务器之间建立的连接.创建一个或多个会话. 会话创建消息.生产者和消费者,会话是 消息由三部分组成:消息头.消息属性和消息体. 生产者创建和发送消息 ...
- 【Knockout】一、认识Knockout,你会爱上它
介绍 Knockout简称ko,是一个轻量级的javascript类库,采用MVVM设计模式(即Model.view.viewModel),简单优雅的实现了双向绑定,实时更新,帮助您使用干净的数据模型 ...
- 使用Xpath从网页中获取数据
/// <summary> /// 从官方网站中抓取产品信息存放在本地数据库中 /// </summary> /// <returns></returns&g ...