SQL developer vs SQL*plus
hi i am not able to run the command connect username/password on SQL developer but when i run the command on
sqlplus through command prmpt then it work .....wht might be the issue..i am a newbe to use of SQL developer
Technohub wrote:
sql devloper is a third party tool. Hmm last time I checked, it was a tool from Oracle only. Let's check again,
http://www.oracle.com/technetwork/developer-tools/sql-developer/index.html
Its not a 3rd party but Oracle's own tool.
>
once u connect to the db then u can switch to other users as follows
SQL> conn user/pwd@connect_string
Similar Messages
-
AUTOTRACE stats different in SQL Developer vs SQL Plus
Using SQL Developer 3.2.20.09, database is 11.2 on Linux. I'd like to know why I get different stats when using AUTOTRACE in SQL Developer vs SQL Plus. If I do the following in SQL Developer and in SQL Plus I get a very different set of stats:
set autotrace on
select * from emp;
set autotrace off
I run this with "run worksheet" in SQL Developer and I see this set of stats:
Statistics
4 user calls
0 physical read total multi block requests
0 physical read total bytes
0 cell physical IO interconnect bytes
0 commit cleanout failures: block lost
0 IMU commits
0 IMU Flushes
0 IMU contention
0 IMU bind flushes
0 IMU mbu flush
I do the same in SQL Plus and I see these stats:
Statistics
0 recursive calls
0 db block gets
7 consistent gets
0 physical reads
0 redo size
1722 bytes sent via SQL*Net to client
519 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
14 rows processed
A very different set of stats. The stats in shown in SQL Plus seem to be much more useful to performance optimization over the one shown in SQL Developer. Why the different set of stats for each? Thanks.Cross-referencing to another recent thread on this topic:
Re: set autotrace on statistics in sqldeveloper (oracle 11g) is wrong -
Cannot see table in sql developer or sql plus
I have created a record in application designer. I have then built the table. I can close the record and then find it again in application designer. But if I go to sql plus or sql developer, I cannot see it. Am I missing a step?
You probably can see all the tables of sysadm because someone else give you proper grant for that on existing sysadm's objects.
For the new or modified object (drop+create) you should :
1. connect as sysadm and run
grant select on new_table_name to your_own_user;2. connect with your own user and run
create synonym new_table_name for sysadm.new_table_name;Then you'll be able to query that table without using schema name alias.
Some admin have also a ddl trigger to make it automatically.
You could also work through a role and public synonym if more than one user needs to access sysadm's objects.
Nicolas. -
Explain plan results are different in SQL Developer than SQL Plus
My Environment:
SQL Developer 1.0.0.15.27
Platform where SQL Developer is running: Windows XP 2002 SP2
Oracle Database and Client 9.2.0.7
Optimizer_mode: FIRST_ROWS
I have the following SQL statement:
SELECT a1.comp_id
FROM temp_au_company a0, au_company a1
WHERE :b2 = a0.temp_emp_code
AND a0.comp_id = a1.comp_id
AND a0.sls_terr_code != a1.sls_terr_code
AND a1.last_mdfy_date > :b1
When I run an Explain in SQL Developer I get the following access path (which is the one I really want):
SELECT STATEMENT TABLE ACCESS(BY INDEX ROWID) FEDLINK.AU_COMPANY NESTED LOOPS INDEX(RANGE SCAN)
FEDLINK.UX2_TEMP_AU_COMPANY
INDEX(RANGE SCAN) FEDLINK.PX1_COMPANY
However, when I execute the statement with sql_trace turned on and use tkprof to generate the actual access path, the statement executes as follows (which is WAY more expensive):
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 3.58 6.68 28136 29232 0 0
total 3 3.58 6.69 28136 29232 0 0
Misses in library cache during parse: 1
Optimizer goal: FIRST_ROWS
Parsing user id: 979 (FEDLINK) (recursive depth: 1)
Rows Row Source Operation
0 NESTED LOOPS
0 TABLE ACCESS FULL AU_COMPANY
0 INDEX RANGE SCAN UX2_TEMP_AU_COMPANY (object id 49783)
Notice the FULL access of au_company.
I understand that SQL Developer has nothing to do with why the statement executed the way it did, but why is the Explain in SQL Developer different than the actual execution plan?
Added note....when I run the explain in SQL Plus it is the same as the actual execution. Here is the explain from SQL Plus:
explain plan for SELECT a1.comp_id
FROM temp_au_company a0, au_company a1
WHERE '1' = a0.temp_emp_code
AND a0.comp_id = a1.comp_id
AND a0.sls_terr_code != a1.sls_terr_code
AND a1.last_mdfy_date > '01-MAY-2006';
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 2 | 76 | 2597 |
| 1 | NESTED LOOPS | | 2 | 76 | 2597 |
| 2 | TABLE ACCESS FULL | AU_COMPANY | 2 | 42 | 2595 |
| 3 | INDEX RANGE SCAN | UX2_TEMP_AU_COMPANY | 1 | 17 | 2
Thanks,
BrendaThe explain is different (full scan of au_company in SQL Plus / index access in SQL Developer) even when I use variables in SQL Plus. Here is the output for SQL Plus using variables instead of literals:
SQL> variable b1 varchar2
SQL> variable b2 char
SQL> explain plan for SELECT a1.comp_id
2 FROM temp_au_company a0, au_company a1
3 WHERE :b2 = a0.temp_emp_code
4 AND a0.comp_id = a1.comp_id
5 AND a0.sls_terr_code != a1.sls_terr_code
6 AND a1.last_mdfy_date > :b1
7 /
Explained.
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 3184 | 118K| 2995 |
| 1 | HASH JOIN | | 3184 | 118K| 2995 |
| 2 | INDEX RANGE SCAN | UX2_TEMP_AU_COMPANY | 3187 | 54179 | 3 |
| 3 | TABLE ACCESS FULL | AU_COMPANY | 24009 | 492K| 2983 |
Any other ideas? They should be the same.
Brenda -
Select from in SQL Developer fails - SQL*Plus works
Hello All,
I've got the HS connection to MySLQ working correctly and most of the requirements I have with respect to the data is working.
However, i"m only able to test my procedures and functions in SQL*PLus. IN SQL Developer 4.0.0.12 there is always a problem and query results are never displayed.
Thanks in advance for any advice.
Sincerely
JSActually Mike,
The white spaces are appended to the end of the resulting string. I've included the NLS setting for bother Oracle adn MySQL as well as my odbc.ini file
select '"'|| "User" ||'"' as Username from "user"@MYODBC5;
Results (there is white spaces added right after the username, as the result shoudl have been "intm","root" as opposed to "intm "
===============================================================================================================
USERNAME
"intm
USERNAME
"root
NLS _SETTINGS ORACLE
==============================================================
Oracle:
======
NAME
VALUE$
NLS_LANGUAGE
AMERICAN
NLS_TERRITORY
AMERICA
NLS_CURRENCY
$
NLS_ISO_CURRENCY
AMERICA
NLS_NUMERIC_CHARACTERS
NLS_CHARACTERSET
AL32UTF8
NLS_CALENDAR
GREGORIAN
NLS_DATE_FORMAT
DD-MON-RR
NLS_DATE_LANGUAGE
AMERICAN
NLS_SORT
BINARY
NLS_TIME_FORMAT
HH.MI.SSXFF AM
NAME
VALUE$
NLS_TIMESTAMP_FORMAT
DD-MON-RR HH.MI.SSXF
F AM
NLS_TIME_TZ_FORMAT
HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT
DD-MON-RR HH.MI.SSXF
F AM TZR
NLS_DUAL_CURRENCY
$
NLS_COMP
BINARY
NLS_LENGTH_SEMANTICS
BYTE
NLS_NCHAR_CONV_EXCP
FALSE
NAME
VALUE$
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_RDBMS_VERSION
11.2.0.2.0
NLS _SETTINGS MYSQL
==============================================================
Oracle:
======
NAME :
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
===========================================================ODBC INI
[myodbc5]
Driver = /usr/lib64/libmyodbc5a.so
Description = Connector/ODBC 5.3.4 Driver DSN
SERVER = 127.0.0.1
PORT = 3306
USER = intm
PASSWORD = *********
DATABASE = mysql
OPTION = 0
TRACE = OFF -
Migration issue in SQL Developer (from SQL Server to Oracle)
Dear All,
I am using SQL Developer 3.0 to migrate data from SQL Server 2008 to Oracle 11gR2. I used Quick Migration Wizard for migrating and everything was Ok but when it was running migration process, I got this message: “Migration actions have failed. Check the migration reports for details. : null”
But there was not any report to check. Does anyone know how I can do it without any problem?
Thanks in advance.I am working on a project to migrate from SQL Server 2008 to Oracle 11gR2. It includes some tables, views, indexes, triggers and store procedures. At first I worked on SQL Developer 2.1.1.64 but it doesn’t support SQL Server 2008 (I had to use SQL Server 2005 in its offline options). I got a lot of error when I used the offline options. I know that I may be having some problem in table or view definition in my SQL Server but if I don’t have any log file I can’t solve them.
Unfortunately, in SQL Developer 3.0 there isn’t any option to generate a SQL comments from objects (convert to Oracle) because I need to rewrite comments if they have problem. For example I have a filed named USER that it’s a reserved word in Oracle so I have to change this field name.
I also can’t use “Translation Scratch Editor” because it has some error to convert. For example when I use it for the following code:
CREATE TABLE [dbo].[Table1](
[ID1] [int] IDENTITY(1,1) NOT NULL,
[Name1] [varchar](50) NULL,
CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED
[ID1] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[Table2](
[ID2] [int] IDENTITY(1,1) NOT NULL,
[Name1] [varchar](50) NULL,
CONSTRAINT [PK_Table2] PRIMARY KEY CLUSTERED
[ID2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
I receive a wrong code like this:
CREATE SEQUENCE Table1_ID1
START WITH 1
INCREMENT BY 1;
CREATE TABLE Table1
ID1 NUMBER(10,0) NOT NULL,
Name1 VARCHAR2(50) ,
CONSTRAINT PK_Table1 PRIMARY KEY( ID1 )
CREATE OR REPLACE TRIGGER Table1_ID1_TRG
BEFORE INSERT
ON Table1
FOR EACH ROW
BEGIN
SELECT Table1_ID1.NEXTVAL INTO :NEW.ID1
FROM DUAL;
END;
CREATE SEQUENCE Table1_ID1
START WITH 1
INCREMENT BY 1;
CREATE SEQUENCE Table2_ID2
START WITH 1
INCREMENT BY 1;
CREATE TABLE Table2
ID2 NUMBER(10,0) NOT NULL,
Name1 VARCHAR2(50) ,
CONSTRAINT PK_Table2 PRIMARY KEY( ID2 )
CREATE OR REPLACE TRIGGER Table1_ID1_TRG
BEFORE INSERT
ON Table1
FOR EACH ROW
BEGIN
SELECT Table1_ID1.NEXTVAL INTO :NEW.ID1
FROM DUAL;
ENDCREATE OR REPLACE TRIGGER Table2_ID2_TRG
BEFORE INSERT
ON Table2
FOR EACH ROW
BEGIN
SELECT Table2_ID2.NEXTVAL INTO :NEW.ID2
FROM DUAL;
END; -
SQL Developer 31EA1 SQL Worksheet not allowing entry
When select to open a new SQL worksheet or having open a worksheet on connection, the system will bring up a new tab with the blue shading. It stops at that point. I can not enter anything and if I try and do other tasks, even exit Developer, I get a connection busy error message. If I try and click the try again button it just keeps reappearing. If I click the abort and try and do anything els I get the error again. I have to go to task manager and kill the task to get out of SQL developer. I am using Windows XP, JAVA 1.6.0_26 32 bit versions. Everything was working when I was using 3.0.
Hi,
See this post for the likely problem:
Re: SQL Developer 3.1EA1 JAVA Error During Export
Regards,
Gary
SQL Developer Team -
Working on SQL Developer / pl/sql developer without installing Oracle
HI,
I am working on SQL Developer tool without installing oracle into my local machine.
I just took server IP as hostname and continuing with the same/
Now, since I donot have tns names, I am not able to use any other user other than my work related.
like scott etc.
could anyone let me know, is there any way that i can work on sql developer or pl/sql developer without installing oracle into local machine
like using scott etc...
for testing and learning purpose of self code.
thanks in advance.VBSK wrote:
I am working on SQL Developer tool without installing oracle into my local machine. You need an Oracle client driver - this is mandatory.
No, you do not need a TNS alias (as the connection string can be build manually by the application and the driver).
So SQL*Developer needs to have an OCI (Oracle Call Interface) client driver. This can be "installed" using Oracle Instant Client.
Instant Client does not really install - to use it takes 3 basic steps:
- download it (zip file)
- unzip it to a directory (e.g. C:\InstantClient on Windows)
- add to your Windows User's environment an ORACLE_HOME variable that points to this directory
These steps should suffice in making the driver in in Instant Client available to Oracle applications. (works for me running an Oracle OCI client like <i>Mumbai</i> or Oracle's <i>SQL Data Modeler</i>).
If you want a tnsnames.ora file, then create the file and create a new environment variable called TNS_ADMIN that refers to directory location of the file. It can use the same location as your Instant Client directory.
PS. I assume you have an existing Oracle server to connect to. -
EA1 - Exception when SQL Developer opens SQL files on startup
If I close SQL Developer with a file open, that file is automatically reopened when restarting SQL Developer. This works fine, but for each .sql file which does open, I get the following exception listed in the Logging Page's Log tab:
SEVERE 147 0 oracle.ide.IdeCore Exception firing mainWindowOpened to oracle.dbtools.sqlworksheet.sqlview.SqlEditorController$2@xxxxxxx
This doesn't happen for PL/SQL files (ie .pks, .pkb, etc) - just for .sql files.Fixed this in development code. Thx.
-
SQL Developer vs. SQL*Plus Performance???
Hi,
DB: Oracle 10.2.0.3.0
SQL Developer: 1.2.0
SQL*Plus: 10.2.0.3.0
I am running the same query once in SQL Developer (Response time 10 sec.)
The same query in SQL*Plus takes over 20 Minutes.
SQL*Plus is using SQL*Net right?
Is that the reason?
ThanksHi,
how can I check for SQL Developer?
Does SQL Developer use SQL*Net also?
I changed the arraysize to 1000
but does not see any performance gain.
The query still taking more than 6 minutes.
The same in SQL Developer runs within 10 seconds!
Thanks -
Is Sql plus command avaliable in sql developer
SQL developer is able to do most of thing can be done with sql plus with GUI , cool.
However, seems sql command, such as show parameter, start database have to be done in sql plus.
is this true?
most of time in my development, I just open sql developer now. but seems in this statuation, i have to use sql plus.jz2 wrote:
SQL developer is able to do most of thing can be done with sql plus with GUI , cool.
However, seems sql command, such as show parameter, start database have to be done in sql plus.
is this true?
most of time in my development, I just open sql developer now. but seems in this statuation, i have to use sql plus.As far as I know you still have to start the database from SQL*PLUS. If your schema has privileges you can get parameter values in SQL*Developer by querying V$PARAMETER (SET_CATALOG_ROLE privilege).
The two tools are not the same. Much of what you can do with SQL*PLUS you can do with SQL*Developer but I feel that SQL*PLUS still has better scripting abilities along with its bind variable storate. On the other hand the GUI interface of SQL*Developer Is fairly easy to use. The danger is editing procedures/functions/packages in the database forgetting to back them up from SQL*Developer first; SQL*PLUS forces me to use scripts.
Depending on what I am doing I use either SQL*PLUS or SQL*Developer (which I like better for queries with long select lists).
I'm having trouble getting DBMS_OUTPUT.PUT_LINE to work the way I expect in SQL*Developer; sometimes the output just does not appear without repeated executions of the generating program. -
SQL Developer \ SQP*Plus
Sorry for posting this in this forum, but I can't find a SQL Developer forum. I am trying to launch SQL Plus from inside SQL Developer, but can't because it is grayed out in the menu. In the preferences I have it correctly pointing to my sqlplus.exe executeable. Anyone have any ideas. It used to work for me in the previous version of SQL Developer.
Thanksbut I can't find a SQL Developer forum
SQL Developer
Dim -
Oracle SQL Plus software vs. PL/SQL Developer software
I am taking a class the used the SQL Plus to perform all the exercises in the book. Will I have any problem using the PL/SQL developer software that I currently use?
thank you in advance for any help offered on this thread..You may encounter difficulties if your course covers functionality provodided by SQL*Plus that are not available in PL/SQL Developer, however, generally speaking most things that can be done in SQL*Plus can also be done in PL/SQL Developer or SQL Developer or Toad.
That said when it comes to learning Oracle it's far better to stick with SQL*Plus and a text editor as it will force you to learn the syntax yourself rather than relying on your tool of choice. -
W'azup with SQL Developer barfing on SQL*Plus "set" commands
Check out this short script and the results it generates, as pasted below.
I can't find anything in the SQL Dev documenation re: what SQL*Plus set commands it supports and which it considers "passe." I'm particularly puzzled by the "column ... format ..." command getting ignored.
set heading off
set pagesize 0
set linesize 80
set feedback off
prompt ...start...
column x format a5
select 'abcdefghij' x from dual;
prompt ...end...
line 1: SQLPLUS Command Skipped: set heading off
line 2: SQLPLUS Command Skipped: set pagesize 0
line 3: SQLPLUS Command Skipped: set linesize 80
...start...
X ----------
abcdefghij 1 rows selected
...end...For supported SQL*Plus commands: SQL Developer Help > SQL Developer Concepts and Usage > Using the SQL Worksheet > SQL*Plus Statements Supported and Not Supported in SQL Worksheet.
The "column ... format ...." command is not supported. A workaround is to use substr in your select statement.
See also How to set a column size in sqldeveloper? -
How to compare two schemas in Oracle sql developer
Hello,
I need to compare both the data and schemas details (columns etc) between two schemas on different databases (connections).
What is the easiest and most efficient way to do this? Hopefully in Oracle Sql Developer or Sql Plus?
Thanks.In SQL Developer go to Tools -> Schema Diff !
in SQL* Plus you will need to write PL/SQL for this.
Amardeep Sidhu
Maybe you are looking for
-
How to set up family sharing if we previously shared one account?
My wife and I have 2 phones and 4 tablets between the two of us. We have always just used my itunes account on all of the devices. Now that family sharing is available, I'd like to set her up with an apple ID and separate our stuff. What is the way
-
Tabs from previous session don't reload on Yosemite, all settings correct
I have all settings correct and everytime I start firefox it goes to homepage. Using Yosemite
-
Hi, Scenerio is : We use MD06 to display the list the requirements & from that tcode we convert the open PR into PO (ME21N). The requirement here is - In ME21N Document overview tab we need to get both Open PR List & (ii) PO's on hold List at the sam
-
I gave my old iphone to my fiancee and when tapping voicemail it dials and ask for a system phone number. What do I need to do to get this set up?
-
Any SNMP Browser for OSX Server?
Hi, I'm looking for a free software that act as a SNMP Browser. Any sugestion for this solution for OSX? many thanks Oliver