Cat in Sqlplus
What is the cat in sqlplus command and its use? thnx.rakeshor wrote:
This is the result, when I use the cat command. I have some confusion. thnxSQL > select * from cat.
TABLE_NAME TABLE_TYPE
------------------------------ -----------
STAFFING TABLE
EMPLOYEE TABLE
USE THE TABLE
TABLE OF CARS
TABLE EMP1
EMPBACK TABLE
T1 TABLE
T2 TABLE
DEPT TABLE
EMP TABLE
BONUS BOARDTABLE_NAME TABLE_TYPE
------------------------------ -----------
SALGRADE TABLE12 selected lines.
http://download.Oracle.com/docs/CD/E11882_01/server.112/e24448/statviews_2147.htm#sthref1646
http://download.Oracle.com/docs/CD/E11882_01/server.112/e24448/statviews_5231.htm#i1633400
http://download.Oracle.com/docs/CD/E11882_01/server.112/e24448/statviews_1030.htm#i1575120
Tags: Database
Similar Questions
-
-bash: sqlplus: lsnrctl: command not found
Hello
# cat /etc/issue Oracle Linux Server release 6.7 Kernel \r on an \m [root@hostname bin]# lsnrctl -bash: lsnrctl: command not found [root@hostname bin]# sqlplus -bash: sqlplus: command not found [root@hostname bin]# ps -elf |grep -i smon 0 S oracle 23239 1 0 80 0 - 315538 semtim 16:37 ? 00:00:00 xe_smon_XE 0 S root 23411 23043 0 80 0 - 25840 - 16:39 pts/3 00:00:00 grep -i smon
We set up a XEN VPS with Oracle linux. It's really strange to me that db is running, but I'm not able to run the same sqlplus command from $ORACLE_PATH/bin
Please notify
Thank you in anticipation
- [root@hostname bin] # lsnrctl
-bash: lsnrctl: command not found
You run the Oracle commands under the root user: do not, run Oracle commands as user oracle.
Don't forget to set environment variables: http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#XEINL124
-
Hi all
I am creating a report with the help of SQL * Plus and shell.
I use a lot of a shell script sql script. In my report, output, k I still see the actual query:
SQL > select * from v version $;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE Production 11.2.0.2.0
AMT for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Is it possible to remove the query and get the result of the query in my report? What SET option would do that?
I would really appreciate any suspicion!
Thank you so much in advance!
M
Hello
Have you tried SET POSITION OFF and SET ECHO OFF?
Cat sql_test.sh:
sqlplus-s $login<>
Set serveroutput on
trigger the echo
set the position
Select 'Testing' to double;
output
++
-
How to connect to sqlplus in unix Server
Hi masters.
Little info. requried... I worked on oracle with windows CA. But I don't know unix exp. My question is
I want to connect to sqlplus in unix Server? Please let me know...!
Thanks to the adv.
concerning
SASqlplus username/pwd@servicename;
You can find details of service name in file names tns instead of unix. If you are not able to find and then type cd $TNS_ADMIN at the prompt of unix command, then ls - lrt tnsnames.ora
You can also cat this file to display.See you soon
Lionel -
Dear guys,
I try to connect to another database using strings of connection, but that very strange is, when I use any word for database SID, it can still connect.
sqlplus sys/password @ < any_word > have sysdba
===========================================
sys/admin123$@AaAaAaAaAaAaA [oracle@nbcappdbsvr1 path] $sqlplus as sysdba
SQL * more: Production of the version 11.2.0.2.0 on Mon Oct 17 00:02:40 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL >
or
sys/admin123$@bbbbbbbbbbbb [oracle@nbcappdbsvr1 admin] $sqlplus as sysdba
SQL * more: Production of the version 11.2.0.2.0 on Mon Oct 17 00:06:27 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL >
===========================================
I have no database name amar as you can see.
My Oracle database is: 11.2.0.2.0
Operating system: Solaris 10
My tnsname.ora
===========================================
[oracle@nbcappdbsvr1 admin] $cat tnsnames.ora
tnsnames.ora # Network Configuration file: /oracle/database/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
SSYS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = nbcappdb) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SSYS)
)
)
SSYS2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = nbcdr2appdbsvr) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SSYS2)
)
)
SSYS1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = nbcdr1appdbsvr) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SSYS1)
)
)
LISTENER_SSYS =
(ADDRESS = (PROTOCOL = TCP)(HOST = nbcappdb) (PORT = 1521))
===========================================
My Listener.ora:
===========================================
[oracle@nbcappdbsvr1 admin] $cat listener.ora
listener.ora # Network Configuration file: /oracle/database/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = SSYS_DGMGRL)
(SID_NAME = SSYS)
(ORACLE_HOME = oracle/database/product/11.2.0/dbhome_1)
)
(SID_DESC =
(GLOBAL_DBNAME = SSYS)
(SID_NAME = SSYS)
(ORACLE_HOME = oracle/database/product/11.2.0/dbhome_1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = nbcappdb) (PORT = 1521))
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = / oracle/database
=============================================
My sqlnet.ora
=============================================
[oracle@nbcappdbsvr1 admin] $cat sqlnet.ora
sqlnet.ora # Network Configuration file: /oracle/database/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
ADR_BASE = / oracle/client
=============================================
Now I try to connect to any other database. But he always connect to the local database.
Any response will appreciate
Please help me.chuongnh wrote:
Dear guys,I try to connect to another database using strings of connection, but that very strange is, when I use any word for database SID, it can still connect.
sqlplus sys/password @
as sysdba ===========================================
sys/admin123$@AaAaAaAaAaAaA [oracle@nbcappdbsvr1 path] $sqlplus as sysdba
SQL * more: Production of the version 11.2.0.2.0 on Mon Oct 17 00:02:40 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL >or
sys/admin123$@bbbbbbbbbbbb [oracle@nbcappdbsvr1 admin] $sqlplus as sysdba
SQL * more: Production of the version 11.2.0.2.0 on Mon Oct 17 00:06:27 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing optionsSQL >
Since you're on some flavor of * NIX command line shell (aka shell)
is treatment "$@bbbbbbbbbbbb" as environmental Variable; What happens to be NULL or empty. -
User not DBA trying to access the binary sqlplus: AIX
DB version: 11.2
Operating system: Aix 6
I created a user level oracle DB called testusr and I created the unix user called testusr as well.
But when I try to run sqlplus, I get the following error.
This is the setting of the ACL for /u01/oracle/11.2/db directory ORACLE_HOME. testusr belongs to the Group of svgrp that hassu - testusr $ whoami testusr $ id uid=1690170420(testusr) gid=206(svgrp) export ORACLE_HOME=/u01/oracle/11.2/db export ORACLE_SID=orcl export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib $ sqlplus / ksh: sqlplus: not found $ ls -alrt /u01/oracle/11.2/db/bin/sqlplus /u01/oracle/11.2/db/bin/sqlplus: No permission #This file actually exists
been granted read and execute privileges.
No idea why the testusr can not see sqlplus binary?cat /tmp/acl_settings_for_OH11.2 * * ACL_type AIXC * attributes: base permissions owner(oracle): rwx group(dba) : r-x others : --- extended permissions enabled permit r-x u:manh permit r-x g:kevh permit r-x g:svgrp
You need to check the permissions for each of the components of the path: /u01/oracle/11.2/db/bin/sqlplus
Thus, each directory path
/ U01/oracle /.
/U01/Oracle/11.2/
/U01/Oracle/11.2/DB/
/U01/Oracle/11.2/DB/bin/must have read and execute permissions (but NOT write permissions)
And, of course, the sqlplus binary must have read and execute permissions.
Hemant K Collette
-
[Emergency] sqlplus gets "error 5 Initializing SQL * more NLS initialization.
Hi all.
I published sqlplus but I got the following error.
What could be the reasons for the following error?
Thanks in advance.
Best regards.
--------------------------------------------------------------------
[esumedi (ngwapt1): esumedi/SG /] sqlplus
Error Initializing SQL 5 * more
Error of initialization of the NLS
--------------------------------------------------------------------
Profile of cat.
--------------------------------------------------------------------
export ORACLE_BASE = / ora_client
Export ORACLE_HOME = $ORACLE_BASE/OraHome_1
Export ORACLE_TERM = vt100
Export ORA_NLS33 = $ORACLE_HOME/ocommon/sln/admin/data
Export NLS_LANG = American_america. KO16KSC5601
Export TNS_ADMIN = $ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME/bin:.:/ bin: / usr/bin: / usr/sbin: / usr/ccs/bin: / usr/ucb: / opt/perf/bin: $ORACLE_HOME/OPatch: / oracle/app/oracle10/product/102
0/bin:.
Export SHLIB_PATH = $ORACLE_HOME/lib: $ORACLE_HOME/lib32: $ORACLE_HOME/network/lib: / usr/lib
Export DISPLAY = 172.23.19.134:0.0
export PATH=$PATH:/opt/java1.5/bin:/opt/java1.5/jre/bin
--------------------------------------------------------------------------Hello
By default, the software permissions do not allow most users to access and run the files under $ORACLE_HOME a lot. To change this and 'relax' the permissions, you must run $ORACLE_HOME/install/changePerm.sh.Kind regards
Harryhttp://dbaharrison.blogspot.com/
Published by: harry76 on July 13, 2011 16:37
-
-bash: sqlplus: command not found UNIX
I just installed oracle on unix database.
Here is my profile.
I ran making[oracle@sam ~]$ cat .profile XAUTHORITY=/root/.xauthcy2rR4 DISPLAY=:0.0 ORACLE_HOME=/u01/oracle/10g/PROD export ORACLE_HOME PATH=$ORACLE_HOME/bin:$PATH export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib TNS_ADMIN=$ORACLE_HOME/network/admin ORACLE_SID=PROD export LD_LIBRARY_PATH export TNS_ADMIN export DISPLAY export XAUTHORITY export ORACLE_SID env | grep $ORACLE_HOME env | grep $ORACLE_SID uname -a
When I do[oracle@sam ~]$ . .profile LD_LIBRARY_PATH=/u01/oracle/10g/PROD/lib:/u01/oracle/10g/PROD/network/lib TNS_ADMIN=/u01/oracle/10g/PROD/network/admin PATH=/u01/oracle/10g/PROD/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin ORACLE_HOME=/u01/oracle/10g/PROD LD_LIBRARY_PATH=/u01/oracle/10g/PROD/lib:/u01/oracle/10g/PROD/network/lib ORACLE_SID=PROD TNS_ADMIN=/u01/oracle/10g/PROD/network/admin PATH=/u01/oracle/10g/PROD/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin ORACLE_HOME=/u01/oracle/10g/PROD Linux sam 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct 15 14:02:40 PDT 2006 i686 i686 i386 GNU/Linux
Can someone help me out here. Please let me know if you need further information, I have posted.[oracle@sam ~]$ sqlplus / as sysdba -bash: sqlplus: command not found
Thanks for the help.
-SamORACLE_HOME=/home/Oracle/Oracle/product/10.2.0/Db_1
Export ORACLE_HOME
PATH = $ORACLE_HOME/bin: $PATH
export PATH -
output with bind variable to sqlplus and then echo $?
Hello world.
I don't know why they are different between: v_num and the value of "echo $?"
Thank you.
------------------------------------------------------------------------------------
SANOWT: oratest: / data3, oratest, oratest, hgjung > cat t.sql
Select count (*) in object;
Number of the v_num variable.
Start
Select count (*) in: v_num object;
exception
When no_data_found then
: v_num: = 1403;
end;
/
output *: v_num *.
SANOWT: oratest: / data3, oratest, oratest, hgjung > scott \sqlplus / * @t
SQL * more: release 10.2.0.3.0 - Production Wed Feb 17 10:11:59 2010
Copyright (c) 1982, 2006, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
COUNT (*)
----------
* 50497 *.
PL/SQL procedure successfully completed.
Disconnected from the database to Oracle 10 g Enterprise Edition Release 10.2.0.3.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
SANOWT: oratest: / data3, oratest, oratest, hgjung > echo $?
* 65 *.
SANOWT: oratest: / data3, oratest, oratest, hgjung >The $? variable in UNIX is the exit code of the program. In most * NIX versions I know, it is limited to values between 0 and 255 (i.e. a byte), so the value is truncated. The hexadecimal value of 50497 is C541 or two bytes, so the $? variable is only to get the last byte of 0x41, which is decimal 65.
John
-
How to get the return value in sqlplus to index?
Hello
I am a PL/SQL Developer, and I have a problem with an existing batch.
Here's the situation:
I have a lot of unix, calling a first script sql with sqlplus (call script0.sql )
script0. SQL call other scripts sql with the command @ (script1.sql, script2.sql,... = > scriptx.sql )
My version of sqlplus is 9.2.
ScriptX.SQL modifies the data in table with insert or update and not commit or rollback anything (it is in charge of script0.sql ).
If there is an error produced in a clue all changes must be rollbacked.
Unfortunately when something fails, it returns only to script0.sql without any information on his breaks down, so continuous script0.sql and when he arrivals all changes are committed because the State of script0.sql is successful when the exit is made.
Is there an equivalent of the $? UNIX in sqlplus to obtain the return of a status @scriptx.sql?
-----
Here is the general syntax of the script0.sql :
WHENEVER SQLERROR EXIT 99;
WHENEVER OSERROR EXIT 98;
@script1.sql
@script2.sql
"exit";
-----
Here's a simple scriptx.sql file:
Insert into table values (x) (y);
-----
Published by: user10713865 on October 30, 2009 06:51Hello
You can use 'Whenever SQLERROR WHAT' options to build the logic.
Use: 'every time THAT SQLERROR EXIT DISMANTLING', if you want to there are a whole script error
OR "WHEN SQLERROR CONTINUE ROLLBACK", if you want to restore and continue to the next.
You might explore other options 'whenever SQLERROR WHAT' to suit your logic and add "COMMIT / ROLLBACK" to not relevant.See sample tests below:
SQL> create table t1 (col1 number primary key); Table created.
* 1. In script1 case fails, then restore and exit *.
kallo:f632736> cat 1.sql WHENEVER SQLERROR EXIT ROLLBACK insert into t1 values(1); insert into t1 values(1); kallo:f632736> cat 2.sql insert into t1 values(2); kallo:f632736> cat main.sql @1 @2 SQL> @main 1 row created. insert into t1 values(1) * ERROR at line 1: ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select * from t1; no rows selected
* 2. When script1 fails, then restore and continue to script2 *.
kallo:f632736> cat 1.sql WHENEVER SQLERROR CONTINUE ROLLBACK insert into t1 values(1); insert into t1 values(1); SQL> @main 1 row created. insert into t1 values(1) * ERROR at line 1: ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated Rollback complete. 1 row created. SQL> select * from t1; COL1 ---------- 2
-
"Select * from cat" returns nothing
Hi all
I have a DB 8i sqlplus. in SQL Plus, when I do 'cat desc', he gave me this:
SQL > cat desc;
Name Null? Type
------------------------------- -------- ----
TABLE_NAME NOT NULL VARCHAR2 (30)
TABLE_TYPE VARCHAR2 (11)
However when I do "select * cat;", I though I would get a list of tables, but instead, I haven't had 'no rows selected '. Why is this?
And the second question is most likely related to the first. I can 'desc user_constraints' but when I tried to select some constraints, I got error like this:
SQL > select constraint_name, constraint_type from user_constraints where tNom = "county_of_use";
Select constraint_name, constraint_type from user_constraints where tNom = "county_of_use."
*
ERROR on line 1:
ORA-00904: invalid column name
And I'm NOT a dba. Any idea?
Thank you
JasonYou'll have to ask a dba_constraints of view, the constraint_type column will show 'P' for the primary key and 'R' for referential integrity constraints (foreign keys).
Best regards
Maxim
-
updates the table running in batch (SQLPlus and Oracle 10 g)
All,
I need to execute multiple update statements consecutively one after the other.
UPDATE table
SET column = expression
Predicates WHERE;
* I use where the different conditions in each update.
Currently I use it since the SQL, one after the other command prompt manually. Is there a way I can include these instructions in a file and run in batch mode, so that all the statements are run one after the other? I'm looking for something similar to UNIX's nohup. I am a newbie to automate actions for a database.
Please help me. Thanks in advance.create a shell script if you have pre-defined set of instructions to run
Annex thi so to run this sql in nohupcat test.sh sqlplus -s scott/tiger<
-
Emergency aid necessary for the restoration of cats whatsapp
Hello. Ive been trying to restore my cats icloud whatsapp but it still seems stuck at "99% of the finish" I deleted and reinstalled and tried to restore several times already and the problem persists. I used connections different wifi plugged into a power source and waited for hours but I can't restore it yet. What can I do? I really want to back my history of cats! Ive even contacted whatsapp and they said it's an issue wih iCloud because they store the history of cats!
iCloud does not store cats WhatsApp.
Help here > https://www.whatsapp.com/faq/en/bb10/28020002
-
Refund for not having cat Evolution sounding and stumbling pack
My daughter bought a pack app for cat Evolution app ($49.99) by mistake. I went to the Apple website and tried to process a refund through the standard refund procedure, but he tells me that the refund can be processed? Anyone know why?
Thank you.
Technically, all purchases are final, but go to iTUnes support and talk to them
Contact - Support official Apple
After that, you may want to consider allowing restrictions (General restrictions, settings,-do not forget this password you will need to do)- and disable app purchases. Prevent from happening again.
Good luck
-
Windows 10 PC iTunes version current cat download items purchased
10PC of Windows; latest version of iTunes
When syncing with an iPhone replacement 6s (because of an iPhone battery defective 6s), I get the message that they have 12 songs that have not been synchronized because they cannot be found.
Contacted Apple cat and they claimed to have reset the All for you, and even after that I am unable to download purchased albums.
Calls the number of service provided by the representative of cat and her busy and shuts down after 2 or 3 seconds.
I don't use I cloud... and when I go on the account/bought/All, all the above albums are listed as purchased, but selection of an album shows that the 'X' in the upper left corner.
The opening of the album songs are listed with an option for 'Buy' or the game, but no download option
No cloud icon, probably because that I do not use iCloud.
Seems to me...
1. you owe me the music I paid for
2. This should not be difficult, or should I say impossible.
3. maybe I should look for another way to buy my music.
4. I now have problems of trust with Apple iTunes... You have customer problems.
I use iTunes for years and have been through three generation sof iPhones, ipad, ipod and now... look to start wondering if the hours I spend to get support worth the cost...
I need assistance of professional level here.
Richard *.
****
< personal information under the direction of the host >
Diana Krall, five albums with missing songs
From this Moment
The Look of Love
When there are tracks in your library with an exclamation point, which means that iTunes cannot locate, iTunes will nevertheless assume that you have them for the purposes of the comparison of your library with your purchase history. This is why you do not get the download links for these articles. Remove broken of the library entries, don't hide from iTunes in the cloud if you are prompted, close iTunes, open, download links of clouds that may appear or the history of your purchases as described in download your past - purchases of Apple Support.
TT2
Maybe you are looking for
-
I want to keep my iMovie on my Nas library
I tried to do this and it say the drive is not compatible (QNAP NAS). I read about being Mac OS journaled but this sint as possible. is there any way of ea to store one of the libraries iMovie on my NAS? Thank you Tom
-
El Capitan update won't download
Hello everyone. For the last few days I tried to download El Capitan. When he approached 5 minutes in order to brand everything closed and disconnected computer or reset because I came back and it's on the login screen. It's really frustrating becaus
-
How to launch OR monitor in the 2nd PC?
Hello, Chris,. I just realized that I need a 2nd PC to run the monitor NOR with my Configurator running at the same time. so I implemented PC2 and bought an another USB-8486. After you have installed the driver software and hardware. I tried running
-
The playing conditions are windows xp, 256 MB of memory, processor p800 with directx 8.1. What are updates to windows xp I have them all.I don't know what that my cpu or what projector system that I use. It's the third time I downloaded this game (
-
The upgrade of the SnS to 5.3.7
Hello, everyone! My company bought separately DMM 5.3.6 and SnS 5.3.2 servers, and they did not work for a long time for an obvious reason. TAC engineer told us that we need to update firmware of the SnS in 5.3.7 to allow two devices to work with the