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.
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 -
Table TEST was created by user SYSTEM to USER1.
Create Table USER1.TEST
field1 VARCHAR2(10)
Then user SYSTEM, created the public synonym:
Create Public Synonym TEST for USER1.TEST;
also.
Grant Select on USER2.TEST for CONNECT;
(USER2 has: CONNECT and RESOURCE privilidges).
USER2 cannot see table TEST. The only way is by putting the USER1.TEST
But is there any other way to proceed without "user.table" = user1.test?>
Grant Select on USER2.TEST for CONNECT;
>
You are granting select on the TEST table owned by USER2, but according to the logic above that statement, USER1 owns the table. The grant should be:
Grant Select on USER1.TEST to CONNECT;
BUT ... I would never grant privs to one of the system privs like CONNECT, RESOURCE, etc... You should create a role just for your users and grant access to that role instead. You can then grant that role to your different users. -
I backup Lightroom 5 and now I cannot see "Basic" from my develop module
I backup Lightroom 5 and now I cannot see "Basic" from my develop module! Help!
Right-click on any other panel tab and make sure they are all checked.
-
Very new to this: Cannot see code for a package in SQL Developer
I know I'm doing something wrong but I certainly don't know what. I'm looking for the code to go along with a package. I can see the procedures the package calls and I can see a list of procedures but I cannot see the code for those procedures. I have tried using describe on the pop up and I just don't see anything but a window showing me the parameters the procedure will use. I want to see the code it will use.
Can someone walk me through this or point me in the right direction?
TIAI can only assume you're on 2.1 or 2.1.1 since you don't even say. If you click on the tree showing the various objects after establishing your connection, when you get to packages and you click the package you want, you'll see the spec. Now click on the plus sign and there should be 'package name' body. If you click that body icon, you say you still can't see the code?
Evita
Edited by: Evita on Mar 30, 2010 2:59 PM -
Cannot see table data when selecting data tab
In SQL developer 2.1, when I look at table definitions I see the column names and types etc, then when I click on the data tab to see the data in that table, I don't see the data only row numbers, this does'nt happen in version 1.54. Any idea what it could be causing the data not to be displayed?
I don't know if there is a synonym or not, I'll have to check. In the table browser when I click on a table I get the table columns in the main window with tabs on top for 'data', 'constraints' etc. when I select data, I see row numbers on the left, column names at the top but no data when there is data in the table (checked it using sql).
I've gone back to version 1.5.5, thanks for your help.
Arshad -
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 -
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 -
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 -
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 developerTechnohub 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 -
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 3.0.02 & External table
Hello all,
I encountered an interesting error while working with SQL Developer. I created external table mapped on data file in csv format. Everything works fine up to moment I double clicked the table header of the first column to make data sorting. Since I am not able to see table data even if the SQL Developer has been restarted.
In the 'Data Editor - Log' window I can see the text as follows:
ORA-00600: internal error code, arguments: [rworupo.1], [17], [10], [], [], [], [], []
When I open SQL view of that table I can see:
-- Unable to render TABLE DDL for object FSM.COMPANY with DBMS_METADATA attempting internal generator.
CREATE TABLE COMPANY
CUSTOMER_PROVIDER_REFID VARCHAR2(50 BYTE)
, NAME VARCHAR2(50 BYTE)
, REG_NUMBER VARCHAR2(50 BYTE)
, VAT VARCHAR2(50 BYTE)
, ADDRESS_STREET VARCHAR2(100 BYTE)
, ADDRESS_BUILDING_NO VARCHAR2(20 BYTE)
, ADDRESS_CITY VARCHAR2(50 BYTE)
, ADDRESS_POSTCODE VARCHAR2(50 BYTE)
, ADDRESS_COUNTRY VARCHAR2(50 BYTE)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY ETL_SOURCE
ACCESS PARAMETERS
RECORDS DELIMITED BY '\n'
badfile ETL_SOURCE:'COMPANY.bad'
logfile ETL_SOURCE:'COMPANY.log'
discardfile ETL_SOURCE:'COMPANY.dsc'
FIELDS TERMINATED BY ";"
LRTRIM missing field VALUES are NULL
"CUSTOMER_PROVIDER_REFID",
"NAME",
"REG_NUMBER",
"VAT",
"ADDRESS_STREET",
"ADDRESS_BUILDING_NO",
"ADDRESS_CITY",
"ADDRESS_POSTCODE",
"ADDRESS_COUNTRY"
LOCATION
ETL_SOURCE: 'Company.csv'
REJECT LIMIT UNLIMITED
In the log file for that table there is nothing, what could explain the error.
Does anybody know how to fix it.
Thanks for any idea.
JiriHello Jiri!
this is because of SQL Developer does not support "order by" over external tables.
In general it is not disabled in SQL developer to use it for external tables but due to unknown reason execution of select including "order by" clause over external table generates ORA-00600 error.
SQL Developer is saving all used "order by", "filter" settings (and many others) to special cache (user specific XML file) and this setting is used next time you open specific object - table.
It means when you apply "sorting" on external table
- oracle generates ORA-00600
- used "order by" is stored by SQL Developer into cahce XML file
- ...and you cannot open this table from your SQL developer anymore
How to correct it:
- go to SQL developer cache folder (something like C:\Documents and Settings\[username]\Application Data\SQL Developer)
- try to find file "*GridSettings.xml" which contains this bad cache information
there are usually tons of GridSettings.xml files
-1134293461GridSettings.xml
-1134293492GridSettings.xml
-1134293523GridSettings.xml
you have to find file which contains your specific extenal table name like...
<uniqueName>SELECT * FROM "SCHEMANAME"."EXTERNAL_TABLE"</uniqueName>
- find "sortClauses" tag
<sortClauses>
<Item class="java.lang.String">3 asc</Item>
<Item/>
</sortClauses>
- you can now edit/correct content of this file/tag or just delete it completely
- or you can easily delete complete cache folder - BUT in this case all specific user setting can be deleted!!!
- then your table is accessible again :-)
Regards
Radim -
I cannot Disable a constraint in SQL Developer
Here is my issue:
I have created a table already named practice1.
Using SQL Developer PL/SQL try to run a loop as following:
DECLARE
COUNTER1 NUMBER(2);
BEGIN
COUNTER1 := 30;
ALTER TABLE practice1
DISABLE CONSTRAINT PRK1;
LOOP
COUNTER1 := 30;
INSERT INTO PRACTICE1
VALUES (COUNTER1, 'test7', 8, 9);
EXIT WHEN COUNTER1 >26;
END LOOP;
END;
In other words I Insert the COUNTER1 variable value as Primary Key in the tables field1 column.
I run the script successfully without the ALTER TABLE DISABLE CONTSRAINT.. command.
Everytime I run it I had to increase the starting value of Variable COUNTER1 so it will not attempt to insert a duplicate pre-existed value in Primary Key.
Then I decided to insert the command ALTER TABLE DISABLE CONSTRAINT in order to not have to worry to change the starting value.
I am able to disable the constraint by using the same command in isolation . If I run it as part of the script as above I get the following error:
Error report:
ORA-06550: line 5, column 1:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
( begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << continue close current delete fetch lock
insert open rollback savepoint set sql execute commit forall
merge pipe purge
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
I would appreciate any suggestions.
Thank you.Your question has NOTHING to do with sql developer.
Mark this question ANSWERED and repost it in the SQL and PL/SQL forum.
https://forums.oracle.com/community/developer/english/oracle_database/sql_and_pl_sql
The problem is that you CANNOT execute DDL directly in PL/SQL. You need to use dynamic SQL to execute DDL within PL/SQL.
EXECUTE IMMEDIATE 'ALTER TABLE . . .';
If you need more help use the correct forum as shown above.
Maybe you are looking for
-
No Internet Access on laptop but access with desktop
I have a WRT54G wireless router. The desktop has a wireless adapter installed and I can hit the internet. I have been able to connect to the internet with the laptop until I updated drivers for the Bios. After doing that I can no longer access the
-
Problem with Out Reference in jsp
Hi All Please Help Me My problem is <% ResultVo rvo=null; for(int i=0;i<alist.size();i++){ rvo=(ResultVo)alist.get(i); %> <%=rvo.getData() %><%=rvo.getDel_tim() %> <% System.out.println("data"+rvo.getData()+""+i); System.out.println("dest"+rvo.getDes
-
DataTable with dynamic columns
Does somebody have an example of how to code a h:dataTable with dynamic columns? I have seen hints about how to do it in these two articles: http://forum.java.sun.com/thread.jspa?forumID=427&threadID=5218508 http://forum.java.sun.com/thread.jspa?thre
-
Hello, i have a table which contain two field customer and phonenumber and following record. Now i want a query for customer-wise phone number with Concatenating . similiar like attached image. i am using sql server 2012. what would best query to ge
-
CProjects-PS Integration (Automat. Case) PS profile missing from install.
We need to create PS-project automatically form cProject project. We know there is a standard project profile cProjects-PS Integration (Automat. Case) for this purpose. However, for some reason this profile is not installed in our development system.