How to import schema into logical standby database
i had created a new schema(A)in different database and exported the schema into a dmp file using export utility
from the exported dmp file i want to import that schema(A) into logical standby database using import utility
iam importing as system user .
i am getting the following error
IMP-00003: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
can some one help what was going wrong.
thank you in advance.
kalyan
Hi kalyan,
May u plz let us know which import command you are using? kinldy check that your system user has import/export privileges?
Thanks
Hassan Khan
Similar Messages
-
How to exclude tablespace in logical standby database
Dear all,
In which way does the creation procedure of a logical standby database differ than the standard ORA9.2 procedure (http://www.oracle.com/pls/db92/db92.to_pdf?pathname=server.920%2Fa96653.pdf&remark=docindex) if I want to exclude a tablespace in my standby database?
Excluding tablespace in physical standby database is impossible.
Thanks in advance.The goal of a stand by database is to become a clone fed online with transactions coming from the active database. If the cloned database in a physical dataguard configuration diverges from the active database it is useless, as transaction control takes place at a lower level (physical addresses are involved).
~ Madrid -
How to import mp3 into Logic 7.2.1 ?
How to import mp3 files into Logic 7.2.1, without converting the file?
I have tried to make an mp3 with logic 7.2.1 and then improt it into logic again, and it still converts the **** file.
Help needed here.
I thought importing mp3 files in Logic 7.2.1. without converting, was one of the new features???????Logic imports mp4's (ACC and Apple Lossless Files) directly, without the need to convert to AIFF.
But some Mp3's will still need to be converted. It's all in the manuals... page 29 of the "what's New In Logic 7" PDF, as well as here:
http://manuals.info.apple.com/en/LogicPro_7.2_lbnz.pdf
The file size remains the same though, so I'm not sure I understand what the issue is... -
Prerequisite of Logical standby database ????
Hi,
We have Oracle 10g database with two physical standby databases on windows 2003 server 64 bit. we was thinking of shifting physical standby database into logical standby database.
We also look at the oracle documentation, as the link below. As we also found tables without unique logical identifier in the primary database.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#i76646
1 SELECT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_NOT_UNIQUE
2 WHERE (OWNER, TABLE_NAME) NOT IN
3 (SELECT DISTINCT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED)
4* AND BAD_COLUMN='Y'
SQL> /
OWNER TABLE_NAME
TSMSYS SRS$
ICONNECT SYS_EXPORT_SCHEMA_01
KBC SYSTEM
KBC PLAN_TABLE
KBC AUDIT_SYSTEM
KBC SYS_EXPORT_SCHEMA_01
KASB_FIN PLAN_TABLE
ICONNECT PLAN_TABLE
UMAS PLAN_TABLE
The question is after we have found the tables without unique logical identifier in the primary database,
*1. Step 1: What to do with these tables. How to add unique logical identifier for theses table in the primary database.*
*2. Step 2: Add a disabled primary-key RELY constraint.* , Do we have to enable rely constraint to all tables in all schemas ???
Thanks in advanced.1. Step 1: What to do with these tables. How to add unique logical identifier for theses table in the primary database.add a primary key on those tables
2. Step 2: Add a disabled primary-key RELY constraint. , Do we have to enable rely constraint to all tables in all schemas ???Document says this is for the ones returned from the query. If you are sure that uniqueness is controlled by your application on thise tables than you can add this type of constraint.
As you see most of them are plan tables for individual users. if you dont need tje, you can skip transactions for those objects by DBMS_LOGSTDBY.SKIP
hope it helps
Coskan Gundogar
http://coskan.wordpress.com -
Additional read-write schema in logical standby
Hi,
We have successfully configured logical standby for a production database on oracle 11.1.0.7. Now we have the following requirements:
1) Add a new/ additional schema to logical standby database which can support read write (dml/ddl)operations.
2) Turn off the sync for one particular table in the standby (prod) schema and make it read write.
Appreciate any guidelines in this regard.
Thanks,
Venkat
Edited by: 825766 on Jun 23, 2011 1:20 PM
Edited by: 825766 on Jun 23, 2011 1:44 PMThank you.
I was able to make a table read-write based on following extract from oracle documentation.
SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
Database altered.
SQL> EXECUTE DBMS_LOGSTDBY.SKIP('SCHEMA_DDL','MYSCHEMA','MYTABLES%');
PL/SQL procedure successfully completed.
SQL> EXECUTE DBMS_LOGSTDBY.SKIP('DML','MYSCHEMA','MYTABLES%');
PL/SQL procedure successfully completed.
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;
Database altered.
The example then queries the DBA_LOGSTDBY_PARAMETERS view to verify the logical standby database is updated. Verification can take a while so you might need to repeat the query until no rows are returned, as shown in the following example:
SQL> SELECT VALUE FROM DBA_LOGSTDBY_PARAMETERS WHERE NAME = 'GUARD_STANDBY';
VALUE
Ready
select guard_status from v$database;
Finally, the example sets the database guard to allow updates to the tables.
SQL> ALTER DATABASE GUARD STANDBY;
Database altered.
select guard_status from v$database; -
Creating a new schema in a Logical Standby Database
Hi All,
I am experimenting with logical standby databases for the purpose of reporting, and have not been able to create a new schema in the logical standby database - one of the key features of logical standbys.
I have setup primary and logical standby databases, and they seem to be running just fine - changes are moved from the primary to the standby and queries on the standby seem to run ok.
However, If I try to create a new schema on the logical standby, that does not exist on the primary, I get "ORA-01031: insufficient privileges" errors when I try to create new objects.
Show below are the steps I have taken to create the new schema on the logical standby. Any help would be greatly appreciated.
SYS@UATDR> connect / as sysdba
Connected.
SYS@UATDR>
SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
2 from v$database
3 /
NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
SYS@UATDR>
SYS@UATDR> create tablespace ts_new
2 /
Tablespace created.
SYS@UATDR>
SYS@UATDR> create user new
2 identified by new
3 default tablespace ts_new
4 temporary tablespace temp
5 quota unlimited on ts_new
6 /
User created.
SYS@UATDR>
SYS@UATDR> grant connect, resource to new
2 /
Grant succeeded.
SYS@UATDR> grant unlimited tablespace, create table, create any table to new
2 /
Grant succeeded.
SYS@UATDR>
SYS@UATDR> -- show privs given to new
SYS@UATDR> select * from dba_sys_privs where grantee='NEW'
2 /
GRANTEE PRIVILEGE ADM
NEW CREATE ANY TABLE NO
NEW CREATE TABLE NO
NEW UNLIMITED TABLESPACE NO
SYS@UATDR>
SYS@UATDR> -- create objects in schema
SYS@UATDR> connect new/new
Connected.
NEW@UATDR>
NEW@UATDR> -- prove ability to create tables
NEW@UATDR> create table new
2 (col1 number not null)
3 tablespace ts_new
4 /
create table new
ERROR at line 1:
ORA-01031: insufficient privileges
NEW@UATDR>
NEW@UATDR>HI Daniel,
I appreciate your quick response.
My choice of name may not have been ideal, however changing new to another name - like gav - does not solve the problem.
SYS@UATDR> connect / as sysdba
Connected.
SYS@UATDR>
SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
2 from v$database
3 /
NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
SYS@UATDR>
SYS@UATDR> create tablespace ts_gav
2 /
Tablespace created.
SYS@UATDR>
SYS@UATDR> create user gav
2 identified by gav
3 default tablespace ts_gav
4 temporary tablespace temp
5 quota unlimited on ts_gav
6 /
User created.
SYS@UATDR>
SYS@UATDR> grant connect, resource to gav
2 /
Grant succeeded.
SYS@UATDR> grant unlimited tablespace, create table, create any table to gav
2 /
Grant succeeded.
SYS@UATDR>
SYS@UATDR> -- show privs given to gav
SYS@UATDR> select * from dba_sys_privs where grantee='GAV'
2 /
GRANTEE PRIVILEGE ADM
GAV CREATE TABLE NO
GAV CREATE ANY TABLE NO
GAV UNLIMITED TABLESPACE NO
SYS@UATDR>
SYS@UATDR> -- create objects in schema
SYS@UATDR> connect gav/gav
Connected.
GAV@UATDR>
GAV@UATDR> -- prove ability to create tables
GAV@UATDR> create table gav
2 (col1 number not null)
3 tablespace ts_gav
4 /
create table gav
ERROR at line 1:
ORA-01031: insufficient privileges
GAV@UATDR> -
How to delete the foreign archivelogs in a Logical Standby database
How do I remove the foreign archive logs that are being sent to my logical standby database. I have files in the FRA of ASM going back weeks ago. I thought RMAN would delete them.
I am doing hot backups of the databases to FRA for both databases. Using ASM, FRA, in a Data Guard environment.
I am not backing up anything to tape yet.
The ASM FRA foreign_archivelog directory on the logical standby FRA keeps growing and nothing is get deleted when
I run the following command every day.
delete expired backup;
delete noprompt force obsolete;
Primary database RMAN settings (Not all of them)
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE DB_UNIQUE_NAME 'WMRTPRD' CONNECT IDENTIFIER 'WMRTPRD_CWY';
CONFIGURE DB_UNIQUE_NAME 'WMRTPRD2' CONNECT IDENTIFIER 'WMRTPRD2_CWY';
CONFIGURE DB_UNIQUE_NAME 'WMRTPRD3' CONNECT IDENTIFIER 'WMRTPRD3_DG';
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
Logical standby database RMAN setting (not all of them)
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
How do I cleanup/delete the old ASM foreign_archivelog files?OK, the default is TRUE which is what it is now
from DBA_LOGSTDBY_PARAMETERS
LOG_AUTO_DELETE TRUE SYSTEM YES
I am not talking about deleting the Archive logs files for the Logical database that it is creating, but the Standby archive log files being sent to the Logical Database after they have been applied.
They are in the alert log as follows under RFS LogMiner: Registered logfile
RFS[1]: Selected log 4 for thread 1 sequence 159 dbid -86802306 branch 763744382
Thu Jan 12 15:44:57 2012
*RFS LogMiner: Registered logfile [+FRA/wmrtprd2/foreign_archivelog/wmrtprd/2012_01_12/thread_1_seq_158.322.772386297] to LogM*
iner session id [1]
Thu Jan 12 15:44:58 2012
LOGMINER: Alternate logfile found. Transition to mining archived logfile for session 1 thread 1 sequence 158, +FRA/wmrtprd2/
foreign_archivelog/wmrtprd/2012_01_12/thread_1_seq_158.322.772386297
LOGMINER: End mining logfile for session 1 thread 1 sequence 158, +FRA/wmrtprd2/foreign_archivelog/wmrtprd/2012_01_12/threa
d_1_seq_158.322.772386297
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 159, +DG1/wmrtprd2/onlinelog/group_4.284.771760923 -
How to remove logical standby database configuration cleanly
Hello,
We are on RHL with 11.2.0.3 DB version. Due to various unknown reasons we would like to recreate logical standby database and for that purpose I would like to cleanly remove/uninstall/drop LOGICAL STANDBY DATABASE from the DATA GUARD configuration we have.
The DG setup already has 1 PHYSICAL STANDBY DATABASE which is working fine. PRIM,PHYSICAL, and LOGICAL all are on different HOSTS. Could you please guide or suggest us exact MOS Doc id regarding this? I have found one MOS Doc id which is close enough but its steps include removing dg configuration completely which I don't want. Only Logical Standby database needs to be remove cleanly so that it can be installed again properly.
We are using GRID CONTROL and DATA GUARD BROKER.
Bundle of thanks in advance.
Best RegardsHello;
I would review this Oracle note:
How to remove a Data Guard Configuration from Primary Database (Doc ID 733794.1)
Best Regards
mseberg -
How to monitor SQL Apply for 10.2.0.3 logical standby database
We have a logical standby database setup for reporting purposes. Users want to monitor whether sql apply is working or failed closely as it has reporting repercations.
In case of 9i databases , there was "Data Not Applied (logs)" metric which we used for alerting and paging, in case a backlog of more than 5 log files developed.
With 10.2.0.3 onwards, the metric no more exists.
I would like to learn from other, how to monitor the setup, so that if the backlog in logs shipping or applying develops, we get page.
Regards.regather the statistics on the table with method_opt=>for all columns or for all indexed columns or whatever size 1
The 'size 1' directive will remove the histogram statistics.
Sorry, didn't read ur post in a hurry. Below article (http://www.freelists.org/post/oracle-l/Any-quick-way-to-remove-histograms,13) removes histogram without re-analyzing the table. Hope that helps!!!
On 3/16/07, Wolfgang Breitling <breitliw@xxxxxxxxxxxxx> wrote:
I also did a quick check and just using
exec
dbms_stats.set_column_stats(user,'table_name',colname=>'column_name',d
istcnt=>
<num_distinct>);
will remove the histogram without removing the low_value andhigh_value.
At 01:40 PM 3/16/2007, Alberto Dell'Era wrote:
On 3/16/07, Allen, Brandon <Brandon.Allen@xxxxxxxxxxx> wrote:
Is there any faster way to remove histograms other than
re-analyzing
>
the table? I want to keep the existing table, index & columnstats,
>
but with only 1 bucket (i.e. no histograms).You might try the attached script, that reads the stats using
dbms_stats.get_column_stats and re-sets them, minus the histogram,
using dbms_stats.set_column_stats.
I haven't fully tested it - it's only 10 minutes old, even if Ihave
slightly modified for you another script I've used for quite some
time - and the spool on 10.2.0.3 seems to confirmthat the histogram
is, indeed, removed, while all the other statistics are preserved.I
have also reset density to 1/num_distinct, that is the value youget
if no histogram is collected.regards,
naren
Edited by: fuzzydba on Oct 25, 2010 10:52 AM -
How to run automated maintenance task on a logical standby database ?
Hi
I realize that i do not see any job runs for automated maintenance tasks on my logical standby database.
Which are the conditions that must be fulfilled for automated maintenance tasks to run?
Thanks
ChristophHi,
In an Oracle Data Guard environment, the Scheduler includes additional support for two database roles: primary and logical standby. You can configure a job to run only when the database is in the primary role or only when the database is in the logical standby role. To do so, you set the database_role attribute. This example explains how to enable a job to run in both database roles. The method used is to create two copies of the job and assign a different database_role attribute to each.
By default, a job runs when the database is in the role that it was in when the job was created. You can run the same job in both roles using the following steps:
Copy the job
Enable the new job
Change the database_role attribute of the new job to the required role
The example starts by creating a job called primary_job on the primary database. It then makes a copy of this job and sets its database_role attribute to 'LOGICAL STANDBY'. If the primary database then becomes a logical standby, the job continues to run according to its schedule.
More Information please cheek below link:
Examples of Using the Scheduler
Thank you -
How to convert logical standby database to Physical Standby Database
Hi,
Does anyone know how to convert logical standby database(10.2.0.3) to Physical Standby Database(10.2.0.3)? Is this possible? If so,please give me steps for it.
Thanks.
Regards,
RJ.I don't believe this to be possible. One of the steps invloved in the creation of a logical standby is the following:
ALTER DATABASE OPEN RESETLOGS;
This makes the logical standby a different incarnation of the db from the primary.
A physical standby is a binary copy of a primary db, a logical standby is a completely seperate db that just happens to get sql statements applied to it that are generated from a primary db, but is open read/write.
One avenue, though would be if you had flashback database enabled and you flashed back all the way to when the db was a physical standby and then rolled forward with the archived redo logs.
It's somewhat unlikely you are in that situation, but that is a possibility.
Indeed the 11g snapshot standby does this sort of thing:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/manage_ps.htm#sthref740
jason.
http://jarneil.wordpress.com -
How to apply the changes in logical standby database
Hi,
I am new to Dataguard. I am now using 10.2.0.3 and followed the steps from Oracle Data Guard Concepts and Administration Guide to setup a logical standby database.
When I insert a record to a table from the primary database side, when i query the same table from the logical standby database, it doesn't show the new records.
Did I miss something? What I want to do is when I insert a record in the primary db, then the corresponding record will be inserted in the standby db.
Or I totally misunderstand what Oracle data guard is? Any help are appreciated.
DenisHi
Can anyone help to answer me is my logical standby db have a archive gap?
SQL> SELECT APPLIED_SCN, APPLIED_TIME, READ_SCN, READ_TIME, NEWEST_SCN, NEWEST_T
IME FROM DBA_LOGSTDBY_PROGRESS;
APPLIED_SCN APPLIED_TIME READ_SCN READ_TIME NEWEST_SCN
NEWEST_TIME
851821 29-JUL -08 17:58:29 851822 29-JUL -08 17:58:29 1551238
08-AUG -08 08:43:29
SQL> select pid, type, status, high_scn from v$logstdby;
no rows selected
SQL> alter database start logical standby apply;
Database altered.
SQL> select pid, type, status, high_scn from v$logstdby;
PID
TYPE
STATUS HIGH_SCN
2472
COORDINATOR
ORA-16116: no work available
3380
READER
ORA-16127: stalled waiting for additiona 852063
l transactions to be applied
2480
BUILDER
ORA-16116: no work available
2492
ANALYZER
ORA-16111: log mining and apply setting
up
2496
APPLIER
ORA-16116: no work available
2500
APPLIER
ORA-16116: no work available
3700
APPLIER
ORA-16116: no work available
940
APPLIER
ORA-16116: no work available
2504
APPLIER
ORA-16116: no work available
9 rows selected.
Thanks a lot.
Message was edited by:
Denis Chan -
How to create logical standby database without using Oracle Grid Control
Hi All,
I want to create Logical standby database on 11gr2 on RHEL 5 without using oracle Grid Control.
I already have a primary database as well as physical standby database.
What i want to create a logical standby database as well on the same machine where physical standby database is running.
So anyone of you help me out to do that
Thanks in advanceHi,
Creating a Logical Standby Database
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#SBYDB00300
Regards,
Tom -
How to create logical standby database?
Hi,
can i created logical standby database without creating physical stanby database? is it possible?
Thanks,Hi,
Creating a Logical Standby Database
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#SBYDB00300
Regards,
Tom -
Large import on dataguard (logical standby) 11.2
The action I'll like to perform is to do a large import on the production enviroment without that this import will be applied on the logical-standby environment (because its to large for the standby envoriment to keep it up) and after that I will do this same import on the logical standby.
What the most common way to do this large import on logical standby enviroment after this is performed on the produnction ?
something like ;
alter session disable guard;
do the import
alter session enable guard;
alter database start logical standby apply skip failed transaction;
thanks in advif the table you are importing will have changes made to it AFTER the import and you want those changes replicated to the logical standby then you have to actually re-sync the table FROM primary.
Step 1. Skip the table DML on logical
EXECUTE DBMS_LOGSTDBY.SKIP(stmt => 'DML', schema_name => 'schema', object_name =>'table_name');
Step 2. Import the table into primary
Step 3. Stop Logical Standby apply
alter database recover managed standby database cancel;
Step 4. Get the restart_scn on Logical Standby to use for the flashback scn with exp_dp
SELECT RESTART_SCN FROM V$LOGSTDBY_PROGRESS;
Step 5. On Primary export the table using the restart_scn from logical
expdp DIRECTORY=DP_DIR DUMPFILE=sync_table.dmp LOGFILE=sync_table.log tables=schema.table_name flashback_scn=6146375299983
Step 6. On Logical import the table
impdp DIRECTORY=DP_DIR dumpfile=sync_table.dmp TABLE_EXISTS_ACTION=REPLACE
Step 7. Unskip the table and start the apply on logical standby
EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt => 'DML', schema_name => 'schema', object_name =>'table_name');
alter database start logical standby apply immediate;
Now the tables should both be synced up and any new changes made to the table on primary will replicate correctly to logical.
Note that oracle must maintain a read consistent copy of the table as of the SCN you specified, depending on how long it takes to export you may run into rollback segment issues. I'd plan on doing this during the least busy time on your db and increase undo to avoid ORA-01555
Maybe you are looking for
-
Song corrupted in iPod while plays fine in iTunes, but can't be re-imported
I have a play list of MP3 songs that I created from the same CD. They have played for a long time in my iPod (probably iPod 3) until today when I wanted to edit them (change "Composer"). One song just won't change. After inspection I discovered th
-
It's taking too much time(more than 10 min)
Hi All, Below query is taking more time.I need to tune this. Could you some one help to tune or give me new idea for re-write the query. 1) Database version Version: 10.2.0.3.02)Query SELECT COUNT(C.ITEM_RESPONSE_ID) cnt,c.item_id FROM CAT
-
XSL Transformation won't run in Web Start
Hello, I am using the javax.xml.transform.Transformer implementation built into Java 1.5.x to transform an XML document into HTML using an XSLT transformation source. This code works perfectly if I run the app outside of Java Web Start. However, if I
-
Mediasource Organizer Multiple Librari
I have a large MP3 collection in my "PC Music Library" and would like to set up sub-libraries so that my wife's and my favourites can be browsed more easily. Obviously I can set up playlists <EM>ad infinitum </EM>but these don't then enable me to nar
-
I have installed Reader 10.0.1 on my MacBook (OS X 10.6.3). I am trying to disable protected mode in order to view a particularly troublesome file/document. Where is the configuration panel that will allow me to toggle on/off "Enable Protected Mode a