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?.
Giri
All 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....
Similar Messages
-
*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 -
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 -
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 -
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 -
ASM disk group and multiple databases
Hi,
I want to create a second database on my RAC cluster. Can the ASM diskgroups I have defined for use with the first database , service the second database or do I have to create another set of ASM diskgroups for the second dataabase?
Thanks,
AnneASM does not have any data files. ASM will store data files required for the RDBMS instance only.
After you have installed the Oracle binaries, (best practice is to have two Oracle homes one for ASM and another for RDBMS), you can create the ASM instances using DBCA and during this process or later can create ASM diskgroups.
( e,g disk1G, disk2G,disk3G,disk4G) using the above four you can create ASM DISK GROUPS.. -
Standby Database ASM Disk Groups
Hi Guys
I wonder if anyone can tell me - does a standby database have to have an identical configuration for its ASM Disk Groups?
My production database has two disk groups, one for data and the other for temp. Can I get away with a single diskgroup in my standby database or would I need two of the same name as the production database?
Cheers
SimonHi Saml
I have been busy googling at the same time as discussing this and it would appear that it will use the db_file_name_convert:
http://asanga-pradeep.blogspot.com.au/2012/07/11gr2-standalone-data-guard-with-asm.html
The link above shows the output of someones RMAN session where the OMF names are changed automatically. Problem is that some people are recommending that the parameter not be used, so now I am really confused!
I think I will try the parameter, if it doesnt work or the duplicate fails I will drop the temp table space in production and then do the duplicate, then recreate the temp tablespace. I can do that because there will be no one on the system on Sunday when I do it.
Thanks again for your help - I will let you know how it goes.
Ragards
Simon -
Hi,
Having a multiple Oracle ASM disk group is more beneficial for Oracle database? if no why? if yes why?
Any metalink note if have.
thanksAny metalink note do you refer?What is your database version?
Please see these docs.
11g ASM New Feature [ID 429098.1]
ASM 11g New Features - How ASM Disk Resync Works. [ID 466326.1]
Thanks,
Hussein -
Perfromance impact if mulitple database share the same disk group.
Hi All,
I need help in understanding what would be the performance impact if multiple databases share the same ASM disk group.
Is there any documentation that explains the impact on performance if there is any in doing so.
Your help is very much appreciated.
Thanks,
Ravi.I need help in understanding what would be the performance impact if multiple databases share the same ASM disk group.application performance could be impacted; or not depending upon total disk I/O activity
-
Reinstalling Oracle 11gR2 RAC Grid Problem - ASM Disks Group
Folks,
Hello.
I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer.
I have been installing Grid Infrastructure using runInstaller in the first VM rac1 from step 1 to step 9 of 10.
On the step 9 of 10 in the Wizard, accidentally, I touch the Mouse, and the Wizard is gone.
The directory for installing Grid in the 2 VMs is the same: /u01
In order to make sure everything is correct, I delete entire directory /u01 in the 2 VMs and install Grid in rac1 again.
I have understood it's not the right way to delete /u01. The right way is to follow the tutorial
http://docs.oracle.com/cd/E11882_01/install.112/e22489/rem_orcl.htm#CBHEFHAC
But I have deleted /u01 and need to fix one by one. I install Grid again and get the error message on step 5 of 9 as follows:
[INS - 30516] Please specify unique disk groups.
[INS-3050] Empty ASM disk group.
Cause - Installer has detected the disk group name provided already exists on the system.
Action - Specify different disk group.
In Wizard, the previous Disk Group name is "DATA" and its Candidate disks (5 ASMDISKs) are gone. I try to use a different name "DATA2", but no ASMDISKs come up under "Candidate disks". For "ALL Disks", all ASMDISKs cannot be selected.
I want to use the same ASM disk group "DATA" and don't want to create a new disk group.
My question is:
How to have the previous ASM disks and its group "DATA" come up under "Candidate Disks" so that can use it again ?
Thanks.Hi, in case this helps anyone else. I got this INS-30516 error too was stumped for little while. I have 2 x 2-node RAC which are hitting same SAN. The first-built RAC has a DATA diskgroup. When went to build second RAC on new ASM disk new DIskgroup (but same diskgroup name DATA) got INS-30516 about diskgroup name already in use etc. Finally figured out all that was required was to restrict diskstring using button in installer to only retrieve the LUNS for this RAC (this was quick and dirty - all LUNS for both RAC being presented to both RAC). Once diskstring only searched for the LUNS required for this RAC only, e.g.
ORCL:DATA_P* (for DATA_PD and FRA_PD)
the error went away.
I also have DATA_DR and FRA_DR presenting to both RAC. Apparently it scans the header and if it finds a diskgroup name that is already in use based on the diskstring scan it will not allow reuse of the diskgroup name since it has no way of knowing that the other ASM disks are for a different RAC.
HTH -
Upgradation of Primary (RAC) two node database and single node standby DB
We have our primary setup in Oracle RAC in 10g R2 (10.2.0.1.0) in HP UX 11i 64bit (PA RISC). It is a two node RAC.
And we have a single node standby database (DR).
Both the primary and standby database are existing in 10.2.0.1.0
We need to upgrade the primary and standby database from 10.2.0.1.0 to 10.2.0.4.0
Am planning to go through the DBUA method for upgrading the database.
I like to know is there any special cases for upgrading both the primary and standby database.
since as i mentioned i will upgrade the database through dbua method, and if i upgrade my standby database as same as primary,
will it forcefully open the database, because while we upgrade the database through dbua it will open the database at the end of installation.
Is it possible to upgrade the standby database with DBUA method even when my standby database is in Mount state.
I will be helpfull if anyone has done this earlier, are there any know issues and is there any good document which i can refer.
with regards
A.Aravindhi,
thanks for your reply, and i was following the document.
I like to know that is it mandatory to create a new Oracle Home for upgrading from 10.2.0.1.0 to 10.2.0.4.0
or i can proceed the installation of software in the same oracle home.
I will list out my action plan, please correct me if am wrong,
In Primary RAC,
a) Shutdown the database
b) Shutdown the asm instance
c) Stop the nodeapps services
d) Stop the cluster ready services.
e) Stop the enterprise manager
f) Stop the isqlplus
In Standby single node database,
1)Cancel the managed Recovery process
2) shutdown the database
3) Shutdown the asm instance.
PATCHING Process
g) Apply the oracle clusterware patch 10.2.0.4.0 in the same old existing ORA_CRS_HOME
h) Apply the oracle database software patch 10.2.0.4.0 in the same old existing ORACLE_HOME
Note: In my case both the ORACLE_HOME and ASM_HOME are in the same location.
i) Execute dbua to update the database in the primary database.
j) Apply the 10.2.0.4.0 patch in standby database ORACLE_HOME where as ORACLE_HOME and ASM_HOME are in the same location
k) Copy the recently generated archive logs from primary to standby manually and apply in standby database.
l) Mount the database in standby
m) Start the Managed recovery process.
with regards
A.Aravind -
How to connect more than one oracle databases in single form?
Hi,
I have installed Oracle database in three different servers with different users, but the table's structure are same in all three different database users.
Now in one D2K form i want to connect and access, all three different database users at a time.
If anybody know answer for this please replay.
My mail Id: [email protected]
Regards
MahaveerYou can access other databases/schemas by means of the built-in-package EXEC_SQL. See online help in Forms Builder, especially EXEC_SQL.Open_Connection, EXEC_SQL.Open_Cursor, EXEC_SQL.Fetch_Rows, ...
If you want to base your blocks on several database connections at the same time, you should write your own on-select, on-fetch, on-lock, ... triggers, I suppose.
Marc -
Cannot create ASM disk groups in DBCA - Oracle 11gR1, Windows 32bit
Good afternoon,
Using 11gR1 on Windows XP, I need help installing a database (single instance) using ASM, I am not able to select disks to be stamped for use by ASM. I have done the following steps:
1. Installed the Oracle 11gR1 software (no database created - just the software)
2. Connected nine (9) SCSI hard drives to the system
3. Created a primary partition on each hard drive, formatted the partition but did *not* assign a drive letter
4. Created a listener service (working properly - checked with lsnrctl status)
5. Started DBCA to create a single database instance using ASMIn DBCA I performed the following:
a. at the welcome screen, click Next
b. at "Step 1 of 16", click Next (accepting the default "Create a Database")
c. at "Step 2 of 16", click Next (accepting the default "General Purpose or Transaction Processing)
d. at "Step 3 of 16", "Global Database Name" set to "dbca", "SID" set to "dbca", click Next
e. at "Step 4 of 16", click Next (accepting the defaults)
f. at "Step 5 of 16", click "Use same administrative passwords for all accounts" and entered password, click Next
g. at "Step 6 of 16", click "Automatic Storage Management (ASM)", click Next
Everything seems just fine until I reach the following step
h. at "Step 7 of 16", click "Create New"
- The Create Disk Group window pops up (there is nothing shown in the "Select Member Disk Area")
- set the "Disk Group Name" to "DATAGROUP"
- click on "Show All" (no devices shown after clicking)
- click on "Stamp Disks..." this causes the "asmtool operation" window to pop up
- click on "Add or change label", click on Next
- the "Select Disks" step appears. There are 11 hard drives listed but NONE of them
can be selected - all I can do here is click on Cancel*The question:* Why aren't the drives selectable and what do I need to do to make them selectable ?
Thank you very much for your help,
John.>
The question: Why aren't the drives selectable and what do I need to do to make them selectable ?
>
To answer my own question (now that I've figured it out), the reason is because the partition should not be formatted.
When Windows displays the "New Partition Wizard", it is important to:
1. not assign a drive letter
2. and select "Do not format this partition"
This will cause Windows to mount the volume thus making it accessible to Oracle.
Hopefully this will help someone not fall in this trap as I did,
John. -
Installing Oracle 11gR2 RAC Problem: ASM disks
Folks,
Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
At the first time, I create VM rac1. While its OS Oracle Linux 5.6 is booting, initializing ASMLib Driver OK. I create 5 ASM disks successfully using the command:
[root@rac1 /]# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdb1
Output: Marking disk "ASMDISK1" as an ASM disk: OK
Because the hard disk space of rac1 is not enough to install Database, I create VM rac1 again with bigger hard disk space (30GB). I do everything the same with that at the first time. But this time, While OS Oracle Linux 5.6 is booting, initializing ASMLib Driver failed. I create 5 ASM disks using the same command:
[root@rac1 /]# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdb1
Output: Marking disk "ASMDISK1" as an ASM disk: failed
But when I use the command:
[root@rac1 /]# /etc/init.d/oracleasm listdisks
Output: ASMDISK1 ASMDISK2 ASMDISK3 ASMDISK4 ASMDISK5
My questions are:
First, can the 5 disks "ASMDISK1 ASMDISK2 ASMDISK3 ASMDISK4 ASMDISK5" be used correctly in spite of Marking disk "ASMDISK1(2 3 4 5)" as an ASM disk failed ?
Second, how to fix OS Oracle Linux 5.6 so that initializing ASMLib Driver OK while booting ?
Thanks.Folks,
Hello. The issue is solved by myself. Thanks.
Maybe you are looking for
-
SQL Conectivity error (1418) on SQL Mirroring in SQL Server_2014 Enterprises
I perform this subjected task/activity in DOMAIN environment with Multiple VPN. No matter what I try, I constantly run into a 1418 error, I've check all my tcp/ip configs both in sql, and the server 2012 os, on both vms/physical machine. I've enable
-
Ipad can't store username password for websites
I'm using an iPad Wifi with 3.2.1 and I am not the only one that is having a problem with Safari storing username and password for websites that need credentials. I cleared 'cookies', 'history' and 'cache' but that doesn't help. The desired websites
-
BHOLD FIM Integration Fails on Database Configuration
Gentlemen, I hope you are familiar with BHOLD FIM Integration because i'm having a headache trying to install it. FIM Service installed successful and so BHOLD Core. However, when i tried to install BHOLD FIM Integration and logged the error and can
-
Mac Mini OS 10.5.8 will not install .pkg or .mpkg files
Reciently my Mac Mini has been prompting me to "choose an application" when I try to install .pkg or .mpkg files. This is preventing me from installing any new software on my computer. I've tried to repair permissions and that didn't help. I also tri
-
Rendering MP4 with AME from After Effects is always single-core?
When I render MP4 from After Effects CC 2014.2 (by AME) then rendering always is slow and only single-core, despite that in AE prefs Multiprocessor rendering is set. Why?