Displaying line numbers in oracle Sql developer
hi guys, can someone tell me how to display line numbers in oracle sql developer Version 2.1.1.64?.
I absolutely didn't know where it was, so I had to look for it, and it appears easy to find.
Hit Tools
Hit Preferences
Expand Code Editor
Navigate to line gutter
Now click 'Show line numbers'
And, oh yes, there is a separate sql developer forum. Please keep sql developer issues in that forum.
Sybrand Bakker
Senior Oracle DBA
Similar Messages
-
How can I change the format of numbers in Oracle SQL Developer 1.0 ?
The value 1.4345 from a table is represented in Oracle SQL Developer 1.0 like 1.5
How can I change this to see all the digits ?
ThanksWhere did you see that, in the SQL Worksheet or viewing the data Connections ->.. tables ->.. tree?
What datatype, precision and column name you have?
I use version 1.0.0.15.57 and seems to be working allright.
- Babu Rangasamy -
Oracle SQL Developer and Errors (Line Number Incorrect)
First, I wanted to state that Oracle SQL Developer 2 is a standout job.
I wanted to report, though, that when Oracle SQL Developer 2 can't compile a block of code or a simple SQL statement has invalid syntax, it does not have an option to accurately go to the line of code in question. GOING TO the erroneous line of code doesn't need to be a feature, but often times the line no. REPORTED by Oracle SQL Developer is incorrect by 50+ lines.
Is this something I could fix on my end? I have five other developers griping about this.
Thank you!I don't know if this is the situation you are talking about, but line numbers for errors in SQL in a SQL Worksheet are not line numbers within the statement but rather line numbers in the worksheet. For example, with the following SQL in the worksheet:
select * from dual;
select * from dual;
select * from dual;
select from dual;Running the "select from dual;" statement (as either statement based on cursor position, selected statement or as script), the error is reported on Line 4, Column 7. As I show line numbers (Tools | Preferences | Code Editor | Line Gutter | Show Line Numbers), this makes sense. Without line numbers showing or having the option to go to the error and with more realistic examples with SQL statements scrolling off the page, I can see that the line number in the errors wouldn't be helpful.
I think -K- is talking about the PL/SQL code editors not reporting the correct line number based on the error line not counting the "create or replace" line at the start of a package (and more for triggers).
theFurryOne -
Unable to display results of multiple query in grid in Oracle SQL Developer
Hi, I am a newbie to this forum and couldn't find the Oracle SQL Developer forum so posting it here.
My question: How to display multiple query results in grid in Oracle SQL Developer.
Example:
select * from Employee;
select * from Department;
- when I select both the queries and hit F5 in Oracle sql developer. By default it displays in output window.
- How to display result of both the queries in Grid.
Any thoughts on this would be really helpful.
Thanks in advance.
HarshHi Harsh,
I'd say that the Results grid is designed to only show the results of 1 query at a time. I don't know/can't see how it would display multiple queries at a time.
I would suggest either joining your tables to create a single query or opening another SQL Worksheet for one of the queries so that you can display the results side-by-side.
Maybe you could explain what you're trying to do. Why are you trying to display multiple results in the same query grid? -
SDO_GEOMETRY displaying in Oracle SQL Developer (freezing)
Hi,
I am using Oracle SQL Developer (V 1.5.3) heavily at work, and have noticed some undesirable behaviour when the table's data tab is trying to display SDO_GEOMETRY. In this version (and subsequent ones) Developer tries to convert the geometry to WKT, instead of just displaying "sdo_geometry". I can see why this has been added in, however I am using many geometries that are quite large, and have extremely large sdo_ordinate_array/s . This is causing Developer to appear to be freezing while it runs the conversion, often hanging for many minutes at a time. I have briefly looked at V 2.1, and it appears to be the same.
Does anyone know if there is a check box option, or similar to switch this behaviour off? Limiting the number of rows returned has been suggested, but even when dealing with a STATES table the 9 rows needed for all 9 Australian states is far too large for a data tab display. If an option doesn't currently exist, it might be worth adding in to future versions of SQL developer.
regards, JeffHello,
I´ve the same problem. I use version 3.0.03 (3.45) but I can´t find the possibility to change this option.
Can someone help me?
Thanks
Peter -
Run sp from Oracle SQL Developer
Hi,
Anbody can help me to find why I cant' see output after running my simple sp lke below. When I ran create View from sql it's fine, I see <Statetement Output> window displayed, and see new View.
Not the case when I do sp, I can compile it and get "compiled" status on Messages pane, not sure is't compiled sucessfully or not. But then pressing RUN green arrow, or right click - RUN nothing happenes, no new view, no any output.
I defenetely has all rights to run sp as per our admin.
Tx
Trent
create or replace
PROCEDURE usp4 AS
BEGIN
execute immediate '
CREATE OR REPLACE FORCE VIEW "USERMO"."V2c"
AS
SELECT "TDATE","AMOUNT","ESS" FROM TT_REG;';Tx, sb92075
I see that you running it all from command line, right ?
It's still different on my SQL Developer session, I don't have anything on messages pane and again I don't see output i.e. View created.
Can anybody share opinions how to run this sp from Oracle SQL Developer? I expect to see newly created V2c View in my object list upon execution.
create or replace
PROCEDURE usp4 AS
BEGIN
execute immediate '
CREATE OR REPLACE FORCE VIEW "USERMO"."V2c"
AS
SELECT "TDATE","AMOUNT","ESS" FROM TT_REG;';
T
Edited by: trento on May 4, 2010 1:29 PM -
Unable to connect to Oracle Database using Oracle Sql developer 2.1.1.64
Hi Everyone,
I am searching for some help regarding my problem with Oracle connectivity. I have installed Oracle 11g release 2 on my Windows XP Professional Laptop. For a few days after installation i could connect to the Oracle database with the SYSTEM account using Oracle SQL developer ( installed on the same Laptop) but now i am unable to do so.It gives me this annoying message:
An error was encountered performing the required operation Got a minus one from read call .Vendor code 0
However i am able to connect using Sql Plus by supplying the username SYSTEM and the corresponding password.
My TNSNAMES .ora file is as follows:
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORACLE)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
My Listener.ora file is as follows:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")
(SID_DESC =
(GLOBAL_DBNAME = Oracle)
(ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
(SID_NAME = Oracle)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
ADR_BASE_LISTENER = D:\app
My Sqlnet.ora file is as follows:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
I am new to Oracle and so i need someone in this forum who can help me resolve this problem. Also i even tried connecting to the database using Toad 10.5.0.41. It give me the following error:
ORA 12537 : TNS Connection closed
Thanks for your patience and help in advance.
---PrashantHello Irian and Sue,
I can connect to the Oracle database using SQL Plus. Now when i TNSPING ORACLE from command line i get the following message :
Used parameter files:
D:\app\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =localhost
*)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORACLE)))*
TNS-12537: TNS:connection closed
Thanks for your response to my initial post.Do u have any other methods to resolve this? -
How to get all tables in oracle sql developer with MS SQLServer
Hi All,
I am using microsoft SQL server 2000. For displaying the tables and other stuff i am using oracle SQL developer tool. The problem is when i connect to sql developer with oracle database i can see all the tables in that database. But when i connect to MS SQL server database it is not showing all the tables in that database. I don't know why?.
i tried doing the samething using another tool called Aqua Data Studio , there i can able to see all the tables in microsoft SQL server 2000.
do you have any knowledge regarding this, why i am not getting all the tables in oracle sql developer when i connect to microsoft SQL server 2000.Same issue here. Haven't found the answer yet..
-
How to create a counter using Oracle SQL Developer?
Is there any way to create a counter using Oracle SQL Developer to create the below scenario. Meaning it will recorded down the name of user and ID and time and the date they login.
Library portal home statistics shows how many users (outside and within the campus) visit the library portal.
Page Access statistics is recorded on an hourly basis. Users may select the statistics by
yearly (statistics displayed by all months in the selected year)
monthly (statistics displayed by all days in the selected month)
daily (statistics displayed by all hours in the selected day)I'm giving here one basic post - hope this will solve your problem --
SQL>
SQL>
SQL> create table audit_info
2 (
3 usr varchar2(50),
4 log_time timestamp(6)
5 );
Table created.
SQL>
SQL>
SQL> create table err_log
2 (
3 log_cd varchar2(20),
4 log_desc varchar2(500)
5 );
Table created.
SQL>
SQL>
SQL> create or replace procedure ins_err(errcd in varchar2,
2 errnm in varchar2)
3 is
4 pragma autonomous_transaction;
5 begin
6 insert into err_log values(errcd,errnm);
7 commit;
8 end;
9 /
Procedure created.
SQL>
SQL>
SQL> create or replace procedure ins_aud(ud in varchar2,
2 unm in varchar2)
3 is
4 pragma autonomous_transaction;
5 begin
6 insert into audit_info values(ud,unm);
7 commit;
8 exception
9 when others then
10 ins_err(sqlcode,sqlerrm);
11 end;
12 /
Procedure created.
SQL>
SQL>
SQL>
SQL> create or replace trigger log_odsuser1
2 after logon on odsuser1.schema
3 begin
4 ins_aud('ODSUSER1',sysdate);
5 exception
6 when others then
7 ins_err(sqlcode,sqlerrm);
8 end;
9 /
Trigger created.
SQL>
SQL*Plus: Release 9.2.0.1.0 - Production on Tue Jun 12 12:21:09 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
SQL>
SQL>
SQL>
SQL> set serveroutput on
SQL>
SQL>
SQL> select * from audit_info;
USR
LOG_TIME
ODSUSER1
12-JUN-07 12.00.00.00000000 AMHope this will solve your purpose.
Regards.
Satyaki De. -
Oracle SQL Developer freezes and locks up computer randomly
I attempted to find a solution to this before posting. I looked through the first 40 pages of this forum and on Google, through the Developer documentation, etc. with no luck.
The problem: while using Oracle SQL Developer, the computer randomly freezes. Things work, but it hangs too often and for too long to use. This is random - it can happen every 10 seconds or every 2 minutes. The mouse will lock up, and the keyboard buffer will get all messed up. For instance, if it happens to freeze while I'm hitting "backspace", it will delete many lines of text (I've lost a bit of work because of this in the past). The freezing will last about 2 to 20 seconds, and the only way out of it is to ctrl+alt+delete and kill SQL Developer.
If SQL Developer is running, and I'm in a different window - it will freeze the other windows as well. Again, it's impossible to use unfortunately. My coworker doesn't have the same problem, and he's connecting to the same database with the same version using Windows Vista. It must be something on this computer. I reformatted about 1 month ago, so it's a pretty fresh install and I haven't installed much of anything yet.
I'm using Windows Vista Enterprise 32-bit w/SP1.
This was occurring with older versions of SQL Developer (1.2). I'm using the newest install that included the Java JDK. I've completely removed Java, my Oracle installs, and a host of other attempts to fix this, and nothing changes. I've tried running the .exe in the bin directory as administrator as well.
Currently using Oracle Developer 1.5.1.54.40.
Any ideas?I tried dumping the contents, but the java dump wasn't showing anything at all, and it would never freeze while I had the console window in focus, so it wasn't very helpful unfortunately.
I fixed this issue by uninstalling the Java runtime on this machine and installing the Java JDK 6 Update 7 from java.sun.com/javase/downloads . I then downloaded the SQL Developer 1.5.1 version without the Java runtime included, and pointed it to the Update 7 .exe file upon first load.
I was using JDK 6 Update 6 previously, and it must have been behind the errors. Note that the Update 7 has to be downloaded from that website as it's a new version that hasn't been posted on the regular java.com site yet.
Message was edited by:
user645599 -
BUG in Oracle SQL Developer 3.0.04 on the "generating DLL" with comments?
I'm newbie on oracle, but I think that I found out a bug in Oracle SQL Developer version 3.0.04 on the "generating DLL" tool using "comments".
I will describe the steps that I gave:
I created a view, but after I test it I had to change my “where” condition, so I comment the old code and then I wrote the new “where” condition below. After I done that I tried to look at the sql code of my view using “generating DLL” tool, but oracle sql developer only shown me half of the code, a lot of code were missing. Then I began with some test trying to understand what happen and I notice that if I put an invalid sql code in my comment the generating DLL start working with no problems, for example(pseudo-code):
(COMMENT WITH VALID SQL CODE the "Generating SQL" don't work:)
CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
AS
SELECT column1, column2
FROM table1
INNER JOIN
(SELECT
FROM table2
INNER JOIN .....
INNER JOIN ....
--where time_stamp = (select max(time_stamp) from .....)
WHERE time_stamp >= TRUNC(sysdate)
) t1 ON t1.ID = ....
AND ..... >= TRUNC(sysdate)
ORDER BY ....
Generating DLL returns this(when the error occurs):
CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
AS
(COMMENT WITH VALID SQL CODE the "Generating SQL" work with no problems:)
CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
AS
SELECT column1, column2
FROM table1
INNER JOIN
(SELECT
FROM table2
INNER JOIN .....
INNER JOIN ....
--where
WHERE time_stamp >= TRUNC(sysdate)
) t1 ON t1.ID = ....
AND ..... >= TRUNC(sysdate)
ORDER BY ....
I believe that "Generating DLL" tool have some problem with the comments, I also used /*...*/ to comment but the problem is still active.
I notice as well that if I started to add some more comments along the code, the conditions migth change, so I think the problem is related with "comments" code.
Would you mind telling me if this is a real bug or if I'm doing anything wrong.
Thank you in advance,
Rodrigo Campos
Edited by: 894886 on 3/Nov/2011 5:29Hi Rodrigo,
Thank you for reporting this. The only bug I see currently logged on a comment affecting the generated View DDL involves ending the last line of the definition with a comment, which treats the ending semi-colon (even if on a different line) as part of the comment. That is actually related to a low-priority bug against an Oracle database API.
Unfortunately, your pseudo-code is a bit complex. Trying a few quick, simpler tests against the standard HR schema did not reproduce the issue. I tried INNER JOIN, and nested SELECTs. It would help greatly if you could provide a test case compilable against one of the standard schema, like HR or SCOTT.
Regards,
Gary
SQL Developer Team -
Using bind variables in Oracle SQL developer
Hi all,
i am using Oracle SQL developer. i want to use the bind variable in my sql.
variable myid number :=1;
select * from mds_3618_request where id = :myid;
but i am getting the below error.
Error starting at line 2 in command:
select * from mds_3618_request where id = :myid
Error report:
SQL Error: Missing IN or OUT parameter at index:: 1
Does Oracle SQL developer support bind variables in the SQL statements?
thanks in Advance
Vali ShaikYou are probable going to get a quicker answer on this forum : SQL Developer
-- Andy -
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
- - ---------- -------------------- -------------------- -------------------------------------------------- -
ODM within Oracle SQL Developer 3.0 , no progress during Workflow creation
Hi,
I am trying to follow the instructions mentioned at http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/bidw/datamining/ODM11gR2.htm
In the "Create a Workflow and Add a Data Source" section when i try to create a new New Workflow from the menu, the Oracle SQL Developer 3.0 just shows a progress bar pop up with message "Validating and Updating Workflow". The workflow does not gets created even after 6 hours while the progress bar keeps moving. I tried it several times but no luck and hence not able to move further.
Thanks in advance for the help.Hi,
Are you using the SQL Developer 3.0 Production Release?
Can you try again, but this time launch SQL Developer using the following file:
C:\<SQLDEVELOPER INSTALL DIRECTORY>\sqldeveloper\sqldeveloper\bin\sqldeveloper.exe
This will display a console window prior to SQL Developer UI being displayed.
There may be some unexpected exception that is being thrown.
It should display in this console window and give us more information to go on.
It sounds like you were able to create a Project ok.
Did you have any issues during the install of the repository?
Did you happen to save the log?
If so, can you paste it in this thread?
THanks, Mark -
I'm new to Oracle. I have installed Oracle SQL Developer 3.0.04 and Java 1.7. When I run Oracle SQL Developer, I will get the window Running this product is supported with minimum Java version of 1.6.0_04 and a maximum version less than 1.7. This product will not be supported....
Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?
I have already downloaded Java 1.6 but don't know whether I need to uninstall Java 1.7 first. If don't need to uninstall Java 1.7, how can I set Oracle SQL Developer to run with Java 1.6?
Thanks for any help.
Edited by: 881656 on Aug 25, 2011 11:22 AMHi,
One prior post discussing the use of Java 7 is:
SQL Developer 3.0 and Java SE 7?
There is no need to uninstall any Java version (except if you have disk space constraints) and no problem switching between Java versions. This may be controlled in the sqldeveloper.conf file in your ...\sqldeveloper\sqldeveloper\bin directory via the SetJavaHome line. For example:
#SetJavaHome ../../jdk
SetJavaHome C:/Program Files/Java/jdk1.6.0_26
#SetJavaHome C:/Program Files/Java/jdk1.7.0Regards,
Gary Graham
SQL Developer Team
Maybe you are looking for
-
First GarageBand import: resounding silence
Torally wet-behind-the-ears Logic Pro 9 nooobie here. Wanted to move to Logic because GB keeps unpredictably and silently wiping real instrument files in the .band package. I'm sick of it and nobody on GB forums can explain why it happens or how to p
-
My Encore is transcoding "don't transcode" MPEGs
Hi everyone, I always bring only MPEG-2 compliant video files into Encore. They always show up as "don't transcode" and when I build the DVD it goes really fast. Today I ran into a problem. I bring in a MPEG-2, which Encore lists as "don't transcode"
-
My phone goes right to voicemail instead of ringing?
I don't understand why this happens. Every other function works fine. Does anyone know what to do.
-
Spread the Love! Be our Power Pivot TechNet Guru, this Valentine's
TechNet loves you! We love your contributions at TechNet Wiki sooo much that we give you more than just love in return... We give you NOTORIETY, GLORY... and VIRTUAL MEDALS! That's not all, this love we have, together, it flows both ways my friend. Y
-
Business Catalyst Help | Add a secure area to your site
This question was posted in response to the following article: http://helpx.adobe.com/business-catalyst/partner/add-secure-area-your-site.html