Two oracle database
I have created TWO oracle database one is 8i and second is 10.
I want oracle 8i my default oracle database.
I have changed Environment Variable > System Variable > PATH > to 8i bin folder..but again..
C:\Documents and Settings\Administrator>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 15 11:52:12 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name:
Dear oracleRaj!
To connect to a specific Oracle database you need to set three Env variables
1.) %PATH%
2.) %ORACLE_SID%
3.) %ORACLE_HOME%
It looks like you only set %PATH% but not %ORACLE_HOME% and %ORACLE_SID%. For your convenience you may write two batchscripts to set these variables. One for 8i and one for 10g like this:
oracle10g.bat
set ORACLE_SID=sid_of_your_oracle_10g_database
set ORACLE_HOME=path_to_your_oracle_10g_homedirectory
set PATH=%PATH%;%ORACLE_HOME%\binYours sincerely
Florian W.
Edited by: Florian W. on 15.10.2010 08:54
Similar Messages
-
Two Oracle databases on one AIX Server - Note working, Pls Help
Dear Friends,
I have installed Two SAP systems with Two Oracle Databases on one AIX machine, The Installation of both the systems went fine without any errors, and also i have been able to login to both the systems seperately. (that means i cant start both the systems at a time, its one at a time)
But the problem is of the Oracle Listener, i am not able to start both the systems with single Oracle Listener processes(tnslistener). I tried all the possible scenarios as mentioned in note 98252 but nothing seems to be of any use so far.
the thing is i can start either one of the SAP Systems, But my objective is to start both the SAP Systems with one listener processes (LISTENER) and one listener port (1527)
Or
you can say i am also ready to keep two different listeners for TWO seperate Oracle databases, I tried doing so as per one of the sap notes in which you have to keep different names of listener and different numbers for listener port for second ORACLE database. I tried doing exactly mentioned in the note but yet unsuccessful...
Now i am completely lost as what is to be done since its critical i want you to immediately look into it and suggest me the appropriate solution so that i can set up both of my DEVELOPMENT and QUALITY system running...
To troubleshoot this if you require anything from my side then please feel free to ask me since our functional consultants have to soon start working on the SAP systems.
Regards
AyushThe note you specified talk about 2 database instances not 2 databases... (I was starting to wonder how you deploy 2 databases), you can have multiple database instances on a DB. The note also give you detailed explanation of the configuration of listener.ora
Now, if this is the case and you have installed 2 instances (not databases) on the same host and configured the listener according to the note, then you should be able to call R3trans -d from both SID's.. if the R3trans fails please post the contents of trans.log here.
the thing is i can start either one of the SAP Systems, But my objective is to start both the SAP Systems with one listener processes (LISTENER) and one listener port (1527)
Then, the configuration of your listener.ora file must be incorrect.
Regards
Juan -
How to compare two oracle database schemas
hi all,
i want to compare and find out differences between two oracle databases. The comparison should be made on between table definition,table data,primary and foreign keys, packages and functions.
Is there any management console or tool embedded in the oracle enterprise manger?
it is really appreciate if anyone can point me towards wright direction asap.Hi ,
This script would help u a lot in comparing 2 schemas and generate a report on them.
Script:
This script will compare two Oracle schemas and generate a report of
discrepencies and this script has been used against Oracle 7.3.4, 8.0.5,
REM and 8.1.7 databases, but it should also work with other versions.
REM
REM Please note that the following schema object types and attributes are
REM not compared by this script at this time:
REM
REM cluster definitions
REM comments on tables and columns
REM nesting, partition, IOT, and temporary attributes of tables
REM snapshots/materialized views, logs, and refresh groups
REM foreign function libraries
REM object types
REM operators
REM indextypes
REM dimensions
REM auditing information
REM new schema attributes added for Oracle 9i
REM
REM Version 02-04-2002
REM
PROMPT
PROMPT Schema Comparison
PROMPT =================
PROMPT
PROMPT Run this script while connected to one Oracle schema. Enter the Oracle
PROMPT username, password, and SQL*Net / Net8 service name of a second schema.
PROMPT This script will compare the two schemas and generate a report of
PROMPT differences.
PROMPT
PROMPT A temporary database link and table will be created and dropped by
PROMPT this script.
PROMPT
ACCEPT schema CHAR PROMPT "Enter username for remote schema: "
ACCEPT passwd CHAR PROMPT "Enter password for remote schema: " HIDE
ACCEPT tnssvc CHAR PROMPT "Enter SQL*Net / Net8 service for remote schema: "
PROMPT
ACCEPT report CHAR PROMPT "Enter filename for report output: "
SET FEEDBACK OFF
SET VERIFY OFF
CREATE DATABASE LINK rem_schema CONNECT TO &schema IDENTIFIED BY &passwd
USING '&tnssvc';
SET TRIMSPOOL ON
SPOOL &report
SELECT SUBSTR (RPAD (TO_CHAR (SYSDATE, 'mm/dd/yyyy hh24:mi:ss'), 25), 1, 25)
"REPORT DATE AND TIME"
FROM SYS.dual;
COL local_schema FORMAT a35 TRUNC HEADING "LOCAL SCHEMA"
COL remote_schema FORMAT a35 TRUNC HEADING "REMOTE SCHEMA"
SELECT USER || '@' || C.global_name local_schema,
A.username || '@' || B.global_name remote_schema
FROM user_users@rem_schema A, global_name@rem_schema B, global_name C
WHERE ROWNUM = 1;
SET PAGESIZE 9999
SET LINESIZE 250
SET FEEDBACK 1
SET TERMOUT OFF
PROMPT
REM Object differences
REM ==================
COL object_name FORMAT a30
PROMPT SUMMARY OF OBJECTS MISSING FROM LOCAL SCHEMA
SELECT object_type, COUNT (*)
FROM
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects@rem_schema
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects
GROUP BY object_type
ORDER BY object_type;
PROMPT SUMMARY OF EXTRANEOUS OBJECTS IN LOCAL SCHEMA
SELECT object_type, COUNT (*)
FROM
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects
WHERE object_type != 'DATABASE LINK'
OR object_name NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects@rem_schema
GROUP BY object_type
ORDER BY object_type;
PROMPT OBJECTS MISSING FROM LOCAL SCHEMA
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects@rem_schema
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects
ORDER BY object_type, object_name;
PROMPT EXTRANEOUS OBJECTS IN LOCAL SCHEMA
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects
WHERE object_type != 'DATABASE LINK'
OR object_name NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects@rem_schema
ORDER BY object_type, object_name;
PROMPT OBJECTS IN LOCAL SCHEMA THAT ARE NOT VALID
SELECT object_name, object_type, status
FROM user_objects
WHERE status != 'VALID'
ORDER BY object_name, object_type;
REM Table differences
REM =================
PROMPT TABLE COLUMNS MISSING FROM ONE SCHEMA
PROMPT (NOTE THAT THIS REPORT DOES NOT LIST DISCREPENCIES IN COLUMN ORDER)
SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
FROM user_tab_columns@rem_schema
WHERE table_name IN
SELECT table_name
FROM user_tables
MINUS
SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
FROM user_tab_columns
UNION ALL
SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
FROM user_tab_columns
WHERE table_name IN
SELECT table_name
FROM user_tables@rem_schema
MINUS
SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
FROM user_tab_columns@rem_schema
ORDER BY 1, 2;
COL schema FORMAT a15
COL nullable FORMAT a8
COL data_type FORMAT a9
COL data_length FORMAT 9999 HEADING LENGTH
COL data_precision FORMAT 9999 HEADING PRECISION
COL data_scale FORMAT 9999 HEADING SCALE
COL default_length FORMAT 9999 HEADING LENGTH_OF_DEFAULT_VALUE
PROMPT DATATYPE DISCREPENCIES FOR TABLE COLUMNS THAT EXIST IN BOTH SCHEMAS
SELECT table_name, column_name, 'Remote' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns@rem_schema
WHERE (table_name, column_name) IN
SELECT table_name, column_name
FROM user_tab_columns
MINUS
SELECT table_name, column_name, 'Remote' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns
UNION ALL
SELECT table_name, column_name, 'Local' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns
WHERE (table_name, column_name) IN
SELECT table_name, column_name
FROM user_tab_columns@rem_schema
MINUS
SELECT table_name, column_name, 'Local' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns@rem_schema
ORDER BY 1, 2, 3;
REM Index differences
REM =================
COL column_position FORMAT 999 HEADING ORDER
PROMPT INDEX DISCREPENCIES FOR INDEXES THAT EXIST IN BOTH SCHEMAS
SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
WHERE A.index_name IN
SELECT index_name
FROM user_indexes
AND B.index_name = A.index_name
AND B.table_name = A.table_name
MINUS
SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes A, user_ind_columns B
WHERE B.index_name = A.index_name
AND B.table_name = A.table_name
UNION ALL
SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes A, user_ind_columns B
WHERE A.index_name IN
SELECT index_name
FROM user_indexes@rem_schema
AND B.index_name = A.index_name
AND B.table_name = A.table_name
MINUS
SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
WHERE B.index_name = A.index_name
AND B.table_name = A.table_name
ORDER BY 1, 2, 6;
REM Constraint differences
REM ======================
PROMPT CONSTRAINT DISCREPENCIES FOR TABLES THAT EXIST IN BOTH SCHEMAS
SET FEEDBACK OFF
CREATE TABLE temp_schema_compare
database NUMBER(1),
object_name VARCHAR2(30),
object_text VARCHAR2(2000),
hash_value NUMBER
DECLARE
CURSOR c1 IS
SELECT constraint_name, search_condition
FROM user_constraints
WHERE search_condition IS NOT NULL;
CURSOR c2 IS
SELECT constraint_name, search_condition
FROM user_constraints@rem_schema
WHERE search_condition IS NOT NULL;
v_constraint_name VARCHAR2(30);
v_search_condition VARCHAR2(32767);
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_constraint_name, v_search_condition;
EXIT WHEN c1%NOTFOUND;
v_search_condition := SUBSTR (v_search_condition, 1, 2000);
INSERT INTO temp_schema_compare
database, object_name, object_text
VALUES
1, v_constraint_name, v_search_condition
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_constraint_name, v_search_condition;
EXIT WHEN c2%NOTFOUND;
v_search_condition := SUBSTR (v_search_condition, 1, 2000);
INSERT INTO temp_schema_compare
database, object_name, object_text
VALUES
2, v_constraint_name, v_search_condition
END LOOP;
CLOSE c2;
COMMIT;
END;
SET FEEDBACK 1
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Remote' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints@rem_schema A, temp_schema_compare B
WHERE A.table_name IN
SELECT table_name
FROM user_tables
AND B.database (+) = 2
AND B.object_name (+) = A.constraint_name
MINUS
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Remote' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints A, temp_schema_compare B
WHERE B.database (+) = 1
AND B.object_name (+) = A.constraint_name
UNION ALL
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Local' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints A, temp_schema_compare B
WHERE A.table_name IN
SELECT table_name
FROM user_tables@rem_schema
AND B.database (+) = 1
AND B.object_name (+) = A.constraint_name
MINUS
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Local' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints@rem_schema A, temp_schema_compare B
WHERE B.database (+) = 2
AND B.object_name (+) = A.constraint_name
ORDER BY 1, 4, 2;
REM Database link differences
REM =========================
PROMPT DATABASE LINK DISCREPENCIES
COL db_link FORMAT a40
SELECT db_link, 'Remote' schema, username, host
FROM user_db_links@rem_schema
MINUS
SELECT db_link, 'Remote' schema, username, host
FROM user_db_links
UNION ALL
SELECT db_link, 'Local' schema, username, host
FROM user_db_links
WHERE db_link NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT db_link, 'Local' schema, username, host
FROM user_db_links@rem_schema
ORDER BY 1, 2;
REM Sequence differences
REM ====================
PROMPT SEQUENCE DISCREPENCIES
SELECT sequence_name, 'Remote' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences@rem_schema
MINUS
SELECT sequence_name, 'Remote' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences
UNION ALL
SELECT sequence_name, 'Local' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences
MINUS
SELECT sequence_name, 'Local' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences@rem_schema
ORDER BY 1, 2;
REM Private synonym differences
REM ===========================
PROMPT PRIVATE SYNONYM DISCREPENCIES
SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
FROM user_synonyms@rem_schema
MINUS
SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
FROM user_synonyms
UNION ALL
SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
FROM user_synonyms
MINUS
SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
FROM user_synonyms@rem_schema
ORDER BY 1, 2;
REM PL/SQL differences
REM ==================
PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
PROMPT THAT EXIST IN BOTH SCHEMAS
SELECT name, type, COUNT (*) discrepencies
FROM
SELECT name, type, line, text
FROM user_source@rem_schema
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects
MINUS
SELECT name, type, line, text
FROM user_source
UNION ALL
SELECT name, type, line, text
FROM user_source
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects@rem_schema
MINUS
SELECT name, type, line, text
FROM user_source@rem_schema
GROUP BY name, type
ORDER BY name, type;
PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
PROMPT THAT EXIST IN BOTH SCHEMAS (CASE INSENSITIVE COMPARISON)
SELECT name, type, COUNT (*) discrepencies
FROM
SELECT name, type, line, UPPER (text)
FROM user_source@rem_schema
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects
MINUS
SELECT name, type, line, UPPER (text)
FROM user_source
UNION ALL
SELECT name, type, line, UPPER (text)
FROM user_source
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects@rem_schema
MINUS
SELECT name, type, line, UPPER (text)
FROM user_source@rem_schema
GROUP BY name, type
ORDER BY name, type;
REM Trigger differences
REM ===================
PROMPT TRIGGER DISCREPENCIES
SET FEEDBACK OFF
TRUNCATE TABLE temp_schema_compare;
DECLARE
CURSOR c1 IS
SELECT trigger_name, trigger_body
FROM user_triggers;
CURSOR c2 IS
SELECT trigger_name, trigger_body
FROM user_triggers@rem_schema;
v_trigger_name VARCHAR2(30);
v_trigger_body VARCHAR2(32767);
v_hash_value NUMBER;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_trigger_name, v_trigger_body;
EXIT WHEN c1%NOTFOUND;
v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
v_trigger_body := UPPER (v_trigger_body);
v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (1, v_trigger_name, v_hash_value);
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_trigger_name, v_trigger_body;
EXIT WHEN c2%NOTFOUND;
v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
v_trigger_body := UPPER (v_trigger_body);
v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (2, v_trigger_name, v_hash_value);
END LOOP;
CLOSE c2;
END;
SET FEEDBACK 1
SELECT A.trigger_name, 'Local' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 1
AND A.table_name IN
SELECT table_name
FROM user_tables@rem_schema
MINUS
SELECT A.trigger_name, 'Local' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 2
UNION ALL
SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 2
AND A.table_name IN
SELECT table_name
FROM user_tables
MINUS
SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 1
ORDER BY 1, 2, 5, 3;
REM View differences
REM ================
PROMPT VIEW DISCREPENCIES
SET FEEDBACK OFF
TRUNCATE TABLE temp_schema_compare;
DECLARE
CURSOR c1 IS
SELECT view_name, text
FROM user_views;
CURSOR c2 IS
SELECT view_name, text
FROM user_views@rem_schema;
v_view_name VARCHAR2(30);
v_text VARCHAR2(32767);
v_hash_value NUMBER;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_view_name, v_text;
EXIT WHEN c1%NOTFOUND;
v_text := REPLACE (v_text, ' ', NULL);
v_text := REPLACE (v_text, CHR(9), NULL);
v_text := REPLACE (v_text, CHR(10), NULL);
v_text := REPLACE (v_text, CHR(13), NULL);
v_text := UPPER (v_text);
v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (1, v_view_name, v_hash_value);
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_view_name, v_text;
EXIT WHEN c2%NOTFOUND;
v_text := REPLACE (v_text, ' ', NULL);
v_text := REPLACE (v_text, CHR(9), NULL);
v_text := REPLACE (v_text, CHR(10), NULL);
v_text := REPLACE (v_text, CHR(13), NULL);
v_text := UPPER (v_text);
v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (2, v_view_name, v_hash_value);
END LOOP;
CLOSE c2;
END;
SET FEEDBACK 1
SELECT A.view_name, 'Local' schema, B.hash_value
FROM user_views A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 1
AND A.view_name IN
SELECT view_name
FROM user_views@rem_schema
MINUS
SELECT A.view_name, 'Local' schema, B.hash_value
FROM user_views@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 2
UNION ALL
SELECT A.view_name, 'Remote' schema, B.hash_value
FROM user_views@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 2
AND A.view_name IN
SELECT view_name
FROM user_views
MINUS
SELECT A.view_name, 'Remote' schema, B.hash_value
FROM user_views A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 1
ORDER BY 1, 2;
REM Job queue differences
REM =====================
COL what FORMAT a30
COL interval FORMAT a30
PROMPT JOB QUEUE DISCREPENCIES
SELECT what, interval, 'Remote' schema
FROM user_jobs@rem_schema
MINUS
SELECT what, interval, 'Remote' schema
FROM user_jobs
UNION ALL
SELECT what, interval, 'Local' schema
FROM user_jobs
MINUS
SELECT what, interval, 'Local' schema
FROM user_jobs@rem_schema
ORDER BY 1, 2, 3;
REM Privilege differences
REM =====================
PROMPT OBJECT-LEVEL GRANT DISCREPENCIES
SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
FROM user_tab_privs@rem_schema
WHERE (owner, table_name) IN
SELECT owner, object_name
FROM all_objects
MINUS
SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
FROM user_tab_privs
UNION ALL
SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
FROM user_tab_privs
WHERE (owner, table_name) IN
SELECT owner, object_name
FROM all_objects@rem_schema
MINUS
SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
FROM user_tab_privs@rem_schema
ORDER BY 1, 2, 3;
PROMPT SYSTEM PRIVILEGE DISCREPENCIES
SELECT privilege, 'Remote' schema, admin_option
FROM user_sys_privs@rem_schema
MINUS
SELECT privilege, 'Remote' schema, admin_option
FROM user_sys_privs
UNION ALL
SELECT privilege, 'Local' schema, admin_option
FROM user_sys_privs
MINUS
SELECT privilege, 'Local' schema, admin_option
FROM user_sys_privs@rem_schema
ORDER BY 1, 2;
PROMPT ROLE PRIVILEGE DISCREPENCIES
SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
FROM user_role_privs@rem_schema
MINUS
SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
FROM user_role_privs
UNION ALL
SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
FROM user_role_privs
MINUS
SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
FROM user_role_privs@rem_schema
ORDER BY 1, 2;
SPOOL OFF
SET TERMOUT ON
PROMPT
PROMPT Report output written to &report
SET FEEDBACK OFF
DROP TABLE temp_schema_compare;
DROP DATABASE LINK rem_schema;
SET FEEDBACK 6
SET PAGESIZE 20
SET LINESIZE 80 -
How to install two oracle database on one system
i want to install two oracle databases on single system how it is possible
how i can manager oracle home and is this possible to install two different version of oracle in single home or single system forexample oracle 9 and oracle 8 .
A.RHi,
yes, u can have more databases on a single machine and they can be of different versions.
You have to use and initialize the correct ORACLE_HOME to create the DB of the version U use.
For ex, u have 2 homes:
C:\Oracle\Ora817 8i home and C:\Oracle\ora920 9i home
Normally, using OFA, imagine that You want create 2 db, TEST_8I for 8i home and TEST_9I for the 9i home, You shold have:
C:\Oracle\Admin\TEST_8I\<<OFA DIRS>> and C:\Oracle\Oradata\TEST_8I for 8i DB adn C:\Oracle\Admin\TEST_9I\<<OFA DIRS>> and C:\Oracle\Oradata\TEST_9I for the 9i version.
It is important, when You create the DB, that u use the executables of C:\Oracle\Ora817\bin to create 8i db and C:\Oracle\Ora920\bin for the 9i one.
Then U can use the 9i listener to manage both instances
Hope this helps
Max -
RE: Creation of two oracle database in Single ASM Disk group
IS it possible to create two oracle database in Single ASM Disk group. if it is possible how?.
GiriAll you have to do is to create a tablespace at the most minimumlevel and your db would become a client of the disk group. Other than that, you can migrate your db tothe disk group and it would be then start using the same disk group shared by another database for its use also.
HTH
Aman.... -
*Synchronize two oracle databases in single database*
Hi Friends,
Is it possible to synchronize two database in single database.
Actually the scenario is, there will be single instance database with dataguard config...So this database will be used from two different locations/places .. the distance is around 1000 Km. If the user not able to log from second location because of network problem ... then seconday server ie datagaurd will become primary for the second location.
Then both the databasses will work as PRIMARY database for the two different locations. Once the network issue resolve then we need to sync the database to single database ...
Is there any solution for synchonize the database ...or any tool for this one....
Thanks in advance
Anil PintoHi,
You are looking for a Bidirectional Replication.
Golden Gate Bidirectional Replication
http://vishaldesai.wordpress.com/2011/02/24/golden-gate-bidirectional-replication-oracle-to-oracle-example/
Oracle Streams
Oracle Bi-Directional Data Replication
http://www.databasejournal.com/features/oracle/article.php/3596971/Oracle-Bi-Directional-Data-Replication.htm
Regards,
Levi Pereira -
Best approach to synchronize data between two oracle database remotely
Hi All,
We have requirement to synchronize data between custom application database and EBS database. Thw two database is on different location connected by 128 kbps connection.
The synchronization will do the following task :
- Download customer table from EBS (I have checked there are only 2000 rows of it)
- Up load billing data to EBS auto invoice interface table
The question is :
What approach is the best way to do this synchronization task ? some that come into my mind :
- create database link and run stored procedure to do the batch update ?
- for Customer synchronization, is it a good idea to create Materialized view so that any update to EBS customer data will be updated, refreshed nightly
- or is ther any better approach ?
Thank you very much,
xtanto
Edited by: xtanto on Oct 18, 2008 3:30 PMMaybe try Streams?
-
Is it possible to install two Oracle Databases on one host?
I got installed Oracle 10.1.0.3.0 on my host (OS: Linux CentOS 5 64-bit) and there is need to install another one on the same host. Additional database is supposed to be started up and shutted down once per a day for a couple of hours.
Is this configuration possible?
Thanks in advanceIt is possible to have N database instances running on one box. They can also be running on the same or different $ORACLE_HOMEs.
If you are using the same ORACLE_HOME for all your databases, be sure to change your ORACLE_SID to point to the correct SID.
DBCA can help you create different databases from the current ORACLE_HOME -
How to make two standalone oracle databases into master/slave relationship
i'm not talking about RAC...
is there any way to make two oracle databases into master/slave relationship? one is hot one is cold, when the hot one is down, the cold one automatically picks up? and of course two databases are in sync all the time.
any experience?DataGuard is an enterprise edition feature.
You could roll your own standby database by cloning the production system to a backup server and writing scripts that copy the archived log files from the primary to the standby and that apply the archived logs on the standby. Of course, the transactions that had been applied to the primary that were still in the primary's redo logs would be lost if the primary were to fail. DataGuard provides options to keep the standby more closely in sync with the standby to reduce or eliminate that risk, which is one of the reasons that it's an enterprise edition feature.
If you're on Windows, Oracle FailSafe may also be something to look at.
Justin -
Integration between two oracle servers 8i and 9i
With the name of ALLAH,
Dear Friends,
I want to connect / share the data of two oracle databases installed on different LANs and static IPs. i.e
202.125.155.20 and 202.125.152.30
But the problem is that I am unable to connect both databases by connection string in tnsnames.ora
I want to share the data by writting event based trigger between both of the databases.
Note: One database is 8i Enterprise and other is 9i Enterprise
Please tell me in detail that what should I do?
I would be thankful to you.
Faisal,
[email protected],
9203335146832hi Faisal Rafique
i have working in same situation.
u will make 2 entries in tnsname for 2 server.
like
oracle8I =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 202.125.155.20 )(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = oracle8i)--enter u r service name of 8i
another entries for 9i database
oracle9I =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 202.125.155.30 )(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = oracle9i)--enter u r service name of 9i
thanks
kuljeet pal singh -
Hi All,
We have two oracle databases and I would like to compare the structure changes in tables, views, procedures, functions etc.
I found a very good tool (i.e. DBDiff for Oracle) but its Demo and only doing first five structure changes.
Does anyone know any other tool or aware of some scripts which solves the above purpose.
ThanksCreate a database link between the two databases. Then run:
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE from DBA_OBJECTS
minus
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE from DBA_OBJECTS@the_db_link_u_created
That will show you the objects that are on the local database that are not on the db_link database. Just reverse the select@ to show results the other way. -
Reg: How to automate updation of tables between two oracle DB Instances
Hi All,
I have a requirement to auto update the tables between two oracle database instances. What are the possible solutions to handle this kind of situations.
Please help me out in identifying the correct solution.
Thanks in advance :)The possible solutions are outlined in the distributed database documentation
They are
a) trigger (6.0 and higher)
b) advanced replication. Creates triggers on every table. Requires every table to have a primary key (8.0 and higher)
c) Streams (Uses logminer, has no impact on table. Requires every table to have a primary key, or supplemental logging will be used. (9.0 and higher)
d) Change Data Capture: superset of Streams (9i and higher).
If you don't require realtime updates you don't need c or d. b is difficult to manage. Using a) the source db can potentially have to wait for the target db to complete it's transaction.
Sybrand Bakker
Senior Oracle DBA -
Can I install two versions of SOA suite using same Oracle database
Condition:
I installed Weblogic server(10.3.5) and SOA Suite(11.1.1.5), and
I used RCU 11.1.1.5 to create the schemas(Oracle DB 11g-111170) for it.
Plan:
Now I plan to install another Weblogic server(10.3.6) and SOA Suite (11.1.1.6)
and I will used RCU 11.1.1.6 to create the schemas for it.
Question:
Can I use same database(Oracle DB 11g-111170) for the two versions of SOA Suite? that is
Can I Run the RCU 11.1.1.6 to create the schemas for SOA Suite (11.1.1.6) on the oracle database server I already used for SOA Suite 11.1.1.5?
If I can use same database for the two versions of SOA Suite, how can I resolve schame name conflict?Hi
1. YES. You can absolutely use SAME DB to have multiple Versions of SOA Schemas.
2. Any SOA/BPM will need basically 4/5 schemas like SOAINFRA, MDS, ORABAM, ORASDPM etc. based on what you choose. And each of these Schemas can be Prefixed. Default prefix is like DEV, so schemas are like DEV_SOAINFRA, DEV_MDS etc
3. Very Simple. When you Run RCU 11.6 and give the same old db details, in next screen it will automatically show the new Prefix for the schemas it will create. If DEV is used, it will show DEV1 like that. So just choose a Different Prefix and you are good to go.
I have the same thing on my side. Single Database. Multiple RCU for SOA 11.5 and SOA 11.6 with different Prefixes:
SOA 11.5 -> DEV115_SOAINFRA, DEV115_MDS, DEV115_ORABAM etc
SOA 11.6 -> DEV116_SOAINFRA, DEV116_MDS, DEV116_ORABAM etc
I Used the Prefixes like DEV115, DEV116 so that I know exactly which version of RCU schema they refer to.
For QC, UAT, PROD we used prefixes like QC_*, UAT_*, PROD_* etc.
NOTE: When you drop the schemas for some reason, make sure to give the appropriate prefixes so that only they are dropped and not others.
Thanks
Ravi Jegga -
How to connect two different oracle databases
Hi All,
I have a special scenario like the following:
I have an oracle Database 10g, it has to get some data from the Oracle Apps Database (the API is defined in the Views and Packages of the 10g database)
Is it possible for me to make a connection with the 10g database to the Apps database.
Do I have to use any engines like JDBC for the connection between the two databases
The issue here is because of security Issue, I cant create a database schema in the Apps database
What can be the solution for this issue..
Many thanks in advance
and best regards.......You might be able to use a database link to connect from one db to another.
-
Synchronize two Oracle 9i Databases
Hi
We are using Oracle 9i Database for our ASP.NET 2.0 web application. We are using ODP.NET to connect to the Oracle database.
We are moving our Database server to a different location. We restored the Oracle DB on the new Test server few weeks back and tested.
Now we want to keep both the databases in sync and make the application point to the new DB server.
How to keep the new server up to date?
Thanks
AshokDataGuard, which is available in 9i, is generally used when you have an active-passive configuration (i.e. one or more active nodes and one or more nodes that kick in when the primaries fail)
If you can handle a 2 minute lag, I would strongly consider going with Streams-based replication. You'll need some pretty good bandwidth between the two nodes, but that's the case with any replication solution.
You might also consider a RAC cluster in each data center using DataGuard, such that only one data center is "active" at a time. The RAC cluster gives you the benefits load balancing and DataGuard gives you the benefits of disaster recovery. On first blush, though, Streams seems like an architecturally simpler approach.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
Maybe you are looking for
-
Can two user accounts on the same mac share the Address Book
My wife and I have separate user accounts on the same Mac but we would like to share the same Address Book. I have searched the forums to no avail. It seems silly to use .mac to do so, and a needless expense when the information is already on the sam
-
How to disable process design time attributes WS RM
Hi, I recently configured a NW BPM test scenario which works as expected. When I tried to test/call BPM Process using SOAP UI/Webservice client I am unable to send a message to SAP BPM process due to WS RM & WS A are activated at design time. While
-
What is performance optimizaion in bods ?? where we use ??
what is performance optimizaion in bods ?? where we use ??
-
I am trying to create a PDF from my layout page. I get the message that I have to download a post script driver. I have gone to the Adobe download site and attempted to download the driver but I get the error message Failure is AddPrinter (generic po
-
We are in a process of selecting an ETL tool for our database. What criteria we should consider. We have several relation data sources (Oracle, sql server, mySql), flat files, SAP and other interfcases. If any one have done this type of evaluation, a