Weird RPAD translates 11g using SQLPLUS
OK, I have two different versions of Oracle.My 10g database...
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I have run in SQLPLUS SQL
SELECT RPAD(FIRST, 20), RPAD(LAST, 20) FROM (
SELECT 'James' FIRST, 'Brown' LAST FROM dual
UNION
SELECT 'Christopher' FIRST, 'Columbus' LAST FROM dual
)
And I get the following resutls...RPAD(FIRST,20) RPAD(LAST,20)
-------------------- --------------------
Christopher Columbus
James Brown
2 rows selected.
But if I do the same things on my database 11g...Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
I get...
RPAD(FIRST,20)
--------------------------------------------------------------------------------
RPAD(LAST,20)
--------------------------------------------------------------------------------
Christopher
Columbus
James
Brown
2 rows selected.
Why is it formatted oddly, and how can I solve this problem?Published by: selectsplat on July 7, 2010 07:42
TRUE is the default and recommended value setting cursor_sharing
http://download.Oracle.com/docs/CD/E11882_01/server.112/e10820/initparams041.htm#REFRN10025
It must only be on another value to fix a buggy application that does not use bind variables, preference only at the level of the session for the broken application connections.
You will need to discuss with your DBA to find why they put a default value and why they apparently did the scale of the entire base of the system.
Tags: Database
Similar Questions
-
Not able to connect to the database using SQLPLUS.
Hello
in the connection to the oracle in linux machine using sqlplus utility database I got following error.
does anyone have an idea about this error?
[oracle@LOM-NEYTR-RHEL-NEW1 dbhome_1] $ sqlplus
SQL * more: Production of release 11.2.0.1.0 game may 15 10:22:50 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter the user name:
Enter the password:
ERROR:
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01653: unable to extend the table SYS. AUD$ 8 in the SYSTEM tablespace
ORA-02002: error writing to the audit trail
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01653: unable to extend the table SYS. AUD$ 8 in the SYSTEM tablespace
7144389e-3944-4D5C-830e-46539d2d9971 wrote:
I found the temporary solution. You can go through the following link where I got the idea.
So has what "temporary" solution applied?
And especially, what is the permanent solution will you.
The most common solution, which goes back at least to when I started with v7.3, is to move the aud$ table out of the SYSTEM tables. And with 11g, there is even a new package for the management of the audit trail, including a method for moving the table. See DBMS_AUDIT_MGMT
-
How to get code written for perticular purpose of database using sqlplus?
Hello
I'm trying to get the syntax written for the purpose of perticular (view/Table) database using sqlplus.
Can someone help me on this please.
Thanks in advance,
NISH
I'm trying to get the syntax written for the purpose of perticular (view/Table) database using sqlplus.
Can someone help me on this please.
Use the DBMS_METADATA package:
Select dbms_metadata.get_ddl ('TABLE', 'EMP', 'SCOTT') of double
Select dbms_metadata.get_ddl ('DISPLAY', 'V_EMP', 'SCOTT') of double
-
Hello
When I use sqlplus XE 11 G it creates repository adr to my directory as oradiag_myuser.
How can I stop this?
Kind regards
Jari
-----
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolaiYou can create the sqlnet.ora file in the folder * $ORACLE_HOME/network/admin / * and set the parameter. You can point TNS_ADMIN to this directory. tnsnames, listener files are usually in the same folder.
-
Update CM name of node using sqlplus
Hi all
Please notify
EBS r12 12.1.3 on oul5 x 64
After the clone system is in place, I have to connect to simultaneous OAM-> Manager-> set and change the name of the node from the old to the new node name.
Question: would like to update using sqlplus directly to some table that store the node name and the name of the target node.
I saw the tables FND_CONCURRENT_QUEUE_VL AND FND_CONCURRENT_QUEUE, but it doesn't look right.
Advise please.
Thanks in advance.
Kind regardsuser3715462 wrote:
Hi allPlease notify
EBS r12 12.1.3 on oul5 x 64
After the clone system is in place, I connect simultaneous OAM--> manager--> set and change the name of the node from the old to the new node name.
Question: would like to update using sqlplus directly to some table that store the node name and the name of the target node.
I saw the tables FND_CONCURRENT_QUEUE_VL AND FND_CONCURRENT_QUEUE, but it doesn't look right.
Advise please.
Thanks in advance.
Kind regardsEven if the direct update is not recommended, I usually update APPLSYS. FND_CONCURRENT_QUEUES (NODE_NAME, NODE_NAME and TARGET_NODE columns) on my case ONLY cloned with no problem - http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_QUEUES&c_owner=APPLSYS&c_type=TABLE
Make sure that you run the cmclean.sql script once you upgrade the CMs with the correct server name - concurrent processing - CMCLEAN. SQL - Script Non-destructive to clean the simultaneous Tables Manager [ID 134007.1]
Thank you
Hussein -
How to use sqlplus to connect and run control?
Hello, I have a little problem please help me
I want to use sqlplus to connect and run the command
for example: sqlplus test/test@DB select sysdate double;
and then it will show on the screen (sysdate) data
What should I do?
Thank youWrong tool. You should start with something like this:
#! usr w
use strict;
Use DBI;SQL * more isn't a script tool.
-
My Adobe Flash CS6 color picker has WEIRD colors. I use Mac Mini OSX 10.8.1. Is there a solution?
I click on the color picker and where I saw the normal color #0000ff blue on my windows computer, this version of mac mountain lion shows a color purple-ish. Strangely, if I enter the # hex in the color picker and use it as a filler, the correct color appears on the scene, but when I use the pipette on that color, it shows as purple color again on the toolbar.
I saw something similar to this happen when you use adobe photoshop. However, the usual solution is just to do the color management profile to monitor RGB. The only drawback with Flash is there is no preference to set. The palette of colors in Adobe Photoshop displays as it should with correct blue.
I should also mention that I use a Samsung 941bw monitor with my mac mini, which could also be part of the problem.
I thought I would make this post anyway, just in case it's the OS & Adobe Flash CS6 and not the monitor.
I've included a screenshot over which shows that I chose the color purple and then did a form of a rectangle on the stage and it comes out blue.
Thanks for your response (s)
-Line
You can try to change the display settings of your monitor in Adobe RGB color (1998).
System Preferences > displays > color and see if that helps.
Thank you
-
I'm trying to set the mode of maintenance by using the adsetmmd.sql script, but its not allowing me to run
appldev@appl11:/u09/dev/appl/ad/11.5.0/patch/115/SQL >; sqlplus apps/[email protected] ENABLE
Use: SQLPLUS [< option >] [< user > [< password >] [@ < host >]]
[@ < startfile > [< parm1 >] [< parm2 >]...]
where < option >: = {s-|-?}
s for silent mode and -? to get the version number
its 11i
DB: 10.2.0.4
Please let me know where I am going wrong.Hello
Finally, I'm able to put MMD using sqlplus, it is and must be the space after apps/apps
Yes, and that's what I have mentioned above two times :)
Thank you
Hussein -
I need to run a sparql query using sqlplus. I had something real simple works very much like:
Select s, table type (sem_match ('(? s RDF: type? type)', sem_models ('cnodb'), null, null, null))
However, I get errors when the sparql is a little more complex like this:
Select subj, rel, table obj (sem_match ('(? s rdf:object?. obj? s subject? subj.? s element? rel)', sem_models ('cnodb'), null, null, null))
ERROR on line 1:
ORA-29532: Java completed by eception Java exception appeal:
oracle.spatial.rdf.server.ParseException: encountered '. ' in line 1, column 21.
Expected:
")" ...
ORA-06512: at the 'MDSYS. RDF_MATCH_IMPL_T', line 203
ORA-06512: at the 'MDSYS. RDF_MATCH_IMPL_T', line 67
ORA-06512: at line 4 level
Does anyone know the proper syntax to submit this sparql? Thank you.
RussHello
Two types of syntax are supported: bracket (1) and (2) the brace.
Your query with parenthesis syntax would be:
Select subj, rel, table obj (sem_match ('(? s rdf:object? obj) (? s subject? subj) (? s element? rel)', sem_models ('cnodb'), null, null, null))
With the curly brace syntax, it would be:
Select subj, rel, table obj (sem_match ('{? s rdf:object?. obj? s subject? subj.? s element? rel} ", sem_models ('cnodb'), null, null, null"))
UNION and key words FILTER are only supported in the brace syntax. You can see the documentation describing the SEM_MATCH for more information: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/sdo_rdf_concepts.htm#CHDJACII
I hope this helps.
-
startup using sqlplus use spfile
I am facing a strange problem. I don't know if this is normal behavior in the CCR or not.
When I start the database using srvctl, it always uses the spfile shared, which is located in the commune of ASM diskgroup.
Then, when I start the database using sqlplus, always look in the directory of $ORACLE_HOME/dbs and mount init < SID > .ora file (there is no spfile does exist in this directory). So I can't change settings dynamically. Could someone explain to me why is it so?.Hello Silva,
Certainly, oracle research parameter file in $ORACLE_HOME/dbs by default in the RAC environment, this is a normal behavior of the CARS. As for your explanation, I can confirm that you do not haveinit .ora file in $ORACLE_HOME/dbs. In your case, srvctl research pfile in local ORACLE_HOME, who will point to the location of each file the node pfile-spfile. I'll show you an example to clarify:
Let's say you have 3 node RAC (NŒUD: ud1, Node2, Node3)
and get the name myservice Service (Instance: myservice1, myservice2, myservice3) respectively.
You have shared spfile(i.e. spfilemyservice.ora) ASM diskgroup that is accessible from each node.
In this case you supposed to create pfile (i.e. init> .ora) in $ORACLE_HOME/dbs in each node
and place the container as shown below:
SPFILE ='> / spfilemyservice.ora' Example:
Node1:
make a file $ORACLE_HOME/dbs/initmyservice1.ora and have SPFILE ='> / spfilemyservice.ora' as its content.
Node2:
make a file $ORACLE_HOME/dbs/initmyservice2.ora and have SPFILE ='> / spfilemyservice.ora' as its content.
Node3:
make a file $ORACLE_HOME/dbs/initmyservice3.ora and have SPFILE ='> / spfilemyservice.ora' as its content. Now, bounce back you, data and services and try to start the database, then it will use spfile as you expected.
Thank you
SureshGPublished by: Suresh Gautam on November 24, 2009 21:13
-
How to change a procedure using sqlplus...
command to change a procedure using sqlplusHello
Laughing says:
command to change a procedure using sqlplusYou cannot change a procedure in the way that you can, say, ALTER TABLE; all you can do is CREATE OR REPLACE PROCEDURE..., with the definition of the whole procedure.
Do the actual editing in a text editor. Any editor will do. You can even use a word processor, if you think to save it as text only.
If you don't have a copy of the procedure as it is, and then use dbms_metadata, or query a view of data as all_source dictionary to get a.
In SQL * Plus, run the file that you have edited by saying:
SQL> @pathname\filename
-
Procedure script using sqlplus.
Hello group,
I use Toad to load a script package. But just in case how can I get the script packages or a table using sqlplus el.
Thank you.SQL > Set long =< to="" some="" higher="" value=""> > ...
SQL > select the text in dba_source where...
Oops... I don't know what you need...
Published by: sagechristelle on October 1st, 2008 16:41
-
In addition, the text of the web page that is responsible has changed in a weird font that I, that I recognize as Desdemona.
This problem disappears in Mode without failure, but even after reset all my settings (by disabling all extensions, etc.) I have the same problem as soon as I open the application.
I tried to reinstall and even the installation of several versions of the software, but nothing has worked. This problem happened after a system crash, but everything else - other applications, system services, etc. have been retrieved and work perfectly again.
(I have the same problem loading Thunderbird 5).
Try to turn some prefs Boolean gfx.font_rendering on the topic: configuration page to disable certain features and maybe gfx.direct2d.disabled-> true to disable Direct2D.
Filter: gfxgfx.font_rendering.directwrite.use_gdi_table_loading
To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.
If you see a warning then you can confirm that you want to access this page.- Use the filter at the top bar of the on: page config to more easily spot a preference.
- Preferences that have changed see the bold (user set).
- Preferences you can restore the default value or change via the context menu.
-
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.
-
Not able to connect using sqlplus username/password@dbname
Hello
I am new to Oracle, upon request to help me solve this problem.
I am trying to connect to the database using the schema name and the password as:
sqlplus username/password@dbname
But it gives me the following error:
ERROR:
ORA-01017: name of user and password invalid. connection refused
But I'm able to connect with the same username and password when I just spent like:
$sqlplus
Enter the user name: user name
Enter the password: password
SQL >
I checked the tnsnames.ora and sqlnet.ora file and the values inside these files are perfect.
I have only a single database on this computer.
Machine OS: linux
Please help me is to resolve this.
Thank you
-Rajiv
mferrera wrote:
Stevens thank you for your quick response...
The ORACLE_SID is worth of database to which I want to connect to... and like I said, I have only a single database on this computer... so no question to connect to other databases...
Yes, there is a question to connect to a different database. Oracle is too dumb to lie down, particularly on your reported error message. You provide is not exactly the same credentials or your connection remotely ("@dbname") points to a different database. Note that when you use this syntax, 'database_name' is not the name of the database, but rather the name of an entry in tnsnames.ora. This entry specifies the target host and port, as well as the name of the service (database).
Use copy and paste from a command line session to show us the full order and full power of 'tnsping database_name. "
where 'database_name' are any real value you used when you received the error.
Maybe you are looking for
-
Hello everyone, I bought this fantastic machine called spectrum x 360 and I love it. Unfortunately since the early days I'm facing what I think it's a problem of driver/software (not the related material). This problem only occurs when I'm on Windows
-
AVG Free anti-virus analysis reports errors potentially dangerous following rootkit
AVG anti-virus free the following errors of potentially dangerous rootkit analysis reports - ' ";" C:\WINDOWS\system32\drivers\sppz.sys «;» ATAPI.sys, Hung import HAL.dll READ_PORT_USHORT-> sppz.sys + 0x20C0"; "' Object is hidden" ' ";" C:\WINDOWS\sy
-
Clock on PC, waste of time, I have to reset 4 or 5 times a day
Original title: CLOCK ON PC LOSING TIME, IHAVE to RE SET 4 OR 5 TIMES a DAY. The clock in the taskbar is waste of time, I have to update several times. Stan
-
I'm trying to download creative cloud but I get an error 204
I'm trying to download creative cloud, but he won't let my and it says that its a mistake 204 how remedy.
-
possible to retrieve the deleted vNIC MAC address
HelloI deleted a vNIC and added a new vNIC in a troubleshooting session. The problem is that the server is picky about the MAC address due to licensing and now I would like to know if there is a way to recover the deleted vNIC mac address.