sqlplus formattin question
Hellomy version of the database is:
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
I am running the following instructions in sqlplus:set serveroutput on size unlimited
set linesize 100
col lvl format 9999
col txt format a80
set pagesize 9999
select level lvl
, rpad ('*', level * 20, 'The quick brown fox jumps over the lazy dog') txt
from dual
connect by level <= 10;
The keyword col instruct sqlplus to maintain txt to 80 column width. It is originally word of packaging when the column is greater than 80:Output:
LVL TXT
----- --------------------------------------------------------------------------------
1 *The quick brown fox
2 *The quick brown fox jumps over the lazy
3 *The quick brown fox jumps over the lazy dogThe quick brown
4 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
5 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
azy dogThe quick bro
6 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
azy dogThe quick brown fox jumps over th
7 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
azy dogThe quick brown fox jumps over the lazy dogThe quick
8 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
azy dogThe quick brown fox jumps over the lazy dogThe quick brown fox jumps over
9 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
azy dogThe quick brown fox jumps over the lazy dogThe quick brown fox jumps over
the lazy dogThe qui
10 *The quick brown fox jumps over the lazy dogThe quick brown fox jumps over the l
azy dogThe quick brown fox jumps over the lazy dogThe quick brown fox jumps over
the lazy dogThe quick brown fox jumps o
Any time the column is greater than 80 characters, after packaging is also add an empty line (from id 5).This is not a big problem, but is it possible to avoid this blank line?
Kind regards.
Al
Hi, Al,
SET RECSEP OFF
eliminates the extra lines.
The UN - do this command is to, unintuitively:
SET RECSEP WRAPPED
Tags: Database
Similar Questions
-
Unable to create the stored procedure batch Oracle Script from Windows
Hello
I put my code here please let me know where I have error
Cmd
-------
DNAME SET = %3
SET UerName = %1
SET Pssword = %2
SET Opdir = C:\Users\testuser\
sqlplus-s '% UerName%/%Pssword%@%DNAME%' @%Opdir%procdure.sql
procedure. SQL
--------------
WHENEVER SQLERROR EXIT SQL. SQLCODE ROLLBACK
WHENEVER OSERROR EXIT SQL. OSCODE RESTORATION
SET SERVEROUTPUT ON
SET ECHO ON
AUTOPRINT SET ON
RUN THE DBMS_OUTPUT. ENABLE (1000000)
COIL Seq.log
SET linesize 1000
CREATE PROCEDURE test "()" ""
AS
BEGIN
NULL;
END test;
SPOOL OFF
OUTPUT
-----------
Demostrating how I executed
C:\Users\nikhilgk > otherobj AAA AAA TEST
C:\Users\nikhilgk > SET DNAME = TEST
C:\Users\nikhilgk > SET UerName = AAA
C:\Users\nikhilgk > SET Pssword = AAA
C:\Users\nikhilgk > SET LOG = C:\Users
C:\Users\nikhilgk > SET Opdir = C:\Users\testuser\
C:\Users\nikhilgk > sqlplus s 'AAA/AAA@TEST' @procdure.sql
PL/SQL procedure successfully completed.
------------------------
Journal is is created with size 0 KB.
I connected to SQLPLUS and questioned
SQL > select object_name from user_objects where type_objet = 'PROCEDURE '.
no selected line.you have'nt actually run the code to create procedure.
create PROCEDURE TEST() AS BEGIN NULL; END test; / -- you need this
also if you want to access without double quotes all the time, do not put double quotes on the name
And I think you should go out; rather than leave. That's why you have a size zero.
Published by: Keith Jamieson 31 August 2012 13:21
-
Question: Using Sqlplus to create a report
Hi masters Sqlplus,
I have the same question as the old thread calculate from the number
COIL D:\TEST. TXT
BREAK ON COL1 ON REPORT
CALCULATION NUMBER OF COL1 NODUP REPORT
CALCULATION NUMBER OF COL2 ON REPORT
with the data as
(
Select 'AAA' COL1, COL2 '1111' from dual
Union of all the
Select 'AAA' COL1, COL2 '2222' from dual
Union of all the
Select 'AAA' COL1, COL2 '3333' from dual
Union of all the
Select 'AAA' COL1, COL2 '4444' from dual
Union of all the
Select 'AAA' COL1, COL2 '5555' from dual
Union of all the
Select 'BBB' COL1, COL2 '1111' from dual
Union of all the
Select 'BBB' COL1, COL2 '2222' from dual
Union of all the
Select 'BBB' COL1, COL2 '3333' from dual
Union of all the
Select 'BBB' COL1, COL2 '4444' from dual
Union of all the
Select 'BBB' COL1, COL2 '5555' from dual
Union of all the
Select 'BBB' COL1, COL2 '6666' from dual
Union of all the
Select 'BBB' COL1, COL2 '7777' from dual
Union of all the
Select 'BBB' COL1, COL2 '8888' from dual
Union of all the
Select 'BBB' COL1, COL2 '9999' from dual
Union of all the
Select "CCC" COL1, COL2 '1111' from dual
Union of all the
Select "CCC" COL1, COL2 '2222' from dual
Union of all the
Select "CCC" COL1, COL2 '3333' from dual
Union of all the
Select "CCC" COL1, COL2 '4444' from dual
Union of all the
Select "CCC" COL1, COL2 '5555' from dual
)
Select * from data;
SPOOL OFF
ED D:\TEST. TXT
The result is like that.
COL COL2 --- ---- AAA 1111 2222 3333 4444 5555 BBB 1111 2222 3333 4444 5555 6666 7777 8888 9999 CCC 1111 2222 3333 4444 5555 --- ---- 19 19 19 rows selected.
How to get the count (col1) = 3, no 19?
For now, I can't use grouping to customize the result, because I have to give the secondary account for each col1 and the short dash line.
Please give me advice.
Phil
Post edited by: Phil in Sydney
The end result is the sequel.
COL COL2 --- ---- AAA 1111 2222 3333 4444 5555 BBB 1111 2222 3333 4444 5555 6666 7777 8888 9999 CCC 1111 2222 3333 4444 5555 --- ---- 3 19 19 rows selected.
Hi, Phil,
Here's a way to change the query:
WITH hide_col1 AS
(
SELECT col1 AS original_col1
col2
ROW_NUMBER () OVER (PARTITION BY col1
ORDER BY col2
) AS r_num
FROM the data
)
SELECT THE CHECK BOX
WHEN r_num = 1
THEN original_col1
END AS col1
col2
OF hide_col1
ORDER BY original_col1
r_num
;
All SQL * most orders can stay as they are.
-
I have a question I need to find the time it takes to run using SQLPLUS. What are the settings that I need to set up before I run the command. ?
Thanks in advance.To get the for each statement executed wallclock time:
SQL> set timing on SQL> select * from dual 2 / D - X Elapsed: 00:00:00.09 SQL> select count(*) from big_table 2 / COUNT(*) ---------- 4680640 Elapsed: 00:00:03.70 SQL>
Cheers, APC
-
Question about the connection using the "sqlplus / as sysdba.
Good afternoon
The command:
worked very well for the Oracle server. When I go to a client, it does not work even if I specify the correct instance. On the client, I can able to connect using one of these two commands:sqlplus / as sysdba
The question is: is the form "/ as sysdba" limited to used on the Oracle server and not available for customers?sqlplus.exe sys/abc123@"orahost.john.local:1521/dbca.john.local" as sysdba or sqlplus.exe sys/abc123@dbca as sysdba but not sqlplus / as sysdba or sqlplus /@dbca as sysdba
Thank you for your help,
John.is the form "/ as sysdba" limited to use on the Oracle Server
Yes
and not available for customers?
Yes
-
A question about the REEL in sqlplus command
Hi all
I have a question about the order of the COIL and I would be grateful if you could kindly give me a helping hand. Consider the following sql script.
It works pretty well, and all the contents of the table "MyTable" is exported to the textfile "result.txt". However, sqlplus also prints the number of linesSPOOL result.txt SELECT * FROM mytable; SPOOL OFF;
Print after each query. So after you run this script, the end of the file, I always have a line like
How can I avoid this line (the number of returned rows) in my output file?... "20541 lines returned"
Thanks in advance,
DariyooshType this command prior to winding.
set feedback off
Kind regards
Prazy -
A question about the order of COLUMN sqlplus and PL/SQL
Hello everyone.
I would like to ask a question about sqlplus command COLUMN that I use in order to define the length of my queries of output columns. So, for example, I run something like:
That is why any column with the name 'the market' will be composed by sqlplus as 20 characters.COLUMN market FORMAT a20
Currently I'm working on a PL/SQL script that makes this automatic procedure, in other words, instead of manually write for each column in the above COLUMN order, it uses the DBMS_SQL. He read first as input the name of the table and then inside a loop, it detects the maximum length.
For those interested, here is the Oracle documentation page that I found (example 8)
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_sql.htm
If everything worked well enough I managed to recover the maximum of each column in my table length, except that I don't know how to use the COLUMN sqlplus command in my PL/SQL block. I would like to do something like that (it's just a pseudo-code)
I would like to know is there a command in PL/SQL to define the appropriate column typeset in sqlplus length?FOR colIndex in 1 .. numberOfColumns LOOP currentColumnName = getColumnName(tableDescriptionObject, colIndex); currentColumnLength = getColumnLength(tableDescriptionObject, colIndex); COLUMN currentColumnName FORMAT a -- and here after 'FORMAT a' I have to write currentColumnLenth but I don't know how to proceed. END LOOP;
Thanks in advance,
DariyooshHi, Dariyoosh,
Sory, I don't think that there is a simple way to publish SQL * most orders fom PL/SQL.
PL/SQL runs in the database (back-end); There isn't any direct contact with SQL * more at the front end.The best way I know is that PL/SQL script (myfile.sql) with orders of the COLUMN, and then have SQL * more run the script (@myfile).
-
column of question: query customerID sqlplus appear twice
I tried several ways to view a query where indicates the client who made more than 3 rentals from 01 Nov to 31 Dec. However, for some reason any the customerID column appear twice.
* I use 3 tables to get this result:
Select RentalAgreement.membershipcardid as "MCardID."
Customer.CustomerID, Customer.CNAME, Customer.Address,
membershipcard. CustomerID, Invoice.rentc, RentalAgreement.DateAndTimeOfIssue,
Count (RentalAgreement.membershipcardid) as 'NOfRents' RentalAgreement, customer, membershipcard, Bill
where rentalAgreement.membershipcardid = MembershipCard.membershipcardid
and customer.customerid = membershipcard.customerid
"and RentalAgreement.DateAndTimeOfIssue between November 1, 2012' and 31 December 2012"
RentalAgreement.membershipcardid group, MembershipCard.
CustomerID, Customer.CNAME, Customer.Address, Invoice.rentc, Customer.CustomerID, RentalAgreement.DateAndTimeOfIssue;
MCardID CUSTOMERID CNAME ADDRESS CUSTOMERID RENTC DATEANDTI
---------- ---------- ---------- ------ ---------- ---------- ---------
NOfRents
----------
107 N151AS of EDuois 27 27 60 11 November 12
5
108 28 WDuois N151AS 28 60 19 November 12
5
101 N193AS of ALuois 22 22 60 22 November 12
5
MCardID CUSTOMERID CNAME ADDRESS CUSTOMERID RENTC DATEANDTI
---------- ---------- ---------- ------ ---------- ---------- ---------
NOfRents
----------
101 N193AS ALuois 22 22 60 21 of November 12
5
101 N193AS of ALuois 22 22 60 20 November 12
5
101 N193AS of ALuois 22 22 60 24 November 12
5
MCardID CUSTOMERID CNAME ADDRESS CUSTOMERID RENTC DATEANDTI
---------- ---------- ---------- ------ ---------- ---------- ---------
NOfRents
----------
109 N151AS of ADDuis 30 30 60 3 December 12
5
Thanks for your time.
I'm not sure if this request seems to be logical, I would be grateful to any online guide to pl/sqlHello
978308 wrote:
Hi to you for your help, I have another question about pl/sql.When you have a new, separate question, then you should start a new and separate thread. This thread has 4 replies and is marked as 'response '. most of the people who have not participated in this thread (and in this case, it's just you and me) are not going to start watching now. You will get much better response if you start a new thread.
I use oracle 11.2.0. I'm trying to get a report of repairs, so I put a condition if:
3. WHERE RETURNED > 1; - then it will only show the repair costsI got an error after exec report_cursor
SQL > exec report_cursor;
ERROR on line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'REPORT_CURSOR' must be declared.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored---------PL/PSQL-----------------------------
The line above shows what is simply boredom!
What follows is not just the PL/SQL code. Like many scripts, it's a mixture of SQL * more and PL/SQL (and, unwittingly, pure SQL, too).
'SET SERVEROUTPUT ON' is a SQL * Plus command. Like all SQL * most orders, be completed before the end of the line. In this case, it means "DECLARE CURSOR report_cursor IS" is taken as part of the SET command. When I run it, I get a SQL * Plus error message "SP2-0158: unknown SET"declare"optionSQL >
1 set serveroutput on DECLARE CURSOR report_cursor ISIf the first line is ignored. Since you have not started a block PL/SQL, lines 2 and 3 are considered as being a pure SQL query.
2. SELECT INVID REFERRED, INVOICEDA, REPAIRDETAIL OF THE INVOICE
3. WHERE RETURNED > 1;
4 I_INVID INVOICE. INVID % TYPE;
5 I_REPAIRFEE INVOICE. SENT % TYPE;
6 I_DATE INVOICE. TYPE % INVOICEDA;
7 I_DETAIL INVOICE. TYPE % REPAIRDETAIL;I know not why the lines 4-7 do not cause any errors, because the DECLARE has been ignored.
From line 8, the script is interpreted as PL/SQL: it looks like an anonymous block that does not have the optional DECLARE section.BEGIN 8
9 DBMS_OUTPUT. Put_line ('ID, cost and Scooter fixed Details'); ...Please formatting your code. It will help you as well as others.
All you have to do is to start the DECLARE statement on a charge line:
set serveroutput on DECLARE CURSOR report_cursor IS SELECT INVID , REPAIRFEE , INVOICEDA ...
-
newbie question: sql runs under sqlplus but does not compile in pl/sql?
I have the following two tables, I have a SQL in pl/sql packages so I can use dbms_jobs to automate it however, I get the compile time error. It seems to me that pl/sql dislikes my sql that works well in sqlplus. Here is the error message and my test case?
mdb_user@cmd > view the error
PACKAGE BODY DATA_QUALITY_REPORT_P errors:
LINE/COL ERROR
-------- -----------------------------------------------------------------
10/1 PL/SQL: statement ignored
13/42 PL/SQL: ORA-00942: table or view does not exist
create the table S_ORG_EXT
(
accnt_type_cd varchar2 (100),
cust_stat_cd varchar2 (100)
)
/
insert into s_org_ext
Select column_name, data_type for user_tab_columns where rownum < = 100
/
Select * from s_org_ext
/
create the table data_quality_report
(
RunId number not null,
report_type number of non-null, - type of report as dup dup or not other measures
org_level number not null, - organization level nsgn, sgn, shipto
loc_level number of non-null, - local level by city, by country, by region, grand_total
name varchar2 (100) not null,-the line output of the tot name.
Value number not null, - line value of the tot.
rundate date default sysdate
)
/
create sequence data_quality_report_seq with 1000
INCREMENT BY 1
NOCACHE
NOCYCLE
/
insert into data_quality_report
Select data_quality_report_seq.nextval, 3, 99, 99, accnt_type_cd, cnt, sysdate from
(
Select accnt_type_cd, count cnt (*) of S_ORG_EXT where cust_stat_cd = 'VARCHAR2' group by accnt_type_cd by 2 desc order
)
/
Select * from data_quality_report
/
truncate table data_quality_report
CREATE or replace PACKAGE data_quality_report_p AS
function pull_data return data_quality_report.runid%type;
END data_quality_report_p;
/
create or replace package body data_quality_report_p as
function pull_data return data_quality_report.runid%type is
new_rid data_quality_report.runid%type;
Start
Select data_quality_report_seq.nextval in the double new_rid;
insert into data_quality_report
Select new_rid, 3, 999999, 999999, accnt_type_cd, cnt, sysdate from
(
Select accnt_type_cd, count cnt (*) of S_ORG_EXT where cust_stat_cd = 'VARCHAR2' group by accnt_type_cd by 2 desc order
);
Return new_rid;
exception
When no_data_found then
DBMS_OUTPUT. Put_line ("NO_DATA_FOUND handles the exception.");
while others then
DBMS_OUTPUT. Put_line ("' handling ANOTHER exception.");
end; -end pull_data
end data_quality_report_p;
/Hello
Sorry, I was not clear about that.
The owner of the package needs direct privileges (not only privileges through a role) to compile the code, whehter it is DEFINE AUTHID or AUTHID CURRENT_USER. Option (3) does not help in this case; my mistake.I usually create packages in the same schema tables they use, which was option (2) in my previous message. There may be good reasons why you can't do that; for example, the package may reference multiple schemas tables. In this case, grant the necessary privileges directly to the owner of the whole.
-
question from newbie sqlplus on 'compute sum '.
I am new to Oracle and trying to get a total general simple to work. I spent
all books in line and use of day as Oracle SQL * more and have not been able to
understand what is wrong. I have a fairly simple table (data does not really
matter) and I want the sum of the column CODE total.
sqlplus-s ${FW_DB_USER}/${FW_DB_PASSWD}@${FW_DB_SID} < < EOF
Set feedback off
clear breaks
Disable calculated
1 set of NEWPAGE
set PAGESIZE 70
Set LINESIZE 70
Collar COUNTRY format a25
Col CODE format a8
BREAK THE REPORT
CALCULATING SUM ETIQUETTE 'TOTAL' OF THE CODE ON THE REPORT
Select the country code of bl_country_gdds, where clmin = '10' and rownum < 10;
Exit 0
EXPRESSIONS OF FOLKLORE
Here is what I get. You can see it print the dotted line, as if she was going to
print the sum, but it's not.
I'm sure it's something simple and stupid, but for the life of me I can't understand
what it is. Any help would be greatly appreciated.
qafusion01: ~ >./test.sh 0
COUNTRY CODE
------------------------- --------
Afghanistan 93
Albania 355
Aruba 297
Belgium, 32
Belize 501
Bhutan 975
Botswana 267
Brunei Darussalam 673
Cameroon 237
--------CODE seems to be a special word to SQ * more. Try using a different name.
URS
-
SQLPlus question...
Hi all
I am trying to create a package in Oracle 10 g Express Edition as follows (the package is contained in the newpackagefile.sql file):
SQL > sqlplus username/pwd@dsn @newpackagefile.sql
But 5 times, he invites me to enter values for different variables. After clicking on the button "Enter" 5 times, it creates the package successfully.
I searched the file newpackagefile.sql for variables, but cannot find them. Why do you think he invites me for variables and how to create the package without having, for example, and then I send it dummy parameters to sqlplus statement in the command line?
Thank you!You are probably using some & character in your script...
Max
-
I like to write code to export a prompt value can someone explain how to do this.
That's what I have so far: invite please enter your Oracle 11 g SID:
But I want the SID of the Oracle who entered to be exported automatically,
some can help me with this. Thank you
read Pei "ORACLESID enter:"myvar ".
export ORACLE_SID = $myvar
-
Hello-
I am facing the following question when I try to connect by using the command prompt sqlplus for Oracle 11.2.0.3 DB installed and running on HP - UX.
The password is not all special characters & I also tried with the double quotes which did not work.
Following want to work with username/password@TNSNAME because I'm trying to get my application to connect to the database, the schema mentioned because it uses the jdbc connection with the connection as (username/password@TNS:1521) string.
C:\Users>sqlplus username/Pa55w0rd@DBNAME; SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 10 07:21:43 2016 Copyright (c) 1982, 2010, Oracle. All rights reserved. ERROR: ORA-12154: TNS:could not resolve the connect identifier specified Enter user-name: C:\Users>tnsping DBNAME TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-FEB-2 016 07:21:57 Copyright (c) 1997, 2010, Oracle. All rights reserved. Used parameter files: C:\app\product\11.2.0\client_2\network\admin\sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = server.domain) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DBNAME))) OK (50 msec) C:\Users>sqlplus username@DBNAME SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 10 07:22:05 2016 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> show user USER is "username" SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options C:\Users>
content content of tnsnames.ora & sqlnet.ora:
DBNAME = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = server.domain) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DBNAME) ) )
# sqlnet.ora Network Configuration File: C:\app\product\11.2.0\client_2\network\admin\sqlnet.ora # Generated by Oracle configuration tools. # This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # authentication, they will not be able to connect to the database on NT. #SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Thanks in advance
Hello
sqlplus username/Pa55w0rd@DBNAME;
Try it without the semicolon;
sqlplus username/Pa55w0rd@DBNAME
Regards Thomas
-
Good,
Let me explain the whole scenario...
-Installation 11.2.0.3.0 RAC on RHEL 6.5
-Silent Install (GI 4 RAC nodes)
-Every success, except resolve.conf (that we do not use DNS to resolve the scan) prerequisites in the scene runcluvfy.sh - pre...
-Installation launched, remote operations successful, root.sh script prompted and DAMN... gave below error
= o/p of the root.sh on screen script =.
User ignored the prerequisites during installation
/U01/app/11.2.0/grid/bin/sqlplus - V... has no rc = 127 with message:
/U01/app/11.2.0/grid/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: no such file or directory
Cannot add (property/value): ('VERSION / ") for the control point: ROOTCRS_STACK. Error code is 256
/U01/app/11.2.0/grid/bin/ocrconfig.bin: symbol lookup error: /u01/app/11.2.0/grid/lib/libclntsh.so.11.1: undefined symbol: nnfyboot
Cannot create or upgrade OLR
/U01/app/11.2.0/grid/Perl/bin/perl-I/U01/app/11.2.0/grid/Perl/lib-I/U01/app/11.2.0/grid/CRS/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed
= root.sh records ends =.
Now, this question is there for nearly 20 hours with Oracle Support and I have tried almost possible workaround suggested by Oracle Support (reboot, reinstall and...)
Well I have no doubt in the Support of Oracle asking here on the issue, but to get chance that someone had already faced this same question.
Now, I wish ultimately I find a culprit who are lower than o/p.
=========================================
[lib root@node1] # ls - ltr libsqlplus.so
-rw - r - r - 1 grid oinstall 1477446 August 5, 2011 libsqlplus.so
[lib root@node1] # ls - ltr libclntsh.so.11.1
-rw - r - r - 1 root oinstall 52697691 December 10, 00:46 libclntsh.so.11.1
[root @node1 lib] # ls - ltr libnnz11.so
-rw - r - r - 1 root oinstall 7955322 August 17, 2011 libnnz11.so
[root @node1 bin] # ls - ltr sqlplus
-rwxr-xr-x 1 grid oinstall 9352 sqlplus August 5, 2011
======
[@node1 grid grid] $ ldd /u01/app/11.2.0/grid/bin/sqlplus
Linux - vdso.so.1 = > (0x00007fff7e72a000)
libsqlplus.so = > not found
libclntsh.so.11.1 = > not found
libnnz11.so = > not found
libdl.so.2 = > /lib64/libdl.so.2 (0x00000031f7400000)
libm.so.6 = > /lib64/libm.so.6 (0x00000031f8400000)
libpthread.so.0 = > /lib64/libpthread.so.0 (0x00000031f7c00000)
libnsl.so.1 = > /lib64/libnsl.so.1 (0x00000031f9c00000)
libc.so.6 = > /lib64/libc.so.6 (0x00000031f7800000)
/lib64/ld-linux-x86-64.so.2 (0x00000031f7000000)
========================================
your questions and comments are welcome...
Re-install gcc libraries and test it.
-
Strange question NLS_DATE_FORMAT
Hello
DB host: OEL 5.4 32-bit
Oracle db: 11.2.0.3
I put the variable NLS_DATE_FORMAT, but do not know why it does not show sysdate in this format.
I think I might have hit some sort of bug, an idea.
[oracle@ocmprimary ~] $ echo $NLS_DATE_FORMAT
MM/DD/YYYY HH24:MI:SS
[oracle@ocmprimary ~] $ sqlplus / as sysdba
SQL * more: Production of liberation 11.2.0.3.0 kills him Aug 25 20:01:34 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > select sysdate to double;
SYSDATE
---------
25 AUGUST 15
SQL > select * from v version $;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE Production 11.2.0.3.0
AMT for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL >
Here's the SET output
[oracle@ocmprimary ~] $ set
AGENT = / u01/app/oracle/agent11g/bin
BASH = / bin/bash
BASH_ARGC =)
BASH_ARGV =)
BASH_LINENO =)
BASH_SOURCE =)
BASH_VERSINFO = ([0] = "3" [1] = "2" [2] = "25" [3] = "1" [4] = 'free' [5] = "i686-redhat-linux-gnu")
"BASH_VERSION ='3.2.25 1-release.
Colors=/etc/DIR_COLORS.xterm
COLORTERM = gnome-terminal
COLUMNS = 237
DBUS_SESSION_BUS_ADDRESS = unix: summary = / tmp/dbus-ciVMoHgzIZ, guid = ffa47a8716d695c36a827a0055dd0cb7
DESKTOP_SESSION = default
DESKTOP_STARTUP_ID =
DIAG = / u01/app/oracle/diag/rdbms /.
DIRSTACK =)
DISPLAY =: 0.0
EUID = 500
GDMSESSION = default
GDM_XSERVER_LOCATION = local
GNOME_DESKTOP_SESSION_ID = default
GNOME_KEYRING_SOCKET = / tmp/Keyring-Mz2Xnd/socket
GROUPS =)
GTK_RC_FILES=/etc/GTK/gtkrc:/Home/Oracle/.gtkrc-1.2-Gnome2
G_BROKEN_FILENAMES = 1
HISTFILE=/home/Oracle/.bash_history
HISTFILESIZE = 1000
HISTSIZE = 1000
HOME = / home/oracle
Hostname = ocmprimary
HOSTTYPE i686 =
IFS = $' \t\n'
INPUTRC = / etc/inputrc
LANG is en_US. UTF-8
LESSOPEN='|/usr/bin/lesspipe.sh % to
LINES = 50
LOGNAME = oracle
LS_COLORS='no=00:fi=00:di=00;34;41:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32 :* .tar = 00; 31: * .tgz = 00; 31: * .arj = 00; 31: * .taz = 00; 31: * .lzh = 00; 31: * .zip = 00; 31: * .z = 00; 31: Z = 00; 31: * .gz = 00; 31: * .bz2 = 00; 31: * .bz = 00; 31: * .tz = 00; 31: * .rpm = 00; 31: * .cpio = 00; 31: * .jpg = 00; 35: * .gif = 00; 35: * .bmp = 00; 35: * .xbm = 00; 35: * .xpm = 00; 35: * .png = 00; 35: * .tif = 00; 35:'
MACHTYPE = i686-redhat-linux-gnu
MAIL = / var/spool/mail/oracle
MAILCHECK = 60
NLS_DATE_FORMAT = "HH24:MI:SS DD/MM/YYYY '.
OPTERR = 1
OPTIND = 1
ORACLE_BASE = / u01/app/oracle
ORACLE_HOME=/U01/app/Oracle/product/11.2.0/dbhome_1
ORACLE_SID = primdb
OSTYPE = linux-gnu
PATH=/usr/Kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/Home/Oracle/bin:/U01/app/Oracle/product/11.2.0/dbhome_1/bin
PIPESTATUS =([0]="127")
PPID = 4457
Prompt_command ='echo - don't '\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~} '; ECHO - not "\007" '
Ps1='[\u@\h \W]\$ '
PS2 =' > '
PS4 = ' + '.
PWD = / home/oracle
SESSION_MANAGER = local/ocmprimary: / tmp /. ICE-unix/4172
SHELL = / bin/bash
SHELLOPTS = braceexpand:emacs:hashall:histexpand:history: interactive-comments: monitor
SHLVL = 2
SSH_AGENT_PID = 4246
SSH_ASKPASS = / usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/SSH-gFzAVx4172/agent.4172
TERM = xterm
TNS_ADMIN=/U01/app/Oracle/product/11.2.0/dbhome_1/network/admin/
UID = 500
USER = oracle
USERNAME = oracle
WINDOWID = 30427226
Xauthority=/tmp/.gdmTH6U3X
XMODIFIERS=@IM=none
_ = ALL
ConsoleType = pty
tmpid = 500
[oracle@ocmprimary ~] $
What I'm missing here? Sometimes questions that are so basic as this can throw you :-(
Regardless of what I put under unix, I always get sysdate as ME-DD-YYYY
-Learner
Hello
It of on the NLS_LANG variable, so run the query below on your database:
select 'export NLS_LANG='||p1.value||'_'||p2.value||'.'||p3.value NLS_LANG from nls_database_parameters p1, nls_database_parameters p2, nls_database_parameters p3 where p1.parameter = 'NLS_LANGUAGE' and p2.parameter = 'NLS_TERRITORY' and p3.parameter = 'NLS_CHARACTERSET';
Then export NLS_DATE_FORMAT both NLS_LANG on the operating system and run the query again on SQLPLUS.
Kind regards.
Maybe you are looking for
-
For all counters of beans out there. What is the duration period of an iOS (iPad, iPod) device before that we are unable to upgrade to the next OS? I have 3 2012 devices that are not able to upgrade to IOS 10. Any ideas?
-
Question of Chipset IEEE Tecra M5-389
Hi on board,just a quick question to see if the new model Tecra M5-389, which I'm looking to buy has a Texas Instruments firewire onboard chipset. I guess that it should not be the exact model that I'm sure that the same chipset would be used in the
-
login screen shows but won't let me log on
I turned on my IMac this morning. Displays the login screen, but when I click on my name, it does not. I did a restore to my time capsule, but it changed nothing. I can't always connect. Any help would be appreciated.
-
Sometime last year I tried to change my vista desktop theme and I found that the screen wasn't there everything I had, it was the style customization options old XP offers windows xp and style classic and high definition. I thought it was me being st
-
video player called watch background
Hi all is there, We have a page, showing little content, and the user can tap on a thumbnail of the video. We then invoke the video player and the video opens and plays normally. The title and the menu hide after a few seconds. Attaching of tape on v