SqlPlus - SqlPlus Command

Card Puncher Data Processing

Syntax

sqlplus username/password@ConnectIdentifier command

where:

  • username is the database login name
  • password is the password. If the password contains an ampersand, you can escape it like this \”my@Pwd\”
  • identifier is a connect identifier
  • command, generally @script.sql

How to start SQLPlus

Maven

<plugin>
		<groupId>org.codehaus.mojo</groupId>
		<artifactId>exec-maven-plugin</artifactId>
		<version>${maven_exec_plugin_version}</version>
		<executions>
			<execution>
				<phase>process-resources</phase>
				<goals>
					<goal>exec</goal>
				</goals>
			</execution>
		</executions>
		<configuration>
			<executable>sqlplus</executable>
			<!-- where the SQL script is run from -->
			<workingDirectory>/Path</workingDirectory>
			<!-- set env variables -->
			<environmentVariables>
				<ORACLE_HOME>/oracle/product/10.1.3.1/OracleAS_1</ORACLE_HOME>
				<PATH>$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin</PATH>
				<LD_LIBRARY_PATH>$LD_LIBRARY_PATH:$ORACLE_HOME/lib</LD_LIBRARY_PATH>
				<PATH>$PATH:$ORACLE_HOME/bin</PATH>
			</environmentVariables>
			<!-- arguments to be passed to SQLPLUS -->
			<arguments>
				<argument>user/pwd@localhost:1521/ORCL</argument>
				<argument>@release/RollbackAndInstallReleases.sql</argument>
			</arguments>
		</configuration>
</plugin>

Jenkins

sqlplus %SQL_USER%/\"%SQL_PWD%\"@localhost:1521/ORCL @execution.sql 2>&1 output.txt

Jenkins Sqlplus

where:

  • %SQL_USER% and %SQL_PWD% are environment variable created by the Jenkins Credential Manager





Discover More
Sqldeveloper Sqlpath
(SQL Plus|SQL Developer)- SQLPATH

Setting up the SQLPATH environment variable in the windows environemnt tell to search the file in this directories. The startup files (login.sql,...) must be located in this directories. 1524210.1Bug:...
Mapviewer Oracle Map Tutorial
MapViewer - Installation of the demo files

This article talk the installation of the spatial demo set that you need to run the Oracle Maps Tutorial (online demos) listed at thebottom of the MapViewer home page. URL http://mapviewerhost:9704/mapviewer/fsmc/tutorial/index.html...
Card Puncher Data Processing
OWB - How to start a job (Mapping, Process, ) from SQLPlus

... A job for OWB is : a PL/SQL Mapping a SQLLoader Mapping a ProcessFlow a SAP Mapping a DataAuditor Mapping a Scheduled Job To start a job from SqlPlus, you must use : the script sqlplus_exec_template.sql...
Card Puncher Data Processing
OWB - OMB (Oracle Meta Base) Language

OMB is : the scripting language from . a set of java function embedded in the scripting langage tcl (with the help of tcljava). Thus, you must...
Card Puncher Data Processing
Oracle Database

Documentation about the Oracle database
Card Puncher Data Processing
Oracle Database - Net Service Name (tnsname)

A simple name for a service that resolves to a connect descriptor. Users initiate a connect request by passing a user name and password, along with a net service name in a connect string, for the service...
Card Puncher Data Processing
SQL PLUS - Array size

The array size is a configuration variable which set the fetch size. Valid values are 1 to 5000. A large value increases the efficiency of queries and subqueries that fetch many rows, but requires more...
Card Puncher Data Processing
SQL Plus - How to connect to a particular oracle database instance ?

Before you attempt to use SQLPlus to connect locally to an Oracle instance, you must ensure that environment variables are set properly. When multiple database instances exist on one server, or when...
Card Puncher Data Processing
SQL Plus - Special Characters

Useful command in sqlplus. The At & character is the default character that define a substitution variable. You can change it with the define system variable. The slash command (/): ...
Card Puncher Data Processing
SQL Plus - Startup Script

This article talks how to configure the environment variable when start up in order to have always a good behaviour in the formatting of the result. You have to setup the with a directory. Copy...



Share this page:
Follow us:
Task Runner