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
Similar Messages
-
Compare two schemas in oracle 11g
Hi All,
Can any one please help me how to compare two schemas in oracle 11g.
Thanks
Edited by: 793914 on Oct 22, 2010 9:33 AMYou can do it with gridcontrol. Look for dictionary comparisons and dictionary baselines.
If you don't have gridcontrol, you can also use SQLDeveloper (free download on otn).
There are two ways to do it with SQLDeveloper.
1) Use Tools->Database Diff. However, you need a change management license to use this functionality. I've never used this.
The free way is to...
2) Use Tools->Database Export. Run it once for each schema and make sure the "Show Schema" option is NOT checked before exporting the schema. Also make sure you don't export data. You can choose which types of objects to export as well.
Once you have the two export files for the two schemas then simply run a diff tool on your platform. Use the diff command line for linux or winDiff or something similar in windows. -
How to change the password of a schema using Oracle SQL Developer
Hi need to change the password of a schema using Oracle SQL Developer how do i do it?
Hi
alter user username identified by password -
How to compare two rows in PL/SQL?
Hi All,
How to compare two rows in PL/SQL? Is there any method that I can use instead of comparing them column by column?
Any feedback would be highly appreciated.PhoenixBai wrote:
Hi All,
How to compare two rows in PL/SQL? Is there any method that I can use instead of comparing them column by column?What "rows" are you referring to?
If you're talking of rows within a PL/SQL associative array there are techniques as described in the documentation... e.g.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type v1 is table of number;
3 r1 v1 := v1(1,2,4);
4 r2 v1 := v1(1,2,3);
5 begin
6 if r1 MULTISET EXCEPT DISTINCT r2 = v1() then
7 dbms_output.put_line('Same');
8 else
9 dbms_output.put_line('Different');
10 end if;
11* end;
SQL> /
Different
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type v1 is table of number;
3 r1 v1 := v1(1,2,3);
4 r2 v1 := v1(1,2,3);
5 begin
6 if r1 MULTISET EXCEPT DISTINCT r2 = v1() then
7 dbms_output.put_line('Same');
8 else
9 dbms_output.put_line('Different');
10 end if;
11* end;
SQL> /
Same
PL/SQL procedure successfully completed.
SQL>If you're talking about rows on a table then you can use the MINUS set operator to find the rows that differ between two sets of data...
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
14 rows selected.
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
7 rows selected.
SQL> select * from emp
2 minus
3 select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7 rows selected.If you actually need to know what columns data is different on "non-matching" rows (based on your primary key) then you'll have to compare column by column. -
How to print a something in oracle sql developer
Hello all
Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
thank u in advance.
best1003209 wrote:
Hello all
Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
thank u in advance.
bestDBMS_OUTPUT() -
hi
how to import *.dmp file Through Oracle SQL Developer (3.2.20.09) ?
how to do it ?
thanksYou do not.
.dmp files are created from our Export and Data Pump database utilities and are proprietary files. You use the corresponding Import (or Data Pump) utility to import the data. -
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. -
Getting the schema using Oracle SQL Developer 1.5.1
I need to generate a report in CSV/XLS format using Oracle SQL Developer 1.5.1 to get the schema details
in the below format.
Table Name: XXXXXXXXX
Table Space Name: XXXXXXXXXXXXXXX
Structure :
Field Name Data Type Size
Xxxxxxxx xxxxxx xxxxx
Xxxxxxxx xxxxxx xxxxx
Xxxxxxxx xxxxxx xxxxx
Xxxxxxxx xxxxxx xxxxx
Field level constraint:
Xxxxxxxxxxxxxxxxxx
Table Level Constraint:
Xxxxxxxxxxxxxxxxxx
Indexes:
Index Name Column Name(s) Table space name
Xxxxxxxx xxxxxxxxx xxxxxxxxxxxx
Xxxxxxxx xxxxxxxxx xxxxxxxxxxxx
Xxxxxxxx xxxxxxxxx xxxxxxxxxxxx
Sequence Number:
Xxxxxxxxxxxxxxxx
Triggers:
Xxxxxxxxxxxxxxxxxx
I am using a query to do that, but I cannot run more than one queries in the Create Report Dialog.
I went to the Menu->View->Reports. In that, I chose User Defined Reports, created a new folder called Schema Detail and in that a report named Schema Detail. I right click on that report, choose Edit option, Create Report Dialog opens.
In the Create Report Dialog, I chose the option Script for Value of Style.
In the SQL column I enter a query "select * from table_names". But, if I enter another query after that, it does not run and reports an error "SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 - SQL command not properly ended" Cause: Action: "
I end the first query with a semi colon, but it does not work.
The queries run fine in a SQL Worksheet. There, I can terminate the first query with a semi colon and enter the second query. Then, I run both of them together so that result-set of second query appears after the second.
Am I doing something wrong? Can someone please advise on how to get the information I need?
Thanks a lot.You can do it in SQL Worksheet because you are running a script. You could run the script in SQL*Plus, and even start it from a bat/cmd file.
Or if you want this as a User Defined Report, you might make it a PL/SQL style report. Here, all output is done through DBMS_OUTPUT.PUT or DBMS_OUTPUT.PUT_LINE. You can output HTML tags or plain text. I have an example in my paper for ODTUG Kaleidoscope 2009. -
Connecting to HR schema in Oracle SQL Developer
I have installed Oracle sql developer 3.2 version.And I dont have oracle client installed.
Can I connect to HR schema with this set up.
If yes ,please suggest me the credentials.
Thanks.You do not need any oracle client installed, you do however need a database somewhere to connect to.
The credentials you require would be for this database, and so we cannot help you get them.
If you have a DBA that manages your databases ask him for the credentials.
If you are on your own and just want to try out something, your best option is to install an Oracle XE on your own system, then you can connect with the defaults SQLDeveloper already has when creating a new connection (the system password will be set during database installation so note it down), then you can play with your newly installed database. -
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 see job section in "Oracle SQL Developer"
Hi,
I am using oracle SQL developer to connect to oracle instance unlike procedure,tables,views i am not able to see job section (we have can see in toad as job section) please help me to get locate the same.There's no support for jobs yet. Vote on the existing feature requests at the SQL Developer Exchange if you want to add weight for future implementation.
If you have trouble handling them manually, you can always ask help on the SQL And PL/SQL forum...
Thanks,
K.
Edited by: -K- on 20/05/2009 12:27:
BTW, there are some job reports (Reports - All Reports - Data Dictionary Reports - Jobs), but those will list only DBMS_JOB stuff, not the DBMS_SCHEDULER ones.
You can also create your own reports and/or User Defined Extensions to add a Jobs node inside the connection navigator, but that's for more advanced users... -
How to check the datfiles from oracle SQL Developer(enterprise Manager)
hi,
Iam using Oracle SQL Developer as enterprise manager in my local pc.I want to check the size of datafiles using this enterprise manager.could u pls help me out..
Thanks in advance ,
R.RatheeshWhat?
Sql developer is not enterprise manager.
Size of datafiles? Read the documention, and read the concepts and administration manuals for your release.
I am not going to provide links, because you have not given your database version number and secondly if you found this forum you can find the docs.
But I will give you a clue....DBA_DATA_FILES...
Message was edited by:
bazzza -
How to compare two xmltypes in oracle 10g ?
Hi,
I have a requirement that i have to compare two xmltypes of a table.
Is there any function available in oracle 10g that compares two xmltypes.
Regards
KrishnaThis can help for this question
Re: Help needed ! How to find out 'XML Difference' using XDK -
How to Compare two strings in PL/SQL
Hi All,
I need to compare two strings whether they are equal or not in PL/SQL.Is there any function to comparing the strings.Yes, the = sign.
Are you after something like:
IF v_string1 = v_string2 THEN
ELSE
END IF;?
Edited by: Boneist on 27-Aug-2009 11:41 -
How to open new connection in Oracle SQL Developer ???
Hi folks,
I have installed SQL Developer Version 1.5.0.53 in a XP sp2 system. tried to open a Database Connection, with OR_OHCL connection name and 'hr' username & password, but when I click on Connect it showed me "Failure- Io Exception The network adapter could not establish the connection". How can i resolve this issue?
Thanks in adavance. I need urgent reply, if not lot of replies!!!i need to mention that i have never used SQL Developer before. but i have done some oracle coding 1year ago when i had Oracle 9i installed in my computer. but i don't have any oracle installed in my computer. do i need to install any for using SQL Developer? i am not sure what to do?
i want to use it for just learning. if i need to install Oracle DB which one do you guys suggest me to install ---
1.Oracle Database 10g Express Edition (Western European)
2.Oracle Database 10g Express Edition (Universal)
3.Oracle Database 10g Express Client
4. or anything else
please help me out.
Sarwar
Maybe you are looking for
-
Query related to Migrating non Dc Web dynpro project to DC.
Hi All, I have the requirement to migrate a non DC Web dynpro project to DC. I have a project which involves few models.The models are nothing but BAPIs released as web services. So, when I am trying to do what i intend to do, I am getting compile ti
-
I am using Windows 7, and ISP provider is AOL 9.5 dialup. When I attempt to save emails with graphics to My Documents, any graphics, usually in body of email as a bitmap or jpeg file, when I reopen email from My Documents, the graphics appear blank,
-
I want to attach a song to a text message is that possible
I want to send my wife the song all i want for christmas is you but I cannot figure out how is it possible
-
Why has my back button disappeared, I have to exit each time I want a previous screen.
Why has my back button disappeared, I have to exit each time I want a previous screen
-
MacBook Pro works fine - Powerbook G4 won't backup
I was wondering if someone can help me. My MacBook Pro is fully backed up on the TC and working well with TM. My wife's 12" Powerbook G4 has access to the TC and the internet but every time I try to do her initial back up on the TC her computer event