Bug in SQL*Plus 9.2.0.1.0 with 8.1.6 instance.
WARNING !!!!
I just installed the client 9.2.0.1.0 but we are still using 8.1.6.3.8 databases on NT.
There is a major BUG in SQL*Plus 9.2.0.1.0. If you do a select on a sys table that have a LONG column, SQL*Plus exits immediately !!!
For example if you try the following "select * from dba_views where rownum = 1;" SQL*Plus crash immediately with no error message.
I could not reproduce this bug with our Unix databases.
Hi,
Ok this is defenitly a bug and it can be reproduce with a 9.2.0 client with a 8.1.7 database if and only if the database national character set is WE8ISO8859P1.
A workaround is to change the national character set from WE8ISO8859P1 to WE8DEC. If you use the regular expression "alter database national character set WE8DEC" you will get an error because WE8DEC is not a superset of WE8ISO8859P1. You will have to use the "INTERNAL_USE" clause as in "alter database national character set INTERNAL_USE WE8DEC".
The magic INTERNAL_USE clause is not documented anywhere !
Thanks
Similar Messages
-
Language issues in SQL*Plus 8.1.7 for win 2000
Hi,
I installed Oracle Client 8.1.7 /Win 2000 release.
When I use SQL*Plus 8.1.7, I can not type nor read Arabic characters. My Win 2000 has all the Arabic components. And I am using AR8ISO8859P6 character set on both DB and Registry edit.
I feel like it is a bug in SQL*Plus 8.1.7 on win 2000.
Did anyone face such problem?? Do anyone have a solution?
(Note: When I type Arabic characters it is displayed as Latin characters. When I store them in DB and retrieve them from an other application they are retrieved correclty)
nullHi
I had similar problem with Cyrillic characters on previous version of Oracle on Windows NT 4.0. We could not find good solution for them. Only solution we found was to write sql commands in notepad and send it in SQL*Plus with copy and paste.
Regards
null -
How to control logic flow in SQL Plus script
Hi
I have the requirement below:
Before I start running an SQL script, I need to ensure that I am connecting as a particular user. If I am not that user, then the script should show a msg "Error - Invalid User - Log in as <<username>>"
Let's say i am executing a script A.sql.
SQL > @<path>a.sql
But before this script is executed -- i shall check for the user:
block begins...
select user into var1 from dual
if upper(var1) != 'ABCUSER' then
-- display the error message and stop execution of this script
else
@<path>a.sql (*it executes what i want :) )
end if;
block ends...
How do I write this code using an SQL script ? Pls suggesHi,
As Centinul said, SQL*Plus is poorly equipped to deal with problems like this. If possible, try to do what you want outside of SQL*Plus.
If you really have to do it in SQL*Plus, here are two ideas:
(1) run a script conditionally
(2) deliberately raise an error
(1) Using SQL*Plus substitution variables, you can decide which of several scripts to run as a sub-script, based on the results of some query.
For example, if a.sql is the script that only user ABCUSER is allowed to run, then write two other very short scripts:
(a) warning.sql, such as the following:
-- warning.sql
PROMPT You are not authorized to do this.
QUIT(b) step_1.sql, which decides whether a.sql or warning.sql should be run, and does it:
-- step_1.sql - Decide whether a.sql or warning.sql is to be run next, and do it.
-- (a) decide:
COLUMN script_name_col NEW_VALUE script_name
SELECT CASE
WHEN USER = 'ABCUSER'
THEN 'a.sql'
ELSE 'warning.sql'
END AS script_name_col
FROM dual;
-- do:
@&script_nameYou may want to use @@, or specify a complete path name.
(2) Deliberately raise an error, either in a separate script or in a.sql itself, like this:
WHENEVER SQLERROR EXIT
SELECT CASE
WHEN USER = 'ABCUSER'
THEN NULL
ELSE TO_NUMBER ('This will raise ORA-01722')
END AS "Welcome!"
FROM dual;
WHENEVER SQLERROR NONE
-- continue with the original a.sql -
Sql*plus in Windows Vista OS
Hi,
I got 'Windows Vista' OS, where 'Oracle 10G Express Edition' installed.
To my knowledge sql*plus should be available by default with Oracle version. But here 'Run sql Command Line' is being appeared which has got the similar look as a command prompt which seems to be incovenient. Is there anyway that i can have sql*plus with tool bar in it.
Thanks,
Ram JIs there anyway that i can have sql*plus with tool bar in it.If you mean the "old" sqlplusw, then no, there isn't. You can :
1. use SQL Workshop within XE
2. install SQL Developer (free). -
The subject sums it up pretty well... I have a query that works fine from SQL*Plus, but throws a JDBC exception with "ORA-00904 invalid column name" if I create a PreparedStatement from it and call executeQuery().
The query itself is substantially similar to:
SELECT foo, t.bar.getStringVal() from some_table t
where "Some table" is an oracle 9i table, "foo" is a varchar2 column, and "bar" is a column that used to be varchar2 before I dropped and re-created the table with an xmltype column instead. "t" is an alias for the table that I didn't used to need (since it's only one table), but apparently is required for getStringVal() to work.
... And, of course, .getStringVal() is being used as a convenient way to treat technically LOB-like xmltype columns as big ersatz varchar2 columns so I won't have to screw around with stream i/o just to read a 4,001-byte value into a String ;-)
I'm using the ojdbc14.jar thin driver and a fairly recent j2sdk (1.4.1_02, I think). I made a point of anihilating every copy of classes12.zip on my PC just to make sure it wasn't lurking in a classpath somewhere to screw things up.
Strangely enough, it DOES work from within Netbeans' database explorer (itself connecting to the same Oracle database using the ojdbc14.jar thin driver).
For the sake of being comprehensive, here's an example of the actual JDBC code that won't work:
public ResultSet doQuery(Connection conn, int val) throws SQLException {
String sql = "SELECT foo, t.bar.getStringVal() from some_table t where anothercolumn = ?";
PreparedStatement sth = conn.prepareStatement(sql);
sth.setInt(1, val);
ResultSet rs = sth.executeQuery();
// everything past this point is moot,
// because sth.executeQuery throws an exception...
// however, the ResultSet would ultimately be
// returned to the method's caller, and
// its values read using getString(fieldname)
// including 'bar', the xmltype field...OK, this particular problem was my fault. The original table was on a server running 8i. To spare myself the grief of having to deal with CLOBs on 8i's terms and take advantage of 9i's new conveniences for handling them, I created a new table on our other server that's running 9i and updated the app's config settings to reflect the new server. Unfortunately, I forgot that the debugging/testing main() method had the URL of the old database hardcoded (it was written before the rest of the class). Ergo... it was still looking at the old database. Oops. (*blush*).
-
Format problem in SQL/Plus 9.2
In SQL/Plus 9.2 I am working with SET AUTOTRACE ON:
explain-plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=11 Card=1 Bytes=52
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'BER_POSITION' (Cost=2 Ca
rd=1 Bytes=20)
2 1 NESTED LOOPS (Cost=11 Card=1 Bytes=52)
3 2 NESTED LOOPS (Cost=10 Card=1 Bytes=32)
4 3 NESTED LOOPS (Cost=9 Card=1 Bytes=25)
5 4 NESTED LOOPS (Cost=8 Card=1 Bytes=21)
6 5 INDEX (FULL SCAN) OF 'BEV_PK' (UNIQUE) (Cost=35
Card=14439 Bytes=72195)
7 5 TABLE ACCESS (BY INDEX ROWID) OF 'EAP_ERGEBNISSE
' (Cost=2 Card=1 Bytes=16)
8 7 INDEX (RANGE SCAN) OF 'EE_VGNR_IDX' (NON-UNIQU
...I would like to have the following:
explain-plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=11 Card=1 Bytes=52)
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'BER_POSITION' (Cost=2 Card=1 Bytes=20)
2 1 NESTED LOOPS (Cost=11 Card=1 Bytes=52)
3 2 NESTED LOOPS (Cost=10 Card=1 Bytes=32)
4 3 NESTED LOOPS (Cost=9 Card=1 Bytes=25)
5 4 NESTED LOOPS (Cost=8 Card=1 Bytes=21)
6 5 INDEX (FULL SCAN) OF 'BEV_PK' (UNIQUE) (Cost=35 Card=14439 Bytes=72195)
7 5 TABLE ACCESS (BY INDEX ROWID) OF 'EAP_ERGEBNISSE ' (Cost=2 Card=1 Bytes=16)
8 7 INDEX (RANGE SCAN) OF 'EE_VGNR_IDX' (NON-UNIQU
...I set linesize to 1000, but it has no effect.STFF [url http://forums.oracle.com/forums/click.jspa?searchID=6153770&messageID=1822302]Formatting output of execute plan in sqlplus
-
Can I install SQL Plus in a client PC?
Dear buddies,
I am working on a PC which accesses the database using PL/SQL Developer and command line SQLPLUS (instant client). I would like to download SQL PLUS as well. Is there a way? I have seen some PCs in such a way but not sure on how to do it.
Could anyone guide me.
Thanks in advance.
Seeking your support.
AlaguBased on "white" color background, think you might be looking for SQL*Plus for Windows (sqlplusw.exe).
This can be found in the Oracle database download page, but if your just interested in the SQL*Plus for Windows download the client zip file.
Assuming your looking for version 11g for Windows (32bit), link to [http://www.oracle.com/technology/software/products/database/oracle11g/111060_win32soft.html|http://www.oracle.com/technology/software/products/database/oracle11g/111060_win32soft.html].
Down load the client file "win32_11gR1_client.zip (510,809,607 bytes)". Must accept the OTN License aggreement.
Run the installation.
SQL*Plus for Windows I think comes with Oracle Express Edition also, as another option. -
BUG: ORA-00600 in SQL Developer while good in SQL*Plus
Just run the following PL/SQL script:
SET SERVEROUTPUT ON
<< outer_block >>
DECLARE
v_test NUMBER := 123;
BEGIN
DBMS_OUTPUT.PUT_LINE ('Outer Block, v_test: '||v_test);
<< inner_block >>
DECLARE
v_test NUMBER := 456;
BEGIN
DBMS_OUTPUT.PUT_LINE ('Inner Block, v_test: '||v_test);
DBMS_OUTPUT.PUT_LINE ('Inner Block, outer_block.v_test: '|| outer_block.v_test);
END inner_block;
END outer_block;
In SQL*Plus, you get the correct result, while in SQL Developer 1.5.4, you get:
Error report:
ORA-00600: internal error code, arguments: [12259], [], [], [], [], [], [], []
00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
*Cause: This is the generic internal error number for Oracle program
exceptions. This indicates that a process has encountered an
exceptional condition.
*Action: Report as a bug - the first argument is the internal error numberMeanwhile a workaround is to enclose the whole lot in a BEGIN END;
-
Oracle SQL Developer 3.2, SQL*Plus COLUMN FORMAT bug
SQL*Plus command COLUMN truncates output result in SQL Developer.
Script in Worksheet:
column nn format 999
select level nn from dual connect by level<=10;The Run Script (F5) result contains only 8 lines in Script Output window:
NN
1
2
3
4
5
6
7
8
Changing column alias:
select level nn2 from dual connect by level<=10NN2
1
2
3
4
5
6
7
8
9
10
10 rows selected
The output can contain no data for more formatted columns.
===============================================================
About
Oracle SQL Developer 3.2.09
Version 3.2.09
Build MAIN-09.30
Copyright © 2005, 2012 Oracle. All Rights Reserved.
IDE Version: 11.1.1.4.37.59.48
Product ID: oracle.sqldeveloper
Product Version: 11.2.0.09.30
Version
Component Version
========= =======
Java(TM) Platform 1.7.0_02
Oracle IDE 3.2.09.30
Versioning Support 3.2.09.30sqldeveloper64-3.2.09.30-no-jre.zip.
My jdk now is 1.7.07 x64, Windows 7 x64.
C:\Java\jdk17\bin>java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
Gary Graham wrote:Also, I don't understand what you mean by
The output can contain no data for more formatted columns.
Sript:
col owner format a10
col table_name format a20
col column_name format a20
col comments format a50
select
row_number() over(order by column_name) r11,
count(*) over() c11,
owner ow,
table_name tn,
column_name cn,
comments co
from all_col_comments t
where owner='SYS' and table_name='INDEX_STATS';
select
row_number() over(order by column_name) r,
count(*) over() c,
owner,
table_name,
column_name,
comments
from all_col_comments t
where owner='SYS' and table_name='INDEX_STATS';
select 1 from dual;
prompt abcThe output truncated after headers of second queryR11 C11 OW TN CN CO
1 25 SYS INDEX_STATS BLKS_GETS_PER_ACCESS Expected number of consistent mode block gets per row. This assumes that a row chosen at random from the table is being searched for using the index
2 25 SYS INDEX_STATS BLOCKS blocks allocated to the segment
3 25 SYS INDEX_STATS BR_BLKS number of branch blocks in the b-tree
4 25 SYS INDEX_STATS BR_BLK_LEN useable space in a branch block
5 25 SYS INDEX_STATS BR_ROWS number of branch rows
6 25 SYS INDEX_STATS BR_ROWS_LEN sum of the lengths of all the branch blocks in the b-tree
7 25 SYS INDEX_STATS BTREE_SPACE total space currently allocated in the b-tree
8 25 SYS INDEX_STATS DEL_LF_ROWS number of deleted leaf rows in the index
9 25 SYS INDEX_STATS DEL_LF_ROWS_LEN total length of all deleted rows in the index
10 25 SYS INDEX_STATS DISTINCT_KEYS number of distinct keys in the index
11 25 SYS INDEX_STATS HEIGHT height of the b-tree
12 25 SYS INDEX_STATS LF_BLKS number of leaf blocks in the b-tree
13 25 SYS INDEX_STATS LF_BLK_LEN useable space in a leaf block
14 25 SYS INDEX_STATS LF_ROWS number of leaf rows (values in the index)
15 25 SYS INDEX_STATS LF_ROWS_LEN sum of the lengths of all the leaf rows
16 25 SYS INDEX_STATS MOST_REPEATED_KEY how many times the most repeated key is repeated
17 25 SYS INDEX_STATS NAME name of the index
18 25 SYS INDEX_STATS OPT_CMPR_COUNT optimal prefix compression count for the index
19 25 SYS INDEX_STATS OPT_CMPR_PCTSAVE percentage storage saving expected from optimal prefix compression
20 25 SYS INDEX_STATS PARTITION_NAME name of the index partition, if partitioned
21 25 SYS INDEX_STATS PCT_USED percent of space allocated in the b-tree that is being used
22 25 SYS INDEX_STATS PRE_ROWS number of prefix rows (values in the index)
23 25 SYS INDEX_STATS PRE_ROWS_LEN sum of lengths of all prefix rows
24 25 SYS INDEX_STATS ROWS_PER_KEY average number of rows per distinct key
25 25 SYS INDEX_STATS USED_SPACE total space that is currently being used in the b-tree
25 rows selected
R C OWNER TABLE_NAME COLUMN_NAME COMMENTS
- - ---------- -------------------- -------------------- -------------------------------------------------- -
Invoking SQL*Plus from tool or contextmenu bug
If connection was created using the Basic-Tab everything is fine.
If used TNS-Tab and network alias sql*plus menu point is greyed out .
If used TNS-Tab and connect identifier or Advanced-Tab sql*plus is invoke with the wrong
connect string.
Example:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=host1.abc.com)(PORT=51001))(ADDRESS=(PROTOCOL=tcp)(HOST=host2.abc.com)(PORT=51001)))(CONNECT_DATA=(SERVICE_NAME=DEV)))
Result: sqlplus starts but with wrong connect string
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 14 10:24:17 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
konsole -e /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus apps@jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=host1.abc.com)(PORT=51001))(ADDRESS=(PROTOCOL=tcp)(HOST=host2.abc.com)(PORT=51001)))(CONNECT_DATA=(SERVICE_NAME=DEV)))It does seem to be fairly arbitrary whether SQL*Plus is available or not. I have many connection definitions covering 9i to 11g and SQL*Plus is not available for a random selection of them. They are all defined using the Basic connection tab and I can't see any differences between the one which work and the one which don't.
It also doesn't make much sense to disable it if the focus is in the sql worksheet and not on a node of the connection navigator.
Why should it be necessary to define sqlplus as an external tool to get round arbitrary limitations when it should be supported directly.
I hope these problems are being addressed for the next release. -
Sql * plus 9 is not able to connect oracle 7 database
Today I have installed oracle 9i release 2 and found that the sql * plus provided with is unable to connect oracle database version 7. But before that we were able to connect the oracle 7 database well.
Any one having a clue on that...?
Is it a product bug...?
If so then please provide me some alternative solution clue or patch download link. Please remember in any condition currently it is not possible discard my oracle 7 database.
With Regards.
Soumen.No, it is not a bug. You just cannot connect with Ora9i R2 SQL*Plus to an Ora7 database.You cannot create a DB link between the two database either, if you are planning on doing that.
A solution is to install Ora8 client, which can connect to both Ora9 and Ora7 database (but a db link will stil be impossible). -
SQL*PLUS not work in JDeveloper 10.1.3
The Log message is :
Invoking SQL*Plus...
F:\oracle\ora92\bin\sqlplus.exe SCOTT@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SID=W2G)))
java.io.IOException: CreateProcess: START.EXE F:\oracle\ora92\bin\sqlplus.exe SCOTT@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SID=W2G))) error=2
I need a help ! thanks .Hi,
This is a known issue (bug 4774715) on Windows 2003 and is due to the fact that START does not exist on that OS. It is currently fixed in the next release but I will open a bug and see if we can get the fix backported to a 10.1.3 patchset for you.
Regards,
Lisa
JDev QA -
Special character when changing password in sql plus
Hi i'm having a problem with setting password for user's in sql plus. I get a ORA-00922 whenever I try to change a user's password to contain ! in it. See below. Do I have to escape special characters or something or this a bug?
(Previously I've always used Enterprise Manager for this and can set ! characters for password without issue but we're currently having an issue with it and I need to alter passwords in sql plus while I'm waiting for it to be fixed )
SQL> alter user lbtest identified by oraclesux!;
alter user lbtest identified by oraclesux!
ERROR at line 1:
ORA-00922: missing or invalid option
SQL> alter user lbtest identified by oraclesux;
User altered.
System and O/S details below:
O/S = MS Server 2008 Standard Service Pack 1 64 bit
Oracle 11g Standard Edition (11.1.0.7.0)
SQL> select * from nls_database_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8MSWIN1252
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
PARAMETER VALUE
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.1.0.7.0
20 rows selected.Found the answer here, must user double quote for exclamation marks but not other characters like #.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:897930000346894755 -
Maximum length of SQL*Plus Command?
I'm typing a long query into SQL*Plus (Linux, version 9.2.0.1... yes, I know it's ancient).
If I run this query, all works fine:
select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE') then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$')
else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
'UPDATEMYAUDITING_TABLESETTEST_DETAILS='''||GRANTEE||'''WHEREMYAUDIT_REFNO=''A.F
update myauditing_table set test_details='AUDIT_TRAIL is set to: DB' where myaud
it_refno='A.FE';(In other words, is SQL that generates other SQL: if AUDIT_TRAIL is set to something interesting, tell me who has access to the AUD$ table. And it's working fine... the agg_concat function mentioned is simply Tom Kyte's stragg function under another name, as lifted word-for-word from http://www.sqlsnippets.com/en/topic-11591.html)
Now this is what happens if I take out the linebreak after the mention of AUD$, so that the command is submitted as one single line of code:
SQL> select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE') then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$') else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
SP2-0734: unknown command beginning "s set to: ..." - rest of line ignored.The error message indicates that the text has been 'split' at the 'AUDIT_TRAIL is set to...' bit, so that "s set to" is being treated as a new command, which is of course syntactically invalid. There is definitely no other change in text between the two versions, apart from the removal of a carriage return before the "else" statement.
Possibly a coincidence, but the first "s" in "s set to" appears at position 258 in the entire text... close to a possible 255 or 256 character limit, perhaps?
The same problem happens whether I run the command as a script (@mysql.sql) or typed in directly into a client SQL*Plus session. Is there some inherent limit to the length of commands that SQL*Plus can process in this version? My code runs fine on 10g and 11g databases/clients, whether it's on one line or two. Anyone know of a bug in 9i regarding this? And if there's a workaround (other than the obvious one of upgrading, of course!)As mentioned, it's choking at the 258th character, not the 240th. Also, it's a SELECT statement, not a COPY command (one relates to the database, the other is an internal SQL*Plus feature). And someone else also kindly pointed out that SQL*Plus has a command limit length (i.e., database-related commands) of 2500 characters. So I don't think that's the issue.
I can be a bit more specific about this one now, though. I've a sequence of Solaris boxes running 9.2.0.1 up, and the results are that 9.2.0.1 is affected; and it's a problem for 9.2.0.7:
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for Solaris: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
SQL> select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE') then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$') else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
SP2-0734: unknown command beginning "s set to: ..." - rest of line ignored.And...
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
PL/SQL Release 9.2.0.7.0 - Production
CORE 9.2.0.7.0 Production
TNS for Solaris: Version 9.2.0.7.0 - Production
NLSRTL Version 9.2.0.7.0 - Production
SQL> select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE') then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$') else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
SP2-0734: unknown command beginning "s set to: ..." - rest of line ignored.But in 10.2.0.1, the problem disappears.
I am not sure, but it is perhaps related to metalink note 285913.1, since we did get some ORA-00600: internal error code, arguments: [qernsRowP], [1] errors in the alert log with a slightly different version of the above query. Changing the query obviously alters the test, though, so it may be completely unrelated.
Either way, I think it's definitely a version-specific SQL*Plus bug (though it would be nice if any other 9i owners out there could try it and report back!)
Anyway, the workaround is simply to submit the command on two separate lines, wherever possible. And of course... to upgrade. -
PL/SQL Bug in SQL Developer?
SQL Developer v 1.1.1.25 running on Windows XP.
I have a PL/SQL procedure that does not compile with debug in SQL Developer. Compiling it with debug produces the following error:
an Error(1): PLS-00801: internal error [79110].The only way I was able to get the procedure to compile in SQL Developer was to add the 4th line. If I uncomment the 4th line it compiles with debug. Why??
Here is the procedure:
CREATE OR REPLACE
PROCEDURE BOGUS AS
CURSOR c1 IS
SELECT dummy FROM DUAL;
-- x c1%ROWTYPE;
PROCEDURE test ( rec IN OUT c1%ROWTYPE) IS
begin
null;
end;
BEGIN
NULL;
END BOGUS;Message was edited by:
marife
I played around some more with the procedure and discovered the problem. The key is the compiling with debug. I believe that compile with debug cannot build the debug information for a %ROWTYPE as a parameter. But if I define a local variable of that %ROWTYPE, then the compile with debug knows what debug information to track for the %ROWTYPE.
I discovered that in SQL*Plus it compiles, but when you issue the ALTER PROCEDURE bogus COMPILE DEBUG, it does not compile. This is a problem with the debug option for compiling and not a problem with SQL Developer.
Sorry for the posting. Hopefully this information will save other times and fustration.
MikeJust for anyone else searching on this bug - I get the same error with certain procedures in TOAD when compiling with DEBUG.
Fortunately nobody here has the first clue how to use TOAD debug so it's only ever switched on by accident or after a reinstall (it's the default) - so turning debug off fixes the problem.
Maybe you are looking for
-
JDBC to access SQL server 2000 and Oracle.
hi, I have the following requirement. I have an oracle database which contain sql data including BLOB and CLOB. Firstly, I should migrate the data to a SQL server 2000 database. That is, i should be able to have two databases, one on oracle and the o
-
I understand and know what a full lifecycle implementation consists of... The problem is that my current company is exactly orthodox in its approach. Could someone maybe outline what an XI developers role is at each point of the project? so for the f
-
My brother has an iPod 5th gen and I have and iPhone 5 and sometimes when he sends gifs from his iPod to me it comes out in slow motion and sometimes when I send gifs to him it comes out in slow motion I'm not sure why this is.
-
Video from a camcorder to my MAC
I used a Sony camcorder that DOES NOT have a firewire port. It records on small hard disc. How can I tranfer the video into my MAC (IMOVIE) which DOES have firewire cabability??? thanks,
-
what can I do to fix error 3194 ipad 2?