I want to install SqlPlus client on my Mac, which is 64-bit. Firstly, I installed sqlplus for 64-bit, but I had error: 'Segmentation fault: 11' Then I installed sqlplus for 32-bit, but still have a.
This chapter explains how to configure your SQL*Plus command-line environment. It has the following topics:
SQL*Plus Environment Variables
These environment variables specify the location or path of files used by SQL*Plus. For other environment variables that influence the behavior of SQL*Plus, see the Oracle Database Administrator's Reference.
Table 2-1 Parameters or Environment Variables influencing SQL*Plus
SQLPATH Registry Entry
The SQLPATH registry entry specifies the location of SQL scripts. SQL*Plus searches for SQL scripts in the current directory and then in the directories specified by the SQLPATH registry entry, and in the subdirectories of SQLPATH directories.
The HKEY_LOCAL_MACHINESOFTWAREORACLEHOME0 registry subkey (or the HOMEn directory for the associated ORACLE_HOME) contains the SQLPATH registry entry. SQLPATH is created with a default value of ORACLE_HOMEDBS. You can specify any directories on any drive as valid values for SQLPATH.
When setting the SQLPATH registry entry, you can concatenate directories with a semicolon (;). For example:
Oracle Sql Plus Download Windowsc:oracleora10database;c:oracleora10dbs
See the Registry Editor's help system for instructions on how to edit the SQLPATH registry entry.
SQL*Plus Configuration
You can set up your SQL*Plus environment to use the same settings with each session.
There are two operating system files to do this:
The exact names of these files is system dependent.
Some privileged connections may generate errors if SET SERVEROUTPUT or SET APPINFO commands are put in the Site Profile or User Profile.
The following tables show the profile scripts, and some commands and settings that affect the Command-line user interface.
Table 2-2 Profile Scripts affecting SQL*Plus User Interface Settings
Table 2-3 Commands in Profile scripts affecting SQL*Plus User Interface Settings
Site Profile
A Site Profile script is created during installation. It is used by the database administrator to configure session-wide behavior for SQL*Plus Command-line connections. The Site Profile script installed during installation is an empty script.
The Site Profile script is generally named glogin.sql. SQL*Plus executes this script whenever a user starts a SQL*Plus session and successfully establishes the Oracle Database connection.
The Site Profile enables the DBA to set up site wide SQL*Plus environment defaults for all users of a particular SQL*Plus installation
Users cannot directly access the Site Profile.
Default Site Profile Script
The Site Profile script is $ORACLE_HOME/sqlplus/admin/glogin.sql in UNIX, and ORACLE_HOMEsqlplusadminglogin.sql in Windows. If a Site Profile already exists at this location, it is overwritten when you install SQL*Plus. If SQL*Plus is removed, the Site Profile script is deleted.
User Profile
For SQL*Plus command-line connections, SQL*Plus also supports a User Profile script. The User Profile is executed after the Site Profile and is intended to allow users to specifically customize their session. The User Profile script is generally named login.sql. SQL*Plus searches for the User Profile in your current directory, and then the directories you specify with the SQLPATH environment variable. SQL*Plus searches this colon-separated list of directories and their subdirectories in the order they are listed.
You can add any SQL commands, PL/SQL blocks, or SQL*Plus commands to your user profile. When you start SQL*Plus, it automatically searches for your user profile and runs the commands it contains.
Modifying Your LOGIN File
You can modify your LOGIN file just as you would any other script. The following sample User Profile script shows some modifications that you could include:
See Also:
Storing and Restoring SQL*Plus System Variables
From the Command-line you can store the current SQL*Plus systemvariables in a script with the STORE command. If you alter any variables, this script can be run to restore the original values. This is useful if you want to reset system variables after running a report that alters them. You could also include the script in your User Profile script so that these system variables are set each time you start SQL*Plus.
To store the current setting of all system variables, enter
Enter a file name and file extension, or enter only the file name to use the default extension .SQL. You can use theSET SUF[FIX] {SQL | text} command to change the default file extension.
Restoring the System Variables
To restore the stored system variables, enter
If the file has the default extension (as specified by the SET SUF[FIX] {SQL | text} command), you do not need to add the period and extension to the file name.
You can also use the @ (at sign) or the @@ (double at sign) commands to run the script.
Example 2-1 Storing and Restoring SQL*Plus System Variables
To store the current values of the SQL*Plus system variables in a new script 'plusenv.sql':
Now the value of any system variable can be changed:
The original values of system variables can then be restored from the script:
Installing Command-line Help
Command-line help is usually installed during Oracle Database installation. If not, the database administrator can create the SQL*Plus command-line help tables and populate them with SQL*Plus help data by running a supplied SQL script from SQL*Plus.
The database administrator can also remove the SQL*Plus command-line help tables by running a SQL script from SQL*Plus.
Before you can install or remove SQL*Plus help, ensure that:
Running the hlpbld.sql Script to Install Command-line Help
Run the provided SQL script, HLPBLD.SQL, to load command-line help.
Running the helpdrop.sql Script to Remove Command-line Help
Run the provided SQL script, HELPDROP.SQL, to remove the command-line help.
Configuring Oracle Net Services
If you plan to connect to a database other than the default, whether on the same computer or another computer, you need to ensure that Oracle Net is installed, and the database listener is configured and running. Oracle Net services are used by SQL*Plus.
Oracle Net services and the database listener are installed by default during Oracle Database installation. For further information about installing and configuring Oracle Net, see the Oracle Database documentation at
http://www.oracle.com/technology/documentation .
Oracle Instant Client
It is a free, light-weight, and easy toinstall Oracle Database packages, libraries and SDKs commonly used for either building or connecting applications to an Oracle Database instance. Oracle databasescan reside either locally on traditional databases systems, Engineered System, or remotely to Oracle Public Cloud including ,Oracle Autonomous DataWarehouse,Oracle Autonomous Transaction Processing system or any other cloud variant of oracle database.
Oracle Instant Client libraries provide the necessary network connectivity to oracle database, tools like SQL*Plus, Data Pump etc to make full use of Oracle Database.
Though you can install Instant client on all supported operating system I will show how it can be done on Mac OS.
Configuring Oracle Insta Client on Mac OS
In order to install Oracle Insta Client you need to download the binaries from Oracle Website- download at lest basic and SQL*Plus package or all of them(Please note size of these binaries are very less compare to Full Oracle client).
https://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
I downloaded following packages
instantclient-basic-macos.x64-12.2.0.1.0-2.zip
instantclient-jdbc-macos.x64-12.2.0.1.0-2.zip
instantclient-odbc-macos.x64-12.2.0.1.0-2.zip
instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
instantclient-tools-macos.x64-12.2.0.1.0-2.zip
The latest version available as of todayis Version 12.2.0.1.0 (64-bit) for Mac OS. There are several packages but few package you might be interested would be basic package and SQL*Plus package, additionally you can download ODBC or JDBC packages and SDK depending on application requirements.
Once you have downloaded the packages you can extract them into a single directory, by default when you extract it will create a directory instaclient_12_2 in the same folder and all of these packages content will be extracted to same directory.
instantclient-basic-macos.x64-12.2.0.1.0-2.zip
instantclient-jdbc-macos.x64-12.2.0.1.0-2.zip
instantclient-odbc-macos.x64-12.2.0.1.0-2.zip
instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
instantclient-tools-macos.x64-12.2.0.1.0-2.zip
Bals-MacBook-Pro:~ balsharma$ unzip instantclient-basic-macos.x64-12.2.0.1.0-2.zip
Archive:instantclient-basic-macos.x64-12.2.0.1.0-2.zip
inflating: instantclient_12_2/BASIC_README
inflating: instantclient_12_2/adrci
inflating: instantclient_12_2/genezi
linking: instantclient_12_2/libclntsh.dylib-> libclntsh.dylib.12.1
inflating: instantclient_12_2/libclntsh.dylib.12.1
inflating: instantclient_12_2/libclntshcore.dylib.12.1
inflating: instantclient_12_2/libnnz12.dylib
linking: instantclient_12_2/libocci.dylib-> libocci.dylib.12.1
inflating: instantclient_12_2/libocci.dylib.12.1
inflating: instantclient_12_2/libociei.dylib
inflating: instantclient_12_2/libocijdbc12.dylib
inflating: instantclient_12_2/libons.dylib
inflating: instantclient_12_2/liboramysql12.dylib
inflating: instantclient_12_2/ojdbc8.jar
inflating: instantclient_12_2/uidrvci
inflating: instantclient_12_2/xstreams.jar
finishing deferred symbolic links:
instantclient_12_2/libclntsh.dylib -> libclntsh.dylib.12.1
instantclient_12_2/libocci.dylib -> libocci.dylib.12.1
Bals-MacBook-Pro:~ balsharma$ unzip instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
Download Sql Plus Oracle 11g
Archive:instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
inflating: instantclient_12_2/SQLPLUS_README
inflating: instantclient_12_2/glogin.sql
inflating: instantclient_12_2/libsqlplus.dylib
Duet display mac free download. inflating: instantclient_12_2/libsqlplusic.dylib
inflating: instantclient_12_2/sqlplus
Bals-MacBook-Pro:~ balsharma$ unzip instantclient-odbc-macos.x64-12.2.0.1.0-2.zip
Archive:instantclient-odbc-macos.x64-12.2.0.1.0-2.zip
inflating: instantclient_12_2/ODBC_IC_Readme_Unix.html
creating: instantclient_12_2/help/
creating: instantclient_12_2/help/ja/
inflating: instantclient_12_2/help/ja/blafdoc.css
inflating: instantclient_12_2/help/ja/cpyr.htm
creating: instantclient_12_2/help/ja/img/
inflating: instantclient_12_2/help/ja/img/odbcdrvarch.gif
inflating: instantclient_12_2/help/ja/img/odbcmodel.gif
inflating: instantclient_12_2/help/ja/img/setup_app.gif
Sql Plus App Download
inflating: instantclient_12_2/help/ja/img/setup_ora.gif
inflating: instantclient_12_2/help/ja/img/setup_ssmig.gif
inflating: instantclient_12_2/help/ja/img/setup_work.gif
creating: instantclient_12_2/help/ja/img_text/
inflating: instantclient_12_2/help/ja/img_text/odbcdrvarch.htm
inflating: instantclient_12_2/help/ja/img_text/odbcmodel.htm
inflating: instantclient_12_2/help/ja/img_text/setup_app.htm
inflating: instantclient_12_2/help/ja/img_text/setup_ora.htm
inflating: instantclient_12_2/help/ja/img_text/setup_ssmig.htm
inflating: instantclient_12_2/help/ja/img_text/setup_work.htm
inflating: instantclient_12_2/help/ja/map.xml
creating: instantclient_12_2/help/ja/META-INF/
inflating: instantclient_12_2/help/ja/META-INF/MANIFEST.MF
inflating: instantclient_12_2/help/ja/oracle.gif
inflating: instantclient_12_2/help/ja/sqora.htm
inflating: instantclient_12_2/help/ja/toc.htm
creating: instantclient_12_2/help/us/
inflating: instantclient_12_2/help/us/blafdoc.css
inflating: instantclient_12_2/help/us/cpyr.htm
creating: instantclient_12_2/help/us/img/
inflating: instantclient_12_2/help/us/img/odbcdrvarch.gif
inflating: instantclient_12_2/help/us/img/odbcmodel.gif
inflating: instantclient_12_2/help/us/img/setup_app.gif
inflating: instantclient_12_2/help/us/img/setup_ora.gif
inflating: instantclient_12_2/help/us/img/setup_ssmig.gif
inflating: instantclient_12_2/help/us/img/setup_work.gif
creating: instantclient_12_2/help/us/img_text/
inflating: instantclient_12_2/help/us/img_text/odbcdrvarch.htm
inflating: instantclient_12_2/help/us/img_text/odbcmodel.htm
inflating: instantclient_12_2/help/us/img_text/setup_app.htm
inflating: instantclient_12_2/help/us/img_text/setup_ora.htm
inflating: instantclient_12_2/help/us/img_text/setup_ssmig.htm
inflating: instantclient_12_2/help/us/img_text/setup_work.htm
inflating: instantclient_12_2/help/us/map.xml Download mac os installer file.
creating: instantclient_12_2/help/us/META-INF/
inflating: instantclient_12_2/help/us/META-INF/MANIFEST.MF
inflating: instantclient_12_2/help/us/oracle.gif
inflating: instantclient_12_2/help/us/sqora.htm
inflating: instantclient_12_2/help/us/toc.htm
inflating: instantclient_12_2/libsqora.dylib.12.1
inflating: instantclient_12_2/odbc_update_ini.sh
Bals-MacBook-Pro:~ balsharma$ unzip instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
Archive:instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
creating: instantclient_12_2/sdk/
creating: instantclient_12_2/sdk/admin/
inflating: instantclient_12_2/sdk/admin/oraaccess.xsd
creating: instantclient_12_2/sdk/demo/
inflating: instantclient_12_2/sdk/demo/cdemo81.c
inflating: instantclient_12_2/sdk/demo/demo.mk
inflating: instantclient_12_2/sdk/demo/occidemo.sql
inflating: instantclient_12_2/sdk/demo/occidemod.sql
inflating: instantclient_12_2/sdk/demo/occidml.cpp
inflating: instantclient_12_2/sdk/demo/occiobj.cpp
inflating: instantclient_12_2/sdk/demo/occiobj.typ
inflating: instantclient_12_2/sdk/demo/oraaccess.xml
inflating: instantclient_12_2/sdk/demo/setuporamysql.sh
creating: instantclient_12_2/sdk/include/
inflating: instantclient_12_2/sdk/include/ldap.h
inflating: instantclient_12_2/sdk/include/nzerror.h
inflating: instantclient_12_2/sdk/include/nzt.h
inflating: instantclient_12_2/sdk/include/occi.h
inflating: instantclient_12_2/sdk/include/occiAQ.h
inflating: instantclient_12_2/sdk/include/occiCommon.h
inflating: instantclient_12_2/sdk/include/occiControl.h
inflating: instantclient_12_2/sdk/include/occiData.h
inflating: instantclient_12_2/sdk/include/occiObjects.h
inflating: instantclient_12_2/sdk/include/oci.h
inflating: instantclient_12_2/sdk/include/oci1.h
inflating: instantclient_12_2/sdk/include/oci8dp.h
inflating: instantclient_12_2/sdk/include/ociap.h
inflating: instantclient_12_2/sdk/include/ociapr.h
inflating: instantclient_12_2/sdk/include/ocidef.h
inflating: instantclient_12_2/sdk/include/ocidem.h
inflating: instantclient_12_2/sdk/include/ocidfn.h
inflating: instantclient_12_2/sdk/include/ociextp.h
inflating: instantclient_12_2/sdk/include/ocikpr.h
inflating: instantclient_12_2/sdk/include/ocixmldb.h
inflating: instantclient_12_2/sdk/include/ocixstream.h
inflating: instantclient_12_2/sdk/include/odci.h
inflating: instantclient_12_2/sdk/include/oratypes.h
inflating: instantclient_12_2/sdk/include/ori.h
inflating: instantclient_12_2/sdk/include/orid.h
inflating: instantclient_12_2/sdk/include/orl.h
inflating: instantclient_12_2/sdk/include/oro.h
inflating: instantclient_12_2/sdk/include/ort.h
inflating: instantclient_12_2/sdk/include/xa.h
inflating: instantclient_12_2/sdk/ott
extracting: instantclient_12_2/sdk/ottclasses.zip
inflating: instantclient_12_2/sdk/SDK_README
Bals-MacBook-Pro:~ balsharma$ unzip instantclient-tools-macos.x64-12.2.0.1.0-2.zip
Archive:instantclient-tools-macos.x64-12.2.0.1.0-2.zip
inflating: instantclient_12_2/TOOLS_README
inflating: instantclient_12_2/exp
inflating: instantclient_12_2/expdp
inflating: instantclient_12_2/imp
Video download capture per mac. inflating: instantclient_12_2/impdp
inflating: instantclient_12_2/libnfsodm12.dylib
inflating: instantclient_12_2/sqlldr
inflating: instantclient_12_2/wrc
Bals-MacBook-Pro:~ balsharma$ unzip instantclient-jdbc-macos.x64-12.2.0.1.0-2.zip
Archive:instantclient-jdbc-macos.x64-12.2.0.1.0-2.zip
inflating: instantclient_12_2/JDBC_README
inflating: instantclient_12_2/libheteroxa12.dylib
inflating: instantclient_12_2/orai18n-mapping.jar
inflating: instantclient_12_2/orai18n.jar
Bals-MacBook-Pro:~ balsharma$ pwd
/Users/balsharma
Bals-MacBook-Pro:~ balsharma$ mkdir ~/lib
Bals-MacBook-Pro:~ balsharma$ ln -s ~/instantclient_12_2/libclntsh.dylib ~/lib/
Bals-MacBook-Pro:~ balsharma$ ln -s ~/instantclient_12_2/libclntsh.dylib.12.1 ~/lib/
Bals-MacBook-Pro:~ balsharma$ mkdir -p ~/instantclient_12_2/network/admin
Bals-MacBook-Pro:~ balsharma$ export PATH=~/instantclient_12_2:$PATH
Bals-MacBook-Pro:~ balsharma$ sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 22 16:02:46 2018
Copyright (c) 1982, 2017, Oracle.All rights reserved.
Enter user-name: ^C
Now the setup of Insta client for Oracle is ready , lets try to connect to a Oracle database, For this , I am going to connect to Oracle Autonomous Data Warehouse. You need to get few details like Client credential Wallet, User name and Password for user authentication.
Connecting Autonomous Data Warehouse(ADWC) Using Insta Client
Create a directory which an hold ADWC client wallet contents.
Bals-MacBook-Pro:~ balsharma$ cd instantclient_12_2/
Bals-MacBook-Pro:instantclient_12_2 balsharma$ ls
BASIC_README libclntsh.dylib libsqlplusic.dylib
JDBC_README libclntsh.dylib.12.1 libsqora.dylib.12.1
ODBC_IC_Readme_Unix.html libclntshcore.dylib.12.1 network
SQLPLUS_README libheteroxa12.dylib odbc_update_ini.sh
TOOLS_README libnfsodm12.dylib ojdbc8.jar
adrci libnnz12.dylib orai18n-mapping.jar
exp libocci.dylib orai18n.jar
expdp libocci.dylib.12.1 sdk
genezi libociei.dylib sqlldr
glogin.sql libocijdbc12.dylib sqlplus
help libons.dylib uidrvci
imp liboramysql12.dylib wrc
impdp libsqlplus.dylib xstreams.jar
Bals-MacBook-Pro:instantclient_12_2 balsharma$ mkdir adwc_wallet
I have created this directory “adwc_wallet” to hold the Autonomous DataWarehouse Client credentials. Client credentials from a ADWCS would be a .zip file which can be extracted to the insta client directory . After unzipping the ADWCS client wallet you see several files like silent.ora, tnsnames.ora etc along with encryption wallet libraries.
Bals-MacBook-Pro:Downloads balsharma$ ls -lrt
total 248200
-rw-r–r–@1 balsharmastaff 19989 Oct 22 14:27 Wallet_ADWC.zip
-rw-r–r–@1 balsharmastaff3336 Oct 222018 truststore.jks
-rw-r–r–@1 balsharmastaff9092 Oct 222018 tnsnames.ora
-rw-r–r–@1 balsharmastaff 114 Oct 222018 sqlnet.ora
-rw-r–r–@1 balsharmastaff87 Oct 222018 ojdbc.properties
-rw-r–r–@1 balsharmastaff3243 Oct 222018 keystore.jks
-rw-r–r–@1 balsharmastaff6616 Oct 222018 ewallet.p12
![]()
-rw-r–r–@1 balsharmastaff6661 Oct 222018 cwallet.sso
Bals-MacBook-Pro:Downloads balsharma$ pwd
/Users/balsharma/Downloads
Move the content of client credentials to the folder created earlier under insta client home.
Bals-MacBook-Pro:Downloads balsharma$ mv cwallet.sso ewallet.p12 keystore.jks ojdbc.properties sqlnet.ora tnsnames.ora truststore.jks /Users/balsharma/instantclient_12_2/adwc_wallet/
Quit all apps mac shortcut. Bals-MacBook-Pro:Downloads balsharma$ cd
Bals-MacBook-Pro:~ balsharma$ cd instantclient_12_2/
Bals-MacBook-Pro:instantclient_12_2 balsharma$ cd adwc_wallet/
Bals-MacBook-Pro:adwc_wallet balsharma$ ls
cwallet.sso keystore.jks sqlnet.ora truststore.jks
ewallet.p12 ojdbc.properties tnsnames.ora
Bals-MacBook-Pro:adwc_wallet balsharma$ pwd
/Users/balsharma/instantclient_12_2/adwc_wallet
Bals-MacBook-Pro:adwc_wallet balsharma$ cp /Users/balsharma/Downloads/Wallet_ADWC.zip .
Bals-MacBook-Pro:adwc_wallet balsharma$ ls
Wallet_ADWC.zip ewallet.p12 ojdbc.properties tnsnames.ora
cwallet.sso keystore.jks sqlnet.ora truststore.jks
Bals-MacBook-Pro:adwc_wallet balsharma$ pwd
Fighting is magic download mac. /Users/balsharma/instantclient_12_2/adwc_wallet
Modify the silent.ora to include the correct directory name of ADWCS client wallet content. I have copied the silent.ora and tnsnames.ora under insta client directory- network-admin folder and updated the location of ADWC client wallet.
Bals-MacBook-Pro:admin balsharma$ pwd
/Users/balsharma/instantclient_12_2/network/admin
Bals-MacBook-Pro:admin balsharma$ ls
sqlnet.ora tnsnames.ora
Bals-MacBook-Pro:admin balsharma$ vi sqlnet.ora
Bals-MacBook-Pro:admin balsharma$ cat sqlnet.ora
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY=”/Users/balsharma/instantclient_12_2/adwc_wallet”)))
SSL_SERVER_DN_MATCH=yes
Bals-MacBook-Pro:adwc_wallet balsharma$ vi sqlnet.ora
Bals-MacBook-Pro:adwc_wallet balsharma$ ls
Wallet_ADWC.zip ewallet.p12 ojdbc.properties tnsnames.ora
cwallet.sso keystore.jks sqlnet.ora truststore.jks
Bals-MacBook-Pro:adwc_wallet balsharma$ pwd
/Users/balsharma/instantclient_12_2/adwc_wallet
Bals-MacBook-Pro:instantclient_12_2 balsharma$ cd network/admin/
Bals-MacBook-Pro:admin balsharma$ pwd
/Users/balsharma/instantclient_12_2/network/admin
Bals-MacBook-Pro:adwc_wallet balsharma$ sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 22 17:01:41 2018
Copyright (c) 1982, 2017, Oracle.All rights reserved.
Enter user-name: admin@adwc_high
Enter password:
Last Successful login time: Mon Oct 22 2018 13:56:17 -05:00
Connected to:
Oracle Database 18c Enterprise Edition Release 12.2.0.1.0 – 64bit Production
SQL>
SQL> show user
USER is “ADMIN”
SQL> select * from tab
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |