CREATE DATABASE LINK CONTROL.BMC.COM
CONNECT TO user
IDENTIFIED BY password
USING ‘connection’;
CREATE SYNONYM bla for bla@bla;
ALTER DATABASE RENAME GLOBAL_NAME TO sales.us.oracle.com;
NAVIGATION
|
12
Dec |
Oracle create database linkCategory: Oracle Administration, 10g, Oracle | Leave a Comment |
CREATE DATABASE LINK CONTROL.BMC.COM
CONNECT TO user
IDENTIFIED BY password
USING ‘connection’;
CREATE SYNONYM bla for bla@bla;
ALTER DATABASE RENAME GLOBAL_NAME TO sales.us.oracle.com;
|
15
Jan |
Oracle 10g disaster recovery with Catalog DB and an ASM-InstanceCategory: Oracle Administration, 10g, Oracle | Leave a Comment |
1. set old Oracle SID:
set ORACLE_SID=(SID)
or
export ORACLE=(SID);
2. RMAN
rman
connect target /
connect catalog user/pw@catalogdb
set DBID;
startup force nomount
@re1.rcv
re1.rcv:
run{
allocate channel t1 type ‘SBT_TAPE’
PARMS ‘ENV=(NSR_SERVER=<backup-server>,NSR_DATA_VOLUME_POOL=<poolname>)’;
set command id to ‘bkrs’;
restore spfile;
release channel t1;
}
@re2.rcv
re2.rcv:
run{
allocate channel t1 type ‘SBT_TAPE’
PARMS ‘ENV=(NSR_SERVER=<backup-server>,NSR_DATA_VOLUME_POOL=<poolname>)’;
set command id to ‘bkrs’;restore controlfile;
release channel t1;
}
shutdown
sqlplus “/ as sysdba”
create pfile from spfile;
edit pfile and change path and name of controlfile:
source for controlfile […]
|
24
Aug |
Analyse Oracle Executen PlanCategory: SQL, 10g | Leave a Comment |
Welche typischen Bestandteile eines Ausführungsplans gibt es?
* TABLE ACCESS FULL
Im Rahmen eines Full Table Scans werden alle Tabellenblöcke bis zur High Water Mark (letzter jemals gefüllter Block) gelesen
* INDEX RANGE SCAN
In Abh√§ngigkeit der Selektionsbedingungen wird ein Teilbereich eines Indexes gelesen
* INDEX UNIQUE SCAN
In den Selektionsbedingungen sind alle Schl√ºsselfelder eines Prim√§rindexes mit “=” angegeben, so dass […]
|
11
Jul |
Regular Expressions in Oracle 10gCategory: SQL, 10g, Oracle | Leave a Comment |
* regexp_like
* regexp_instr
* regexp_substr
* regexp_replace
1. Syntax:
REGEXP_LIKE(source_string, pattern [, match_parameter ] )
Match_Parameter kann die folgenden Werte annehmen:
* i Groß-, und Kleinschreibung wird nicht berücksichtigt
* c Gro√ü-, und Kleinschreibung […]
|
11
Jul |
table shrinkCategory: Oracle Administration, 10g, Oracle | Leave a Comment |
Als erstes wird überprüft, wie viele Blöcke und Extents von der Tabelle allokiert sind.
Select BLOCKS, EXTENTS from USER_SEGMENTS where SEGMENT_NAME = ‘BIGEMP’;
BLOCKS EXTENTS
—— ———-
45696 116
Als weitere Ausgangswerte dienen die leeren Bl√∂cke und der durchschnittliche freie Platz innerhalb eines […]
|
11
Jul |
Oracle DatapumpCategory: Oracle Administration, Oracle Upgrades, 10g, Oracle | Leave a Comment |
Oracle 10g Datapump for Export (expdp):
CREATE DIRECTORY export_dumps AS ‘c:\a’;
GRANT read, write ON DIRECTORY export_dumps TO gennick;
PAR-FILE:
DUMPFILE=gnis%U.dmp
DIRECTORY=export_dumps
LOGFILE=gnis_export.log
JOB_NAME=gnis_export
select * from all_directories;
DUMPFILE specifies the file to which I want to write exported data. The %U syntax gives me an incrementing counter, resulting in the filenames gnis01.dmp, gnis02.dmp, and so forth. DIRECTORY specifies my target directory.Note that if […]
|
10
Jul |
Oracle 10g installation checkCategory: Oracle Administration, Oracle Upgrades, Installation, 10g | Leave a Comment |
select comp_id, comp_name, version,status from dba_registry;
|
10
Jul |
Oracle get DDLCategory: Oracle Performance, Oracle Administration, 10g, Oracle | Leave a Comment |
SQL>
set long 900000
select DBMS_METADATA.GET_DDL(’TABLESPACE’,’tablespace_name’) from dual;
select DBMS_METADATA.GET_DDL(’TABLE’,’table_name’) from dual;
|
10
Jul |
Oracle list installed versionsCategory: Oracle Upgrades, Installation, 10g, Oracle | Leave a Comment |
opatch lsinventory -detail
|
10
Jul |
Oracle 10g database cloning with change of the SIDCategory: 10g, Oracle | Leave a Comment |
1. SQL> Clone the Database via cp, preserve all rights, source database has to be offline.
2. SQL>alter database backup controlfile to trace;
3. SQL> create pfile from spfile;
4. vi $ORACLE_BASE/admin/<sid>/udump/<trace-id>.trc
Change:
———SCHNIPP————–
STARTUP NOMOUNT PFILE=’<PATH TO PFILE and FILENAME>’
CREATE CONTROLFILE REUSE SET DATABASE “<NEW-SID>” RESETLOGS NOARCHIVELOG
——–SCHNAPP————–
5. Change all SIDs to the new one (datafile path, filename, pfile, .profile […]