Developer vs sqlplus
Hi all
in sqlplus
I create table :
create table pks (n varchar2(5));
insert into pks values ('ŽáŽá');
and error : ORA-12899: value too large for column "SYS"."PKS"."N" (actual: 8, maximum: 5)
I tried this scenerio again in nls UTF8 and also EE8MSWIN1250 and result is some
I recreate table
create table pks (n varchar2(5) CHAR);
and error is some
ORA-12899:
in developer
When I treid to insert this row in oracle developer insert is ok (exaple
Can I please tell me where is problem
db 11.2.0
Thank You
Brano
Edited by: branislav.dobrotka on Jun 16, 2010 7:50 AM
When I trein in sqlplus :
select length('Žádost o Věrnostní bonus na SU') from dual
34
in developer
select length('Žádost o Věrnostní bonus na SU') from dual
30
Similar Messages
-
ORACLE SQL DEVELOPER and SQLPLUS
How can I run the sqlplus command inside of ORACLE SQL DEVELOPER?
Whe I try to run show SGA command , I get "SQLPLUs command skipped"jung1975,
I have SQL Developer version 1.0.0.14 installed on my PC.
Under the "Tools" menu, there is a "SQL*Plus" item.
However, you need to have access to the "SQL*Plus" executable.
Since my database server is on a different machine (to my PC), that means I need to have Oracle Client also installed on my PC.
Good Luck,
Avi. -
Difference in data retrieved from sql developer and sqlplus prompt
SQL> select distinct snap_time from perfstat.stats$idx_stats;
SNAP_TIME
21-MAY-07
05-JUN-07
but using sql developer
select distinct snap_time from perfstat.stats$idx_stats;
SNAP_TIME
21-MAY-07
05-JUN-07
13-JUN-07
but can anyone explain the difference because it's the same databaseSQL> select distinct snap_time from
perfstat.stats$idx_stats;
SNAP_TIME
21-MAY-07
05-JUN-07
but using sql developer
select distinct snap_time from
perfstat.stats$idx_stats;
SNAP_TIME
21-MAY-07
05-JUN-07
13-JUN-07
but can anyone explain the difference because it's
the same databaseIt looks to me during the interim between you run the query in sqlplus and SQL Developer, statspack generated a new snapshot.
Check your DBA_JOBS see if there's any auto statspack collection job. -
Can connect using sqlplus, cannot using SQL Developer
Hi
I cannot find out why I cannot connect using SQL developer, while sqlplus works fine with the same login information.
*1. TNS ping:*
C:\>TNSPING manila
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-GRU-2
010 13:28:38
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.171)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (370 msec)
*2. sqlplus*
SQL> CONNECT SULU_DEV/<pass>@MANILA
Connected.
*3. sqlplus - by IP*
SQL> CONNECT SULU_DEV/<pass>@10.0.0.171:1521/XE
Connected.
*4. SQL Developer*
Username: SULU_DEV
Connection type: TNS
Network alias: MANILA
Error: I/O Exception: Connection reset
*5. SQL Developer - by IP*
Username: SULU_DEV
Connection type: Basic
Hostname: 10.0.0.171
Port: 1521
SID: xe
Error: I/O Exception: Connection reset
*6. SQL Developer - without username*
Username: <blank>
Connection type: TNS
Network alias: MANILA
Error: ORA-01017: invalid username/password
It seems that I have connection to the server, but from some reason it is disconnected when I'm using SQL Developer, but works fine with sqlplus.
Any ideas on what it might be?
Thank you in advance,
Regards,
MarekThe connection export function it's available in 2.1.1.64, you need to right click on the main Connections node, and it will allow you to export all or part of the current connections, or import from a previously exported file.
As for the highlight statement feature it's available in SQLDeveloper; actually you do not even have to highlight the required statement, as long as you take the habit of ending every statement with a ";", in this case you only need to place the caret inside the statement and SQLDeveloper will automatically highlight it for you (if you want to manually highlight a statement you can still do so without problems).
Finally as a last try to solve your connection problem without having to call for network support you could try to check
Preferences -> Database -> Advanced -> Use OCI/Thick DriverThis will force SQLDeveloper to use your oracle client for connections instead of it's native JDBC based connections (even if you use TNS based connections you will still use JDBC unless you have this checked).
As for other graphical tools for Oracle there are many both free or for a price.
1) In the for price world Toad stands out, i heard of a free option too but I'm not sure of the limitations.
2) For free you can use DBVisualizer which is fairly good (never used it too much thou).
3) Finally there is SQuirreL which is both free and open source but it has fairly basic functionality compared to the two above.
Obviously there are many others, but IMHO few will provide you with the same functions of SQLDeveloper or Toad for Oracle databases -
Calling procedure works in SQL Developer, but returns error elsewhere?!
Hi there!
I try to call a procedure with this code snippet:
begin
p_snap_op.add_change_log(vi_cart_no => 'Cart 2341',
vi_operation => 'Change',
vi_info_source => 'Testsource',
vi_comment => 'Testcomment',
vi_refg_id => '1112',
vi_snap_id => null,
vi_snix_id => null,
vi_snsy_id => null);
end;
this works just fine in Oracle SQL Developer and sqlplus. In PLSQL Developer, I get an ORA-ERROR 001036 returned, saying there's an invalid variable name or number. How comes?Hi,
yup, that was the problem. PL/SQL Developer has this great feature with bind variables in an extra panel. Unfortunatelly, nobody told me :-(
This code (and every other one that I wrote so far) now works fine.
Thanks for your help. -
Network Adapter could not establish the connection in sql developer
hi,
i had installed oracle 11g , and then i try to connect the sys/system user using sql developer and sqlplus , but i got following error are display ,
plz give some idea
regards
venkiCheck your Oracle Net configuration (tnsnames, listener)
-
Network adapter could not resolve the connection in sql developer
hi,
i had installed oracle 11g , and then i try to connect the sys/system user using sql developer and sqlplus , but i got following error are display ,
plz give some idea
regards
venkiHave you configured your TNS for sql developer to connect with?
-
Interactive report performance problem over database link - Oracle Gateway
Hello all;
This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
query like this: (due to sensitivity issue, I can not disclose real table name)
SELECT apex_item.checkbox(1,b.col3)
, a.col1
, a.col2
FROM table_one a
, table_two b
WHERE a.col3 = 12345
AND a.col4 = 100
AND b.col5 = a.col5
table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
I would like to get ideas from people how to resolve or speed-up the query?
Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
Thank you.
Shaun S.Hi Shaun
Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
WITH a AS
(SELECT /*+ MATERIALIZE */ *
FROM table_one),
b AS
(SELECT /*+ MATERIALIZE */ *
FROM table_two),
sourceqry AS
(SELECT b.col3 x
, a.col1 y
, a.col2 z
FROM table_one a
, table_two b
WHERE a.col3 = 12345
AND a.col4 = 100
AND b.col5 = a.col5)
SELECT apex_item.checkbox(1,x), y , z
FROM sourceqry
WITH a AS
(SELECT /*+ MATERIALIZE */ *
FROM table_one),
b AS
(SELECT /*+ MATERIALIZE */ *
FROM table_two)
SELECT apex_item.checkbox(1,x), y , z
FROM table_one a
, table_two b
WHERE a.col3 = 12345
AND a.col4 = 100
AND b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
Sorry for all the questions but it helps to answer the question, if I can.
Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;) -
Trying to query data from a view - ORA-01882 and ORA-02063 Errors
Hey there,
I tried to query data from a view that was provided by a colleague. This view works fine and gives correct data using PL/SQL Developer or SQLPLUS, but in SQL Developer, I get the following error:
ORA-01882: Time zone region not found
ORA-02063: preceding line from SYSTOOLS
01882.00000 - "timezone region %s not found"
* Cause: Specified reason name was not found
* Action: Please contact Oracle Customer Support
Vendor Code 1882
Where comes this error message from?! SYSTOOLS is the database link.
Can't see an obvious reason for this error.
OS is Windows 2000 SP4, SQL Developer is v1.1.1.25 BUILD MAIN-25.14
Regards,
ThomasFrom Oracle Messages 'Cause and Action'
http://www.oracle.com/technology/products/designer/supporting_doc/des9i_90210/cmnhlp72/messages/ora_messages.htm
ORA-01882, 00000, "timezone region %s not found"
Cause: The specified region name was not found.
Action: Please contact Oracle Customer Support.
Maybe invalid region in NLS_LANG?
"select * from v$nls_parameters"
Starting this script in all developer program and compared result... -
Poor query performance with BETWEEN
I'm using Oracle Reports 6i.
I needed to add Date range parameters (Starting and Ending dates) to a report. I used lexicals in the Where condition to handle the logic.
If no dates given,
Start_LEX := '/**/' and
End_LEX := '/**/'
If Start_date given,
Start_LEX := 'AND t1.date >= :Start_date'
If End_date given,
End_LEX := 'AND t1.date <= :End_date'
When I run the report with no dates or only one of the dates, it finishes in 3 to 8 seconds.
But when I supply both dates, it takes > 5 minutes.
So I did the following
If both dates are given and Start_date = End date,
Start_LEX := 'AND t1.date = :Start_date'
End_LEX := '/**/'
This got the response back to the 3 - 8 second range.
I then tried this
if both dates are given and Start_date != End date,
Start_LEX := 'AND t1.date BETWEEN :Start_date AND :End_date'
End_LEX := '/**/'
This didn't help. The response was still in the 5+ minutes range.
If I run the query outside of Oracle Reports, in PL/SQL Developer or SQLplus, it returns the same data in 3 - 8 seconds in all cases.
Does anyone know what is going on in Oracle Reports when a date is compared with two values either separately or with a BETWEEN? Why does the query take approx. 60 times as long to execute?Hi,
Observe access plan first by using BETWEEN as well as using <= >=.
Try to impose logic of using NVL while forming lexical parameters.
Adinath Kamode -
12c - plsql function in with clause
Hi all
I'm mucking around with 12c:
SQL> select *
2 from v$version;
BANNER CON_ID
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
PL/SQL Release 12.1.0.1.0 - Production 0
CORE 12.1.0.1.0 Production 0
TNS for Linux: Version 12.1.0.1.0 - Production 0
NLSRTL Version 12.1.0.1.0 - Production 0
5 rows selected.
specifically I'm trying to use the new functionality of putting a pl/sql function in the WITH clause of an SQL statement:
docco here:
http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_10002.htm#BABJFIDC
the example they give is:
WITH
FUNCTION get_domain(url VARCHAR2) RETURN VARCHAR2 IS
pos BINARY_INTEGER;
len BINARY_INTEGER;
BEGIN
pos := INSTR(url, 'www.');
len := INSTR(SUBSTR(url, pos + 4), '.') - 1;
RETURN SUBSTR(url, pos + 4, len);
END;
SELECT DISTINCT get_domain(catalog_url)
FROM product_information;
and so I produced my own hello world version:
with function add_number(num1 number, num2 number) return number is
begin
return num1 + num2;
end;
select add_number(1,2) from dual;
but this just doesn't compile in SQL developer or SQLPlus. do I need to get an updated version or something perhaps?
output is:
SQL> with function add_number(num1 number, num2 number) return number is
2 begin
3 return num1 + num2;
with function add_number(num1 number, num2 number) return number is
ERROR at line 1:
ORA-06553: PLS-103: Encountered the symbol "end-of-file" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || member submultiset
SQL> end;
SP2-0042: unknown command "end" - rest of line ignored.
SQL> select add_number(1,2) from dual;
select add_number from dual
ERROR at line 1:
ORA-00904: "ADD_NUMBER": invalid identifier
SQL> /
select add_number from dual
ERROR at line 1:
ORA-00904: "ADD_NUMBER": invalid identifierHi,
does that mean that you still have the problem, even after fixing this? Because I don't:
SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 3 11:32:54 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> with function add_number(num1 number, num2 number) return number is
2 begin
3 return num1+num2;
4 end;
5 select add_number(1,2) from dual;
6 /
SP2-0640: Not connected
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 263090176 bytes
Fixed Size 2359904 bytes
Variable Size 205524384 bytes
Database Buffers 50331648 bytes
Redo Buffers 4874240 bytes
Database mounted.
Database opened.
SQL> with function add_number( num1 number, num2 number) return number is
2 begin
3 return num1+num2;
4 end;
5 select add_number(1,2) from dual;
6 /
ADD_NUMBER(1,2)
3
SQL>
Best regards,
Nikolay -
Direct Database Request Error: illegal number at oci
Hello, all.
In Oracle BI Answers i get an error by building an direct database request: illegal number at oci.....
The reason of error is in expression to_char((date_1-date_2)*24, '9990.99')
The error disappears if i write expression to_char((date_1-date_2)/*24*/, '9990.99')
BI doesn`t understand multiplying in SQl request?Hi,
Couple of suggestions :
1) Run your direct database queries in a SQL editor (SQL Developer, TOAD, SQLplus) etc to confirm the query runs OK - be carefull with Toad or SQL Dev - you want to return the entire dataset, not just the first xxxxK rows these tools tend to bring back, they sometimes hide the problem 'row' which maybe is causing the error.
2) Once the error is returned via straight up SQL , maybe try the database / SQL forum as your problem I think lies there, not with the BI Server.
3) My one stop shop for Oracle date arithmetic : http://www.akadia.com/services/ora_date_time.html
4) assuming the SQL returns correctly, report back to us so we can help with OBIEE specific issues !
what time period are you trying to bring back between your date 1 and date 2 ?
Hope this helps a little,
Alastair -
Dev Days Tutorials : Can't log into Apex and Can't connect to Ora server
Hello All,
I downloaded the pre-built Oracle VM from Developer Days. The setup works fine. I am now trying to follow hands on labs. There are a couple of things I am stuck at (at the very beginning).
1. The link to http://localhost:8080/apex does not work. Browser failes to connect. I suppose this is a required step continue labs.
2. In SQL Developer (I am familiar with this app), I can't create a connection. I tried using SYSDBA, SYSOPER as user names with oracle as password, but can't go anywhere. One of the items in lab is to unlock the account 'hr'. SQL Developer and sqlplus won't let me log in.
One of the things I noticed when the VM boots is a message saying Oracle Listener is not set up and (probably) won't be starting.
I would appreciate if anyone would help with items above. Thanks in Advance.
RaviI think the link is actually http://localhost:8888/apex well this one works for me anyway, using the Developer Day "Database App Development" downloadable VM
-
How to convert SQL*Plus reports to SQLDeveloper?
Hello,
I installed Oracle 11g and found that SQLPLUSW.EXE was not there.
I have many scripts, reports, developed in SQLPLUS.
How can I convert my reports to run in SQL Developer and produce the same nice output?
It seems that SQLDev does not support columns formatting, TTITLE, BTITLE, BREAK, all the nice SQLPLUS stuff.
Any ideas other than installing Oracle10g and running good old SQLPLUS?
Thank you,
YGHi YG,
Based on your comments, you have either experimented a bit or read some forum posts like these:
Re: sqlplusw.exe not found
SQLPLUS commands in SQL Developer
Perhaps you could use the command line version of SQL*Plus (sqlplus.exe) which is still available in 11g and just spool the output?
Regards,
Gary Graham
SQLDeveloper Team -
OTN Toolbar v1.0 for Internet Explorer
I have dwonloaded the OTN Toolbar v1.0 for Internet Explorer, but I haven't get all features of OTN (including downloads,sql, sample code, documentation, and discussion forums.
I only get the search button and the short cut to otn.
Why?Sven,
Thanks for your note - A quick question, which version of IE are you using, 4,5,6? and to which level of SP?
Also do you currently have any oracle software installed, e.g. database, developer tools, SQLPlus?
Thanks - The OTN Team
Maybe you are looking for
-
Simple math and a variable in an mc instance name
i have several movie clips with instance names in the format of screened1, screened2, screened3, and so on. i am trying to reference a movie clip as shown below, but it's not working. what am i doing wrong? how do i fix it? this.screened[numOfItems-8
-
So i bought an Ipod touch this last january, in june the house that i had my ipod in had a fire and the ipod was burned. it was less than a year old so it had the warranty on it still. my question is: will apple refund my money or give me a new ipod
-
Update Lead Status on save of follow up opportunity using Action
*I am exploring the possibility of updating the status of lead(preceding transaction) as "closed" on saving the follow up opportunity. Can we achieve this functionality using Methods in Action Profile?*
-
ADF/Struts Generated tag code variations? Struts html:text vs Html input
Hi, JDev 10.1.2.1 ADF/Struts I noticed that the JDev IDE generates different code for a same component/binding combination. Example:Data Control of type Input form with same VO selection. Generated code for 1 field: case 1) JSP code: <tr> <td> <c:out
-
Cache hit ratio at enterprise manager
hit ratio formula is: (logical_reads - physical_reads/logical_reads )*100 Now, if I open Oracle Enterprise Manager and goes to Instance->Configuration->Memory I can see SGA and PGA configuration. I can also see the cache hit ratio, in my case 35%, bu