Skip to main content

Posts

ORA-02289 SEQUENCE DOES NOT EXIST

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Note: here we are trying to insert  values in a table from another user Which has access. SQL Error: ORA-02289: sequence does not exist 02289. 00000 - "sequence does not exist" *Cause: The specified sequence does not exist, or the user does            not have the required privilege to perform this operation. *Action: Make sure the sequence name is correct, and that you have            the right to perform the desired operation on this sequence. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generating query is not having SCHEMA NAME suffixed before the SEQUENCE NAME. Please see below example’s for easy understanding. Please see painted values in the below queries. SQL> show user; USER is "RKPYTE" FAILING SQL: SQL> insert into RKPYTE.TRANSACTION_IMPORT(TRANSACTION_IMPORT_ID,IMPORT_RUN_CODE,...

RESTORE CONTROL FILES FROM BACKUP 11G

C:\Users\computer>set ORACLE_SID=TEST C:\Users\computer>sqlplus / as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Thu May 10 23:05:45 2013 Copyright (c) 1982, 2008, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select name from v$database; NAME --------- TEST TAKEN BACKUP OF THE CONTROL FILE; SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS 'D:\TEST1\CONTROL.BKP'; Database altered. SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down. NOTE: EDITED PFILE AND REMOVED THE EXISTS CONTROLFILE PARAMETER FROM IT & TRY STARTED THE DATABASE IN MOUNT. SQL> startup mount; ORACLE instance started. Total System Global Area  535662592 bytes Fixed Size                  1348508 bytes Variable Size ...

FLASHBACK TABLE TO BEFORE DROP ORACLE 11G

C:\Users\computer>sqlplus / as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jan 10 22:13:29 2013 Copyright (c) 1982, 2008, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> grant dba to scott; Grant succeeded. SQL> conn scott Enter password: Connected. SQL> SQL> show user; USER is "SCOTT" SQL> SQL> create table bemp as select * from emp; create table bemp as select * from emp              * ERROR at line 1: ORA-00955: name is already used by an existing object SQL> drop table bemp; Table dropped. SQL> flashback table bemp to before drop; Flashback complete. SQL> desc bemp;  Name                                      Null? ...

CHANGING DBID FOR ORACLE DATABASE 11G

C:\Users\computer>sqlplus SQL*Plus: Release 11.1.0.7.0 - Production on Thu Sep 10 21:03:33 2013 Copyright (c) 1982, 2008, Oracle.  All rights reserved. Enter user-name: sys as sysdba Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select dbid from v$database;       DBID ---------- 2188161033 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options C:\Users\computer>nid DBNEWID: Release 11.1.0.7.0 - Production on Thu Sep 10 21:04:44 2013 Copyright (c) 1982, 2007, Oracle.  All rights reserved. Keyword     Description                    (Default) ---------------------------------------------------- TARGET ...

ORA-39168: Object path GRANT was not found EXCLUDE=GRANT

C:\Users\>sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 11 20:55:55 2013 Copyright (c) 1982, 2005, Oracle.  All rights reserved. Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production SQL> create user exp identified by exp; User created. SQL> create user imp identified by imp; User created. SQL> grant dba to exp; Grant succeeded. SQL> grant dba to imp; Grant succeeded. SQL> conn exp Enter password: Connected. SQL> SQL> create table Test (col1 char(10)); Table created. SQL> grant select on Test to rishi; Grant succeeded. SQL> insert into Test values('hello'); 1 row created. SQL> commit; Commit complete. NOTE:Directory already exists. So used the existng one SQL> select * from dba_directories; OWNER                          DIRECTORY_NAME ------------------------------ --------------------...

ORA-12519: TNS:no appropriate service handler found

Due to maximum number of sessions exceeded in XXXX database. Hence we have received the following error. ORA-12519: TNS:no appropriate service handler found Solution: Seems the number of processes parameter value less. Its unable to create new session. Because its reached maximum sessions. Please check like below. SQL> select * from v$resource_limit where RESOURCE_NAME in ('sessions','processes','transactions'); RESOURCE_NAME                  CURRENT_UTILIZATION      MAX_UTILIZATION         INITIAL_ALLOCATION             LIMIT_VALUE ----------------------         -------------------   ---------------------    -----------------------   ------------------------------ processes...

DATA GUARD BASICS

DATA  GUARD Data Guard is basically a ship redo and then apply redo, as you know redo is the information needed to recover a database transaction. A production database referred to as a primary database transmits redo to one or more independent replicas referred to as standby databases. Redo information needed to recover a database transaction. Remember that the LGWR can write to the log file using "group" commits, basically entire list of redo entries of waiting transactions (not yet committed) can be written to disk in one operation, thus reducing I/O. Even through the data buffer cache has not been written to disk, Oracle guarantees that no transaction will be lost due to the redo log having successfully saved any changes. A production database referred to as a primary database transmits redo to one or more independent replicas referred to as standby databases. A standby database will also automatically re synchronize if it becomes temporary disconnected ...