Académique Documents
Professionnel Documents
Culture Documents
Implementing Backups
Recovery Contingency Testing
Maintaining Standby Databases
Daily
• Export backup
• Applying Archive logs on Standby Database
Weekly
• Hot Back
• Archive Log Backup
Monthly
• Cold Backup
SECURITY (ON DEMAND)
Data Loading
Exp / Imp Of Tables / Users For Testing
Creation Of Objects Based On User Request
Installation of oracle server and clients
à Daily Activities:
Daily Activities
1) Check all the Database open and read write mode all 5 Database
2) Check mail..
3) Check bdump frequently
4) check all the v$session , locks, v$activex
5) space all database from f: (Required More than 4GB)
Before leaving remove archive files in f drive: of every databases should be deleted
(delete the oldest archive files) for space
Go to remote server login to Acer will and pwd click alt del ctl adminstrator <pwd> go
to c: drive select folder export_backup . Change the date -> controlpannel-> shcudled.
Go to remote server login to commwill and pwd click alt del ctl adminstrator <pwd>
go to c: dirve select folder export_backup . Change the date -> controlpannel->
shcudled.
Go to remote server login to wirewill and pwd click alt del ctl adminstrator <pwd> go
to E: dirve select folder export_backup . change the date -> controlpannel-> shcudled.
From e: drive copy to local backup area.
Tape backup:
Ø ntbackup
Ø click backup
Ø select media à < TAPE NAME> <EXAMPLE : 240406 BACKUP>
Ø GO TO BACKUP FOLDER - SELECT DATE OF DUMP FILE AND LOG FILE.
Ø GIVE THE NAME EXP_MIS_ACT_WW_<DATE OF BACKUP> FOR
EXAMPLE <280406>
Scripts:
@active; - to check the users are active
@block - to check any lock has occured
@sid - to check for sid
@hash - to check which sql stmt is running
@lock - to check for deadlock
@lock_ob - to check which user locked the table
@ts - to check the tablespace free details
@rollback - to shrink the rollback if extents reach max_extents
@rollstat - to check weather to shrink or not
@buffhit - to check the buffer hit ratio
@loghit - to check the log hit ratio
@ddhit - to check the data dictionart hit ratio
@lockwait - who has locked and who is waiting
@hwm - to check high water mark
@active - to check the active for session
@temp - to check for sorting
@temp1 - to check full details abt temp space
@cnt - to count the active and inactive sessions.
@sessions - to check inactive sessions having more than 3 sessions
@sysstat - to tune the database
@alz - to analyze the table
@chkpt - t0 check when the last checkpoint has occured
@time - to check the particular os user who is inactive
@tgrow - to check for table growth.
@igrow - to check for index growth.
@idle - to check for users are in idle state
@privs - to check for object privilege
@user - to check how much mb users are using
@rsql - to check current sql for particular rollback segment
Script:
Example:
Script:
Example:
No rows selected (No problem but any lock is occur then kill the session use sid script to
find the sid no)
SQL> @l1
Script:
Example:
Enter value for sid: 376
Solution:
Script:
Select sql_text from v$sqlarea where hash_value=&hash_value
Example:
mis>@hash
Enter value for hash_value: 824065089
SQL_TEXT
----------------------------------------------
Select rowid, day1, day2 from tampr.weekhol
Script:
Select * from v$lock WHERE LMODE=6 ORDER BY SID
Example:
ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
-------- -------- ----- -- ---------- ---------- ------ ---------- ---------- ------
34379768 34379778 3 RT 1 0 6 0 0 0
61699A5C 61699B28 7 TX 786432 1785 6 0 3701 0
61699A5C 61699B28 9 TX 589871 386 6 0 4684 0
61699A5C 61699B28 16 TX 524308 556 6 0 1596 0
61699A5C 61699B28 18 TX 655438 451 6 0 2098 0
61699A5C 61699B28 23 TX 786497 1781 6 0 236 0
61699A5C 61699B28 30 TX 720928 846 6 0 6214 0
61699A5C 61699B28 34 TX 196695 461 6 0 5859 0
Script:
Example:
mis>@lock_ob
Script:
select tablespace_name, sum(MB) "TOTAL BYTES (MB)", round(sum(FREE),2) "FREE
BYTES (MB)", round(sum(free)*100/sum(mb),2) "FREE PERCENTAGE (MB)"
from
(
select tablespace_name,0 MB, sum(bytes)/1048576 FREE from dba_free_space
group by tablespace_name
union all
select tablespace_name,sum(bytes)/1048576 MB, 0 FREE from sys.dba_data_files
group by tablespace_name
)
group by tablespace_name
Example:
mis>@ts
Script:
alter rollback segment SYS_RBS shrink to 10m;
alter rollback segment RBS01 shrink to 10m;
alter rollback segment RBS02 shrink to 10m;
alter rollback segment RBS03 shrink to 10m;
alter rollback segment RBS04 shrink to 10m;
alter rollback segment RBS05 shrink to 10m;
alter rollback segment RBS06 shrink to 10m;
alter rollback segment RBS07 shrink to 10m;
alter rollback segment RBS08 shrink to 10m;
alter rollback segment RBS09 shrink to 10m;
alter rollback segment RBS10 shrink to 10m;
Script:
Select * from v$rollstat;
Example:
mis>@rollstat
Example:
mis>@buffhit
Buffer Hit Raio 90.0798363
Script:
select rbar.name , rbar.value , re.name , re.value , (rbar.value*100)/re.value "ratio"
from v$sysstat rbar , v$sysstat re where rbar.name = 'redo buffer allocation retries' and
re.name = 'redo entries'
Example:
mis>@loghit
Example:
mis>@active
Script:
select s.username, u."USER",s.OSUSER "osuser", u.tablespace, u.contents, u.extents,
u.blocks from sys.v_$session s, sys.v_$sort_usage u where s.saddr = u.session_addr
Example:
mis>@temp
Script:
select s.osuser, s.process, s.username, s.serial#,
sum(u.blocks)*vp.value/1024 sort_size,U.EXTENTS,U.BLOCKS
from sys.v_$session s, sys.v_$sort_usage u, sys.v_$parameter vp
where s.saddr = u.session_addr
and vp.name = 'db_block_size'
group by s.osuser, s.process, s.username, s.serial#, vp.value,U.EXTENTS,U.BLOCKS
Example:
mis>@temp1
Script:
SELECT COUNT (*) "TOTAL"FROM v$session
Example:
mis>@cnt
TOTAL 338
Script:
SELECT OSUSER,USERNAME,COUNT(*) "INACTIVE" FROM V$SESSION
WHERE STATUS ='INACTIVE' AND
USERNAME ='CST'
OR USERNAME='DS'
OR USERNAME='ES'
OR USERNAME='FASAL'
OR USERNAME='GS'
OR USERNAME='MFG'
OR USERNAME='MISQRY'
OR USERNAME='MISREAD'
OR USERNAME='MP'
OR USERNAME='NEW_INCENTIVE'
OR USERNAME='PD'
OR USERNAME='PE'
OR USERNAME='PLE'
OR USERNAME='PUR'
OR USERNAME='QLTY'
OR USERNAME='READMIS'
OR USERNAME='RMS'
OR USERNAME='TAMPR'
OR USERNAME='TD'
OR USERNAME='TP'
OR USERNAME='TR'
OR USERNAME='TS'
OR USERNAME='KAROMI'
OR USERNAME='WILCDA'
OR USERNAME='WILDBA' GROUP BY OSUSER,USERNAME HAVING
COUNT(*) > 3 order by count(*);
Example:
OSUSER USERNAME INACTIVE
-------------------- --------------- --------
toolstores MISQRY 6
wwashok WILDBA 7
rmstores RMS 9
stores GS 11
toolstores TS 11
wwstores WILDBA 20
Script:
SELECT a.name,b.value
FROM v$statname a,
v$sysstat b
WHERE a.statistic# = b.statistic#
AND UPPER(a.name) LIKE '%' || UPPER('&statname') || '%'
Example:
mis>@sysstat
Enter value for statname: PX local messages sent
NAME VALUE
------------------------------ ----------
PX local messages sent 182
Script:
select owner,table_name,blocks,empty_blocks,num_rows from dba_tables where
owner=upper('&owner') and table_name=upper('&table_name');
Example:
mis>@alz
Enter value for owner: wildba
Enter value for table_name: ds_invoice
Script:
select name,checkpoint_change#, to_char(checkpoint_time, 'DD.MM.YYYY
HH24:MI:SS') from v$datafile_header;
Example:
NAME CHECKPOINT_CHANGE# TO_CHAR(CHECKPOINT_
------------------------------ ------------------ -------------------
E:\MIS\DATA\INDEX_DATA01.DBF 200965067 02.03.2007 13:11:39
E:\MIS\DATA\INDEX_DATA02.DBF 200965067 02.03.2007 13:11:39
E:\MIS\DATA\INDEX_DATA03.DBF 200965067 02.03.2007 13:11:39
E:\MIS\DATA\INDEX_DATA04.DBF 200965067 02.03.2007 13:11:39
E:\MIS\DATA\INDEX_DATA05.DBF 200965067 02.03.2007 13:11:39
E:\MIS\DATA\INDEX_DATA06.DBF 200965067 02.03.2007 13:11:39
Script:
ELECT LPAD(SID,4) SID,LPAD(SERIAL#,7) SERIAL#,
USERNAME, RPAD(OSUSER,12) OSUSER, LPAD(COMMAND,7)
COMMAND,STATUS,MACHINE,
RPAD(TO_CHAR(LOGON_TIME,'DD-MON-YY:HH:MI:SS-AM'),23) LOGIN_TIME
FROM V$SESSION WHERE USERNAME IS NOT NULL AND OSUSER like
'&OSUSER%' AND STATUS NOT IN ('KILLED') order by LOGON_TIME;
Example:
mis>@time
Enter value for osuser: apa
Script:
select /*+ index */ table_name,(blocks*8192)/(1024*1024) "GROWTH" from dba_tables
where owner='WILDBA' AND (blocks*8192)/(1024*1024) > 100 order by
(blocks*8192)/(1024*1024);
Example:
mis>@tgrow
TABLE_NAME GROWTH
------------------------------ ------------
PERD_TRANS_AUDIT 115.46
ISS_ACCP_DETL_GS 214.45
PERD_TRANS 367.06
CONSUMP_TABLE_TMP 504.56
PC_ORDER_DETAIL 953.05
Script:
select TABLE_NAME,index_name,(leaf_blocks*8192)/(1024*1024) "GROWTH" from
dba_indexes where owner='WILDBA' AND (leaf_blocks*8192)/(1024*1024)> 100 order
by LEAF_BLOCKS;
Example:
TABLE_NAME INDEX_NAME GROWTH
------------------------------ ------------------------------ ------------
PC_ORDER_DETAIL PO_DTL_IND 212.38
PC_ORDER_DETAIL IND_FOR_GIN_UPD_3 464.77
PC_ORDER_DETAIL PK_PC_ORDER_DETAIL 633.80
24.@idle - to check for users are in idle state
Script:
select sid,serial#,osuser,username,trunc
(last_call_et/3600,2)||' hr' last_call_et from V$session where
last_call_et > 3600 and username is not null;
Example:
Script:
SELECT * FROM DBA_TAB_PRIVS WHERE
TABLE_NAME=upper('&TABLE_NAME') and owner='WILDBA';
Example:
Script:
select owner,
sum(bytes)/1024/1024 user_space_usage_mb,
sum(bytes)/ts.tot_size*100 pct_usage
from dba_segments s,
(select sum(bytes) tot_size
from dba_segments
where tablespace_name ='WILDATA') ts
where tablespace_name = 'WILDATA'
group by owner,ts.tot_size
having sum(bytes) > 1024*1024
order by 2
Example:
OWNER USER_SPACE_USAGE_MB PCT_USAGE
------------------------------ ------------------- ---------
MP 1.06 .01
TSCST 3.08 .04
RMS 3.40 .05
AIRSUS 3.43 .05
JVC 5.45 .08
PLE 5.60 .08
CST 15.20 .21
27.@rsql - to check current sql for particular rollback segment
Script:
SELECT Y.SQL_TEXT, R.NAME, S.OSUSER, S.USERNAME, X.EXTENTS,
X.EXTENDS FROM SYS.V_$ROLLSTAT X, SYS.V_$ROLLNAME
R,SYS.V_$SESSION S, SYS.V_$TRANSACTION T, SYS.V_$SQLAREA Y
WHERE s.sql_hash_value = y.hash_value(+) AND s.sql_address = y.address(+) AND
t.addr = s.taddr(+) AND r.usn = x.usn(+) AND
r.usn = t.xidusn(+) AND S.USERNAME NOT IN ('SYS','SYSTEM') and
r.name=upper('&name')
ORDER BY r.usn;
Example:
mis>@rsql
USN NAME
---------- -----------------
0 SYSTEM
1 SYS_RBS
3 RBS01
4 RBS02
5 RBS03
6 RBS04
7 RBS05
8 RBS06
9 RBS07
10 RBS08
11 RBS09
12 RBS10
12 rows selected.
Enter value for name: rbs01
SQL_TEXT
--------------------------------------------------------------------------------------------------
NAME OSUSER USERNAME EXTENTS EXTENDS
------------------------------ --------------- --------------- ---------- ----------
SELECT
ROWID,RND_NOTE_TYPE,RND_NOTE_YEAR,RND_NOTE_NO,RND_DRAW_NO
,RND_SHEET_NO,RND_FROM_DTL_NO,RND_
NO,RND_COMP_DRAWNO,RND_DESC,RND_ISSUE,RND_ISSUE_DATE,RND_T
YPE,RND_STATUS,RND_TYPE_DESC,RND_STATUS_
OM REL_NOTE_DETAIL WHERE RND_NOTE_TYPE=:1 AND
RND_NOTE_YEAR=:2 AND RND_NOTE_NO=:3 order by rnd_no
, rnd_note_year, rnd_note_no
RBS01 asaravanan TD 289 33
28.@uga-display the session uga memory
Script:
SELECT username, value || 'bytes' "Current UGA memory"
FROM v$session sess, v$sesstat stat, v$statname name
WHERE sess.sid = stat.sid
AND stat.statistic# = name.statistic#
AND name.name = 'session uga memory';
Example:
USERNAME Current UGA memory
------------------------------ -------------------
PE 69928bytes
WILDBA 29356bytes
PUR 47320bytes
MISQRY 47320bytes
TAMPR 25120bytes
MISQRY 20884bytes
TP 69924bytes
Example;
Event Total Seconds Total Wait
Name Waits Waiting Timeouts (in secs)
------------------------------ ------------ -------- ------------ ---------
library cache lock 4 0 2 .000
buffer deadlock 3 0 3 .000
PX qref latch 3 0 3 .000
SQL*Net more data to dblink 2 0 0 .000
inactive session 1 0 1 .000
Script:
SET VERIFY OFF
COLUMN SEGMENT_NAME FORMAT A20
SELECT
SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME,SUM(BYTES)/(1024*1
024) "MB",SUM(BLOCKS) "BLOCKS" FROM DBA_SEGMENTS WHERE
owner=upper('&owner') and SEGMENT_NAME like upper('&SEGMENT_NAME%')
GROUP BY SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME;
Example:
mis>@tsize
Enter value for owner: wildba
Enter value for segment_name: IND_TOOL_OBS
Script:
select
index_name,BLEVEL,LEAF_BLOCKS,DISTINCT_KEYS,NUM_ROWS,STATUS,LA
ST_ANALYZED from dba_indexes where OWNER=UPPER('&OWNER') AND
table_name=UPPER('&TABLE_NAME');
Example:
mis>@idx
Enter value for owner: wildba
Enter value for table_name: ds_invoice
Script:
SELECT osuser, username, sql_text from v$session a, v$sqltext b
where a.sql_address =b.address AND OSUSER like '&osuser'
order by address, piece;
Example:
mis>@csql
Enter value for osuser: balaji
Script:
SET VERIFY OFF
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='&TABLE_NAME' and
b.status='INVALID';
33. @to_pin-
Script:
select OWNER,
NAME||' - '||TYPE object,
SHARABLE_MEM
from v$db_object_cache
where SHARABLE_MEM > 10000
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
and owner !='SYS'
order by SHARABLE_MEM desc;
Example:
OWNER OBJECT
------------ -------------------------------------
WILDBA SUM_MFG_DETAIL - PROCEDURE
WILDBA SUM_MFG_DTLS - PROCEDURE
WILDBA SUM_MFG_DETL - PROCEDURE
WILDBA ANNLPLAN - PROCEDURE
WILDBA PEMONTH - PROCEDURE
WILDBA POPULATE_COMP_DETAILS - PROCEDURE
WILDBA INS_PERD_TRANS_NEW_TS - PROCEDURE
WILDBA CST_GIN_VAL_RM_TS - PROCEDURE
WILDBA INS_PERD_TRANS_LOAN_TS - PROCEDURE
WILDBA INS_PERD_TRANS - PROCEDURE
WILDBA INS_PERD_TRANS_SUPP - PROCEDURE
WILDBA POPULATE_WHEEL_SUMMARY_EXP - PROCEDUR
WILDBA GET_RATE_RM_TS - FUNCTION
WILDBA CST_GIN_VAL_TOOL_TS - PROCEDURE
WILDBA INVNOCHG - PROCEDURE
WILDBA GET_AVAILABLE_STOCK - PROCEDURE
WILDBA INS_PERD_TRANS_RM_TS - PROCEDURE
WILDBA GENERATEDEBITNOTE - PROCEDURE
34.
Script:
SELECT a.tablespace_name,b.file_name,x.free_in_mb,
SUM(CEIL(a.bytes/1024/1024)) used_in_mb
FROM dba_extents a,
dba_data_files b,
(select y.tablespace_name,y.file_id,SUM(y.bytes/1024/1024) free_in_mb
from dba_free_space y
group by y.tablespace_name,y.file_id) x
WHERE a.owner LIKE UPPER('&&owner')
AND a.segment_name LIKE UPPER('&&tname')
AND a.tablespace_name = b.tablespace_name
AND a.file_id = b.file_id
AND x.tablespace_name(+) = b.tablespace_name
AND x.file_id(+) = b.file_id
GROUP BY a.tablespace_name,b.file_name,x.free_in_mb;
Example:
TABLESPACE_NAME FILE_NAME FREE_IN_MB USED_IN_MB
--------------- ---------------------------------------- ---------- ----------
WILDATA D:\MIS\DATA\WILDATA01.DBF 973 3
WILDATA D:\MIS\DATA\WILDATA03.DBF 814 4
WILDATA E:\MIS\DATA\WILDATA02.DBF 39
WILDATA E:\MIS\DATA\WILDATA04.DBF 8
WILDATA E:\MIS\DATA\WILDATA05.DBF 11
WILDATA E:\MIS\DATA\WILDATA06.DBF 639 16
Move table:
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='WILDBA.GET_RATE_TL_TS'
and b.status='INVALID';
CONN WILDBA@MIS
Fmotrainee
==============
create table wildba.medi_item_master as select * from trainee.medi_item_master;
create synonym misqry.medi_item_master for wildba.medi_item_master;
grant all on wildba.medi_item_master to misqry;
2.Please create the synonym for the following objects for the user airsus @ Mis Database
1.Sequence - Gs_Doc_seq
2.Table - Empmas
2.Pls move the following table from wildba@mis_bk to wildba@mis and wildba@wwdb
Inward_correction
Inward_correction_mast
Inward_correction_detl
PATIENT_MAST
PATIENT_DETL
CONN WILDBA@MIS
CREATE TABLE INWARD_CORRECTION AS SELECT * FROM
INWARD_CORRECTION@MISBK2MIS;
CONN WILDBA@WWDB
CONNECT WILDBA@WWDB;
-------------------------------------------------------------------
3.Please take the table “GIN_RECP_DETL_GS” of MIS DB from backup of 21-jun-06…
BACKUP 190606
RESTORE
--------------------------------------------------------------------------
gmm_gin_cancel varchar2(1)
gmm_gin_cancel_date date
CONECT AS WILDBA@MIS,@WIL,@WWDB
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='WILDBA.GET_RATE_TL_TS'
and b.status='INVALID';
INV_CESS_PER_ONE
INV_CESS_AMOUNT_ONE
-------------------------------------------------------------------------------
pc_order_mast
pc_order_mast_mn
pc_order_mast_imp
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and owner='RMS' and b.status='INVALID';
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='PATIENT_MAST' and
b.status='INVALID';
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='TEST_TAB' and
b.status='INVALID';
compile trig,pro,body.
-----------------------------------------------------------------------------------------
USER_TAB_COLUMNS
MOVING TABLE:
=============
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a.referenced_name ='TR_PACK_SLIP_DETAIL' AND
and b.status='INVALID';
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a.referenced_name ='PATIENT_MAST' and
b.status='INVALID';
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a.referenced_name ='GIN_RECP_DETL_GS' and
b.status='INVALID';
PE_WORK_ORDER
PE_WO_ADD
PE_WO_DETAIL
PE_WO_LESS
PW_WO_RECON_DETAILS
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a.referenced_name ='MSGPITEM' and
b.status='INVALID';
541;
select s.sid,s.serial#,s.username,o.owner,s.osuser,s.terminal,o.object_type,s.status,
o.object_name from v$session s,v$lock l,dba_objects o where
s.sid=l.sid and o.object_id=l.id1 and s.username is not null and
object_name='JOB_PACK_SLIP_MAST_MP';
FK_PACKING_LIST_INVOICE_TR
FK_SALES_TYPE_PACKING_LIST_TR
msgp
msgpitem
asubcontractors
the above table in wwproject ,our task is the table move into wildba user then create the
synonym of the above table wwproject,mp then give the privileges all in wwproject,
select on to mp.so owner of the table is wildba
solution:
Do not run discrete transactions while sensitive queries or transactions are running,
unless you are confident that the data sets required are mutually exclusive.
-Schedule long running queries and transactions out of hours, so that the consistent gets
will not need to rollback changes made since the snapshot SCN. This also reduces the
work done by the server, and thus improves performance. Code long running processes as
a series of restartable steps.- Shrink all rollback segments back to their optimal size
manually before running a sensitive query or transaction to reduce risk of consistent get
rollback failure due to extent deallocation. - Use a large optimal value on all rollback
segments, to delay extent reuse. - Don't fetch across commits. That is, don't fetch on a
cursor that was opened prior to the last commit, particularly if the data queried by the
cursor is being changed in the current session.- Use a large database block size to
maximize the number of slots in the rollback segment transaction tables, and thus delay
slot reuse.- Commit less often in tasks that will run at the same time as the sensitive
query, particularly in PL/SQL procedures, to reduce transaction slot reuse.- If necessary,
add extra rollback segments (undo logs) to make more transaction slots available.
1/03/07
=======
Check the objects are invalid
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='DS_INVOICE' and
b.status='INVALID';
INV_CESS_PER_ONE NUMBER(5,2)
MIS,WWDB,MIS_BK
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a.referenced_name ='TOOL_DETAIL_LDR' and
b.status='INVALID';
http://sharinc@vsnl.com/
suresh@shartechnologies.in
contractors
complain
ALTER TABLE complain
add CONSTRAINT complain_CONSTRAINT UNIQUE (COMPNAME);
conn wildba@mis
==============
create table contractors as select * from contractors@misbk2mis;
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='PC_ORDER_MAST_MN' and
b.status='INVALID';
Kindly create below mentioned new column in the table PC_ORDER_MAST_MN table
in ALL DATABASES.
POM_RAISED_BY VARCHAR2(5)
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='GIN_RECP_DETL_GS ' and
b.status='INVALID';
14/03/07
=========
Please create additional column in the following tables in MIS ,WWDB ,MIS_BK
databases.
1.select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a.owner='RMS' and b.status='INVALID';
desc GIN_RECP_DETL_GS
alter table GIN_RECP_DETL_GS add GRD_ADDL_CESS_AMT Number(15,2);
desc GIN_RECP_DETL_GS
2.desc CST_INDIGENEOUS_GIN
desc CST_INDIGENEOUS_GIN
3.
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name
='CST_INDIGENEOUS_GIN_RMSCHECK' and b.status='INVALID';
desc CST_INDIGENEOUS_GIN_RMS
alter table CST_INDIGENEOUS_GIN_RMS add CSG_ADDL_CESS_PER
Number(5,2);
alter table CST_INDIGENEOUS_GIN_RMS add CSG_ADDL_CESS_AMOUNT
Number(15,2);
desc CST_INDIGENEOUS_GIN_RMS
4.
select distinct 'Alter ' || a.type || ' '|| a.owner || '.' || a.name || ' compile;'
from dba_dependencies a, dba_objects b
where a.name=b.object_name and a. referenced_name ='GIN_RECP_DETL_GS' and
b.status='INVALID';
desc CST_INDIGENEOUS_GIN_RMSCHECK
alter table CST_INDIGENEOUS_GIN_RMSCHECK add CSG_ADDL_CESS_PER
Number(5,2);
alter table CST_INDIGENEOUS_GIN_RMSCHECK add
CSG_ADDL_CESS_AMOUNT number(15,2);
desc CST_INDIGENEOUS_GIN_RMSCHECK
steps:
1.shutdown normal
2.set the parameter in pfile
3.until cancel type recovery
4.alter database open restlogs;
5.wait couple of minutes for oracle to start itself then
6.shutdown normal
7.remove the above parameter
8.startup then check alert logfile for more info
http://localhost:80/isqlplus
To Login as SYSDBA :
---------------------------------
http://localhost:80/isqlplus/dba
http://localhost:80/isqlplusdba
you need to configure as shown below or it will throw error insufficient previleges...
general syntax :
-------------------------
htpasswd %ORACLE_HOME%\sqlplus\admin\iplusdba.pw username
example:
-------------
D:\oracle9i\Apache\Apache\bin>
when you edit the iplusdba.pw file now you can see the entries in that file related to new
user 'dba' created.
http://localhost:80/isqlplus/dba
it will ask for username and password enter dba(username) password (dba)
then enter sys and password in the isqlplus screen and connect as sysdba..
==================================================
Alter FUNCTION CST.DT_ADDUSEROBJECT compile;
Alter FUNCTION CST.GET_WHEEL_CODES compile;
Alter FUNCTION GUEST.DT_ADDUSEROBJECT compile;
Alter FUNCTION JVC.DT_ADDUSEROBJECT compile;
Alter FUNCTION MFG.DT_ADDUSEROBJECT compile;
Alter FUNCTION MFG.TEST compile;
Alter FUNCTION MISQRY.DT_ADDUSEROBJECT compile;
Alter FUNCTION MISQRY.FU2 compile;
Alter FUNCTION MISQRY.FU3 compile;
Alter FUNCTION MP.GET_VALUE_IND_TL_TS compile;
Alter FUNCTION PACCOUNTS.NM compile;
Alter FUNCTION PACCOUNTS.TEST1 compile;
Alter FUNCTION PUR.DT_ADDUSEROBJECT compile;
Alter FUNCTION SCOTT.DT_ADDUSEROBJECT compile;
Alter FUNCTION SYSTEM.CHKUSER compile;
Alter FUNCTION TAMPR.DT_ADDUSEROBJECT compile;
Alter FUNCTION TAMPR.NM compile;
Alter FUNCTION TAMPR.NOLV compile;
Alter FUNCTION WILDBA.GET_ISS_GROSS compile;
Alter FUNCTION WILDBA.GET_ISS_NEG_ADJ compile;
Alter FUNCTION WILDBA.GET_ISS_POS_ADJ compile;
Alter FUNCTION WILDBA.GET_VALUE_IND_TL_TS compile;
Alter FUNCTION WILDBA.GET_WHEEL_CODES compile;
Alter FUNCTION WILDBA.TEST compile;
Alter PACKAGE BODY DGN.DEMOKIT compile;
Alter PACKAGE BODY SCOTT.DEMOKIT compile;
Alter PACKAGE BODY SCOTT.EMPDEPTP compile;
Alter PACKAGE BODY SCOTT.EMPHTML compile;
Alter PACKAGE BODY SYSTEM.PERFORMANCE compile;
Alter PACKAGE BODY SYSTEM.SQLAB_SCHEDULED_COLLECTOR compile;
Alter PACKAGE BODY TAMPR.DEMOKIT compile;
Alter PACKAGE BODY WILDBA.ABCD compile;
Alter PACKAGE BODY WILDBA.CST_ISSUE_PCC_GRP_PKG compile;
Alter PACKAGE BODY WILDBA.PERFORMANCE compile;
Alter PACKAGE DGN.DEMOKIT compile;
Alter PACKAGE SCOTT.DEMOKIT compile;
Alter PACKAGE SCOTT.EMPDEPTP compile;
Alter PACKAGE SCOTT.EMPHTML compile;
Alter PACKAGE SYSTEM.PERFORMANCE compile;
Alter PACKAGE SYSTEM.SQLAB_SCHEDULED_COLLECTOR compile;
Alter PACKAGE TAMPR.DEMOKIT compile;
Alter PACKAGE WILDBA.ABCD compile;
Alter PACKAGE WILDBA.CST_ISSUE_PCC_GRP_PKG compile;
Alter PACKAGE WILDBA.PERFORMANCE compile;
Alter PROCEDURE BS.FIND_ITEM_ASSESABLE_VALUE compile;
Alter PROCEDURE CST.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE CST.DT_SETPROPERTYBYID compile;
Alter PROCEDURE CST.P1 compile;
Alter PROCEDURE CST.TEST compile;
Alter PROCEDURE CST.TEST1 compile;
Alter PROCEDURE CST.TST compile;
Alter PROCEDURE DGN.SUB_QRY_1 compile;
Alter PROCEDURE DS.OPEN compile;
Alter PROCEDURE ES.ABCD compile;
Alter PROCEDURE GS.ISSADJ_INSERT compile;
Alter PROCEDURE GS.ITEM_CURR_QTY_UPD compile;
Alter PROCEDURE GS.LATEST_PUR compile;
Alter PROCEDURE GS.MISPLEITEM compile;
Alter PROCEDURE GS.NEG_CHANGE compile;
Alter PROCEDURE GS.PR_FIFO compile;
Alter PROCEDURE GS.RECADJ_INSERT compile;
Alter PROCEDURE GS.RMR_INSERT compile;
Alter PROCEDURE GS.VERI_INSERT compile;
Alter PROCEDURE GUEST.ABCD compile;
Alter PROCEDURE GUEST.ANU compile;
Alter PROCEDURE GUEST.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE GUEST.DT_SETPROPERTYBYID compile;
Alter PROCEDURE GUEST.DUP compile;
Alter PROCEDURE GUEST.GININS compile;
Alter PROCEDURE GUEST.MRDETAILS_IN_ISSUE compile;
Alter PROCEDURE GUEST.NM1 compile;
Alter PROCEDURE GUEST.P1 compile;
Alter PROCEDURE GUEST.PDINSERT compile;
Alter PROCEDURE GUEST.PROC1 compile;
Alter PROCEDURE GUEST.SP_ISSUE_FETCH compile;
Alter PROCEDURE GUEST.SP_RATECALCULATION compile;
Alter PROCEDURE GUEST.SP_ZEROSTK compile;
Alter PROCEDURE GUEST.VW compile;
Alter PROCEDURE GUEST.WWPR_TO_WILPR_DUMP compile;
Alter PROCEDURE JVC.AA compile;
Alter PROCEDURE JVC.ABC123 compile;
Alter PROCEDURE JVC.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE JVC.DT_SETPROPERTYBYID compile;
Alter PROCEDURE LAMBENT.PRO_OBJECT_STORAGE compile;
Alter PROCEDURE MFG.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE MFG.DT_SETPROPERTYBYID compile;
Alter PROCEDURE MISQRY.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE MISQRY.DT_SETPROPERTYBYID compile;
Alter PROCEDURE MRP.UPDATE_DETAILS compile;
Alter PROCEDURE PACCOUNTS.ITAX_EST_RECO compile;
Alter PROCEDURE PUR.CHECK_PO compile;
Alter PROCEDURE PUR.CHK_PO compile;
Alter PROCEDURE PUR.DETAIL_LOAD compile;
Alter PROCEDURE PUR.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE PUR.DT_SETPROPERTYBYID compile;
Alter PROCEDURE PUR.MASTER_LOAD compile;
Alter PROCEDURE PUR.PRO_PO_CORRECT compile;
Alter PROCEDURE PUR.TMP_AMD_INST compile;
Alter PROCEDURE PUR.TMP_INST compile;
Alter PROCEDURE PUR.TOT_VALUE compile;
Alter PROCEDURE QLTY.JCD compile;
Alter PROCEDURE RMCST.GIN_PROC compile;
Alter PROCEDURE RMCST.GIN_PROC166 compile;
Alter PROCEDURE RMS.OPEN compile;
Alter PROCEDURE SCOTT.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE SCOTT.DT_SETPROPERTYBYID compile;
Alter PROCEDURE SCOTT.QQ compile;
Alter PROCEDURE SCOTT.TT compile;
Alter PROCEDURE SCOTT.WWW compile;
Alter PROCEDURE SCOTT.YY compile;
Alter PROCEDURE SYSTEM.COMPILE_OBJECTS compile;
Alter PROCEDURE SYSTEM.TEMP_07062000GK compile;
Alter PROCEDURE TAMPR.DETPOST compile;
Alter PROCEDURE TAMPR.DT_DROPUSEROBJECTBYID compile;
Alter PROCEDURE TAMPR.DT_SETPROPERTYBYID compile;
Alter PROCEDURE TAMPR.NM1 compile;
Alter PROCEDURE TAMPR.PROCESS_WAGE_ARREARS compile;
Alter PROCEDURE TOOL_ROOM.BRK_SPACE compile;
Alter PROCEDURE TOOL_ROOM.POP_DIFF_ISS_DISC compile;
Alter PROCEDURE TOOL_ROOM.POP_DIFF_ISS_RIM compile;
Alter PROCEDURE WILDBA.BACK_TRACK compile;
Alter PROCEDURE WILDBA.BLR_OBSOLETE_KNOCK compile;
Alter PROCEDURE WILDBA.BLR_UPDATE_KNOCK compile;
Alter PROCEDURE WILDBA.BOT_CONV compile;
Alter PROCEDURE WILDBA.BRK_SPACE compile;
Alter PROCEDURE WILDBA.CB_ISS_QTY_UPD_RM_TS compile;
Alter PROCEDURE WILDBA.CB_ISS_QTY_UPD_TS compile;
Alter PROCEDURE WILDBA.CB_REC_ISS_QTY_UPD_RM compile;
Alter PROCEDURE WILDBA.CB_REC_QTY_UPD compile;
Alter PROCEDURE WILDBA.CB_REC_QTY_UPD_RM_TS compile;
Alter PROCEDURE WILDBA.CHECK2 compile;
Alter PROCEDURE WILDBA.CHECK_DIFF compile;
Alter PROCEDURE WILDBA.CLOSE_BALANCE_CUMM_LB_TS compile;
Alter PROCEDURE WILDBA.CLOSE_BALANCE_CUMM_NB_TS1 compile;
Alter PROCEDURE WILDBA.CLOSE_BALANCE_CUMM_NB_TS2 compile;
Alter PROCEDURE WILDBA.CLOSE_BALANCE_CUMM_RM_TS1 compile;
Alter PROCEDURE WILDBA.CLOSE_BALANCE_CUMM_RM_TS2 compile;
Alter PROCEDURE WILDBA.CLOSE_TEMP_POP compile;
Alter PROCEDURE WILDBA.CLOS_UPD_ISS compile;
Alter PROCEDURE WILDBA.CLSUPD compile;
Alter PROCEDURE WILDBA.CODES compile;
Alter PROCEDURE WILDBA.COMPARE_VALUE compile;
Alter PROCEDURE WILDBA.COMPILE_OBJECTS compile;
Alter PROCEDURE WILDBA.COMP_CODE_UPD compile;
Alter PROCEDURE WILDBA.COMP_UPD compile;
Alter PROCEDURE WILDBA.CRE_AUG_OPEN compile;
Alter PROCEDURE WILDBA.DEC_CLOS_UPD compile;
Alter PROCEDURE WILDBA.DSINVUPDATE compile;
Alter PROCEDURE WILDBA.EDCORRECTION compile;
Alter PROCEDURE WILDBA.FIND_ITEM_ASSESABLE_VALUE compile;
Alter PROCEDURE WILDBA.GETVA compile;
Alter PROCEDURE WILDBA.GET_MODVAT compile;
Alter PROCEDURE WILDBA.GIN_VALUE_CORRECTION compile;
Alter PROCEDURE WILDBA.GS_GIN_CORR1 compile;
Alter PROCEDURE WILDBA.GS_GIN_CORR3 compile;
Alter PROCEDURE WILDBA.INREPORT compile;
Alter PROCEDURE WILDBA.INREPORTPRO compile;
Alter PROCEDURE WILDBA.INVOICE_UPDATE compile;
Alter PROCEDURE WILDBA.ISS_CLOSE compile;
Alter PROCEDURE WILDBA.ITMMAST compile;
Alter PROCEDURE WILDBA.KK1 compile;
Alter PROCEDURE WILDBA.KNOCK1 compile;
Alter PROCEDURE WILDBA.MARCH compile;
Alter PROCEDURE WILDBA.NETBAL compile;
Alter PROCEDURE WILDBA.OPEN compile;
Alter PROCEDURE WILDBA.OPWIP compile;
Alter PROCEDURE WILDBA.P1 compile;
Alter PROCEDURE WILDBA.PACK_LIST_NO_UPDATE compile;
Alter PROCEDURE WILDBA.PDCHECK compile;
Alter PROCEDURE WILDBA.PERD_CORR compile;
Alter PROCEDURE WILDBA.PKDUPDATE compile;
Alter PROCEDURE WILDBA.POPINV compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_DISC compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_DISC_TD compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_FLG compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_FLG_TD compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_LCK compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_LCK_TD compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_OTC compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_OTC_TD compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_PSH compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_RIM compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_RIM_TD compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_SFLG compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_SFLG_TD compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_WHEEL compile;
Alter PROCEDURE WILDBA.POP_DIFF_ISS_WITS compile;
Alter PROCEDURE WILDBA.POTLDETCV compile;
Alter PROCEDURE WILDBA.PO_AMD_UPD compile;
Alter PROCEDURE WILDBA.PO_GIN_UP compile;
Alter PROCEDURE WILDBA.PRODUMP compile;
Alter PROCEDURE WILDBA.PRO_OPEN_CUR compile;
Alter PROCEDURE WILDBA.PRO_WARE_CODE compile;
Alter PROCEDURE WILDBA.PR_FIFO compile;
Alter PROCEDURE WILDBA.PSNOWISE compile;
Alter PROCEDURE WILDBA.PTLSTK compile;
Alter PROCEDURE WILDBA.PTNSTK compile;
Alter PROCEDURE WILDBA.RECP_CLOSE compile;
Alter PROCEDURE WILDBA.REPTLCONV compile;
Alter PROCEDURE WILDBA.SC_RCT_UPD_TOOL compile;
Alter PROCEDURE WILDBA.SEP_OPEN_UPDATION compile;
Alter PROCEDURE WILDBA.SEP_RATE_FOR_NT compile;
Alter PROCEDURE WILDBA.SP_CHK_CBOB compile;
Alter PROCEDURE WILDBA.SP_CHK_LAN compile;
Alter PROCEDURE WILDBA.SP_COR_RATE compile;
Alter PROCEDURE WILDBA.SP_CST_CHECK_CONV compile;
Alter PROCEDURE WILDBA.SP_UPD_ISSUE compile;
Alter PROCEDURE WILDBA.STK_UPD compile;
Alter PROCEDURE WILDBA.STK_VER_TEMP_PROC compile;
Alter PROCEDURE WILDBA.TEST1 compile;
Alter PROCEDURE WILDBA.TLDET_POP compile;
Alter PROCEDURE WILDBA.TOOL_CHK compile;
Alter PROCEDURE WILDBA.TOOL_CONV compile;
Alter PROCEDURE WILDBA.TOOL_DTL_STATUS_UPD compile;
Alter PROCEDURE WILDBA.TOOL_POP compile;
Alter PROCEDURE WILDBA.TOOL_STATUS_UPD compile;
Alter PROCEDURE WILDBA.TOT_VALUE compile;
Alter PROCEDURE WILDBA.TR_TOOLS_ORA00600 compile;
Alter PROCEDURE WILDBA.TSCST_RATE_UPD_RM compile;
Alter PROCEDURE WILDBA.TST compile;
Alter PROCEDURE WILDBA.TST_AUTO_PR compile;
Alter PROCEDURE WILDBA.UPD compile;
Alter PROCEDURE WILDBA.UPDATEDATA compile;
Alter PROCEDURE WILDBA.UPDATEVALUED compile;
Alter PROCEDURE WILDBA.UPDATE_DISC_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_FLG_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_LCK_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_OTC_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_PEND_INSP_QTY compile;
Alter PROCEDURE WILDBA.UPDATE_PERD_RUNN_TRNNO compile;
Alter PROCEDURE WILDBA.UPDATE_PRIM_SECN_CC compile;
Alter PROCEDURE WILDBA.UPDATE_PSH_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_RIM_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_SFLG_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_VAL compile;
Alter PROCEDURE WILDBA.UPDATE_WHEEL_ISS compile;
Alter PROCEDURE WILDBA.UPDATE_WITS_ISS compile;
Alter PROCEDURE WILDBA.UPD_ITEM_MAST compile;
Alter PROCEDURE WILDBA.UPD_ROUT_PLINE compile;
Alter PROCEDURE WILDBA.USERS compile;
Alter PROCEDURE WILDBA.VAL_UPD compile;
Alter PROCEDURE WILDBA.WOTLCONV compile;
Alter PROCEDURE WILDBA.X compile;
Alter TRIGGER GUEST.COMPTYPE compile;
Alter TRIGGER NEWUSER.DEL_DISC compile;
Alter TRIGGER NEWUSER.DEL_FLANGE compile;
Alter TRIGGER NEWUSER.DEL_OTHER_COMP compile;
Alter TRIGGER NEWUSER.DEL_PART compile;
Alter TRIGGER NEWUSER.DEL_RIM compile;
Alter TRIGGER NEWUSER.DEL_SPRING_FLANGE compile;
Alter TRIGGER NEWUSER.DEL_WHEEL compile;
Alter TRIGGER NEWUSER.ITEM_QTY_UPD_TRIG compile;
Alter TRIGGER NEWUSER.MRP_BATCH_ITEM_DEL_TRIG compile;
Alter TRIGGER NEWUSER.MRP_COMP_SUMM_INS_TRIG compile;
Alter TRIGGER NEWUSER.MRP_COMP_SUMM_UPD_TRIG compile;
Alter TRIGGER NEWUSER.MRP_ITEM_SUMM_INS_TRIG compile;
Alter TRIGGER NEWUSER.MRP_ITEM_SUMM_UPD_TRIG compile;
Alter TRIGGER NEWUSER.MRP_WKYCOMP_SUMM_INS_TRIG compile;
Alter TRIGGER NEWUSER.MRP_WKYCOMP_SUMM_UPD_TRIG compile;
Alter TRIGGER NEWUSER.MTH_BUD_REP_TRIG compile;
Alter TRIGGER NEWUSER.TRIG_MFG_SHEAR_OUTPUT_DETL compile;
Alter TRIGGER PCH.ITEM_QTY_UPD_TRIG compile;
Alter TRIGGER TAMPR.LEAVEAPP_DTUTRIG compile;
Alter TRIGGER TAMPR.LEAVEDET_DTUTRIG compile;
Alter TRIGGER TAMPR.LV_APPLY_DTUTRIG compile;
Alter TRIGGER WILDBA.DEL_DISC compile;
Alter TRIGGER WILDBA.DEL_FLANGE compile;
Alter TRIGGER WILDBA.DEL_OTHER_COMP compile;
Alter TRIGGER WILDBA.DEL_PART compile;
Alter TRIGGER WILDBA.DEL_RIM compile;
Alter TRIGGER WILDBA.DEL_SPRING_FLANGE compile;
Alter TRIGGER WILDBA.DEL_WHEEL compile;
Alter TRIGGER WILDBA.ITEM_QTY_UPD_TRIG compile;
Alter TRIGGER WILDBA.MRP_BATCH_ITEM_DEL_TRIG compile;
Alter TRIGGER WILDBA.MRP_COMP_SUMM_INS_TRIG compile;
Alter TRIGGER WILDBA.MRP_COMP_SUMM_UPD_TRIG compile;
Alter TRIGGER WILDBA.MRP_ITEM_SUMM_INS_TRIG compile;
Alter TRIGGER WILDBA.MRP_ITEM_SUMM_UPD_TRIG compile;
Alter TRIGGER WILDBA.MRP_WKYCOMP_SUMM_INS_TRIG compile;
Alter TRIGGER WILDBA.MRP_WKYCOMP_SUMM_UPD_TRIG compile;
Alter TRIGGER WILDBA.MTH_BUD_REP_TRIG compile;
Alter TRIGGER WILDBA.PUR_REQN_DETL_GS_DTUTRIG compile;
Alter TRIGGER WILDBA.TRIG_MFG_SHEAR_OUTPUT_DETL compile;
Alter VIEW FASAL.EX_INV compile;
Alter VIEW FASAL.MIS_INV compile;
Alter VIEW MFG.SL_TEST_VIEW compile;
Alter VIEW MISQRY.V1 compile;
Alter VIEW NEW_INCENTIVE.ELIGIBLE_TECHNICIANS compile;
Alter VIEW NEW_INCENTIVE.T5307 compile;
Alter VIEW PACCOUNTS.COLUMN_LIST compile;
Alter VIEW PACCOUNTS.INDEX_LIST compile;
Alter VIEW PACCOUNTS.RMR_SCRAP compile;
Alter VIEW PACCOUNTS.RM_FRT compile;
Alter VIEW PACCOUNTS.RM_PKG compile;
Alter VIEW PACCOUNTS.TB_DEBIT compile;
Alter VIEW PACCOUNTS.TRANSANALYSIS compile;
Alter VIEW SCOTT.EMPDEPT compile;
Alter VIEW SCOTT.V1 compile;
Alter VIEW TAMPR.COLUMN_LIST compile;
Alter VIEW TAMPR.INDEX_LIST compile;
Alter VIEW TAMPR.LEAVEREG compile;
Alter VIEW WILDBA.BOM_WHEEL compile;
Alter VIEW WILDBA.EX_INV compile;
Alter VIEW WILDBA.MIS_INV compile;
Alter VIEW WILDBA.PS compile;
2. Shutdown immediate
a. All datafiles.
b. Controlfiles.
c. Logfiles.
d. Archive files.
e. Network files.
f. Password files.
g. pfile.
4. Keep copy one in tape and one in Disk other than production server.
d. No. of Controlfiles.
job.sql
Begin
dbms_job.submit(:jobno, 'p1;', sysdate, 'sysdate + 1');
end;
____________________________________________________________________
proce.sql
create or replace procedure p1 as
emprec sys.emp%rowtype;
begin
select n into emprec.n from sys.emp where n=100;
insert into sys.emp1 values(emprec.n);
dbms_output.put_line('Value inserted: ' || emprec.n);
end;
/
____________________________________________________________________
archi.txt
Architucture
=============
Instance- mem+process
MEMORY:
======
SGA
PGA
S/W Code area
SGA
DB buffer cache
Log buffer
Shared pool
Dic. cache
lib. cache
shared sql/private sql
pl/sql (shared/private)
large pool
Java-pool
PGA
user
oralce
server
dedicated
shared
background
5 Mandatory: SMON,PMON,DBWn,LGWR,CKPT
7 Optional: Arch0, SNPn, LCKn, RECO, Dnnn, Snnn, QMNn
DATABASE CREATION
=================
DATABASE STARTUP/SHUTDOWN
==========================
States of Database
====================
1. Closed
2. Nomount
3. Mount
4. Open
Shutdown normal/transactional/immediate/abort
Transactional: Wait for the users current transaction to end(commit or rollback) and
shutdown the
database
Immediate: Rollback the transactions of all the user, and shutdown the database.
backup.txt
backup
physical
logical
Physical
hot
cold
Hot backup should be taken when archivelog is enabled. Cold backup can
be taken even when archivelog is disabled.
3. Backup controlfile
alter database backup controlfile to 'dest'.
Logical backup.
Export.
Export options:
Import:
* User can only import objects to their own schema. Only DBA can import to other user.
____________________________________________________________________
Deferredrollback.sql
To simulate deferred RBS
6. Make the tablespace(TS1) online, and again enter the above query
____________________________________________________________________
exp imp examples.sql
Export:
=======
2. Exp by owner.
3. Exp by table.
6. Transportable tablespaces
Import:
=======
____________________________________________________________________
how to automate backup.txt
1. backup.bat.
2. backup.sql.
Contents of backup.bat:
Contents of backup.sql:
connect internal
alter tablespace ts1 begin backup;
host copy c:\oracle\demo\ts1.dbf c:\back.dbf
alter tablespace ts1 end backup;
____________________________________________________________________
how to rename db.txt
3. open the trace file in udump folder and change the line "CREATE CONTROLFILE
REUSE DATABASE
ARCHIVELOG".
____________________________________________________________________
lock.txt
when an user lock the table in this mode other user cannot update,insert or delete
but other user can select the table. and other users can lock the table.
other user can update,insert or delete the rows and other users can lock the table.
when an user lock the table in this mode other user cannot update, insert or delete
other user can only select the table. but other user cannot lock the tables.
row share lock
--------------
when an user locks the table in this mode other user can update, insert or delete and
when an user lock the table in this mode other user cannot update, insert or delete
other user can only select the table. but other user cannot lock the tables.
____________________________________________________________________
logical.txt
LOGICAL STRUCTURES
==================
Tablespace
Segments
Extents
Blocks
Tablespace
Locally managed
Dict. managed
Permenante
Temp.
Creation
Alter
Drop
Backup
Online/offline
Segment
Extents Views
Blocks
Segment
Types: Data, index, Temp., Rollback.
Row chaining,migration
____________________________________________________________________
pending offline.txt
____________________________________________________________________
snapshottooold.txt
NOTE: Before performing the following be sure that only one RBS in online.
1. create a table(t1).
2. insert upto 50,000 records.
3. commit the trans.
4. Open two more sessions.
5. in the first session, update all the records of t1.
6. do not commit the trans.
7. in the second session, select all the rec's of t1.
8. in the third session, delete all the rec's of t1.
sqlloader.txt
SQL Loader
The frist step in using this tool, is creating a control file(text file). The control file has
===============================================================
=================================
load data
infile 'c:\employee.txt'
bad 'c:\employee.bad'
insert
into table emp
(
emp_no position (1:3) integer external,
emp_name position (5:13) CHAR,
emp_age position (16:17) integer external
)
===============================================================
=================================
load data
infile *
append
into table emp
(
emp_no position (1:3) integer external,
emp_name position (5:13) CHAR,
emp_age position (16:17) integer external
)
begindata
100:abc :34
200:EEE :23
300:PPP :56
400:SSS :78
===============================================================
=================================
load data
infile 'c:\employee.txt'
badfile 'c:\emploee.bad'
discardfile 'c:\employee.dis'
replace
into table yoga.emp
(
emp_no integer external terminated by ':',
emp_name char terminated by ':',
emp_age position (16:17) integer external
)
===============================================================
=================================
SQLLoader syntax:
NOTE:
* All the unformatted data will be copied to bad file.
* All the data's which does not meet the table constraint are entered in discard file.
____________________________________________________________________
2. ORA-12545: Connect failed because target host or object does not exist
Check for either IP Address/Host name for the entry "Host" in tnsnames.ora
3. ORA-12505: TNS:listener could not resolve SID given in connect descriptor
This error might occur if the SID(service name) of the traget machine and the "SID" entry
in
This error message might occur, if the current user is not the owner of the DBlink. Logon
as the
-----------------------------------------------------------------------------------------------------------
--------------
this occurs if controlfile is older than data file, if ur unable to find new control file then
do the following:
now specify the current log file, and open the dbf using reset logs;
***********************************************************************
*****************
********************************************************
For a dictionary-managed temporary tablespace use -
CREATE TABLESPACE ... TEMPORARY;
while imp. if constraints=n then the indexes for the corrs. constraint (eg- primary key) is
not imported, even though the value of "indexes" is "y"
***********************************************************************
*******
if we move a table from one ts to another, then we need to move the indexes manually,
using the following command:
Rest of the dependent objects like proce, func,trigger remain in system ts.
***********************************************************************
****************
partition:
=========
alter table emp add partition p3 values less than (3000) tablespace tools storage(initial
20k next 20k);
alter table emp add partition p4 values less than (maxvalue) tablespace rman;
***********************************************************************
******************
cluster:
========
***********************************************************************
***************************
Let's assume name of the primary db "Localtest" and name of standby db as "standbydb"
NOTE: The init settings for standby db, is mentioned at end of this doc.
(or)
log_archive_start = true
log_archive_dest_1 = 'LOCATION=D:\localtest\archive'
log_archive_dest_2='SERVICE=standbydb'
log_archive_dest_state_1=ENABLE
log_archive_dest_state_2=ENABLE
log_archive_format = misbktest%s.arc
remote_login_passwordfile = NONE
init settings for standby db:
=============================
DB_FILE_NAME_CONVERT=('d:\localtest','d:\standbydb')
LOG_FILE_NAME_CONVERT=('d:\localtest','d:\standbydb')
LOCK_NAME_SPACE=STANDBY
remote_login_passwordfile = NONE
log_archive_start = true
log_archive_dest = D:\standbydb\archive
standby_archive_dest = D:\standbydb\archive
log_archive_format = misbktest%s.arc
***********************************************************************
******************************
DBMS_SHARED_POOL
================
This is used to pin pl/sql objects in memory. To create this package execute dbmspool.sql.
* dbms_shared_pool.keep('<owner.obj_name>','type');
type: cursor-c, proce,func,pack-p, trigger-r,seq-q.
To find out if an object is pinned in the Shared Pool, using the following query:
***********************************************************************
*******************************
Restrictions
============
1. Tablespace cannot be SYSTEM, offline, locally managed or Temporary (ORA-3245).
--> to migrate a temporary tablespace to local management, drop and recreate the
tablespace with the CREATE TEMPORARY TABLESPACE command. 2. Tablespace
must exist (ORA-959) with logged to tidy this up. 3. There must be enough free space in
the tablespace to accomodate the bitmaps. If there are any problems with the Locally
managed scheme, users can still return to dictionary management using the folowing
procedure : DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_FROM_LOCAL
Tablespace Name:
Name of the tablespace to be migrated.
Allocation Unit:
Unit size (which is the size of the smallest possible chunk of space that can be allocated)
in the tablespace.
Relative File Number:
Relative File Number of the file where the bitmap blocks should be placed (optional)
Allocation Unit may be specified optionally. The default is calculated by the system
based on the highest common divisor of all extents (used or free) for the tablespace. This
number is further trimmed based on the MINIMUM EXTENT for the tablespace (5 if
MINIMUM EXTENT is not specified). Thus, the calculated value will not be larger than
the MINIMUM EXTENT for the tablespace. The last free extent in every file will be
ignored for GCD calculation. If you specify the unit size, it has to be a factor of the UNIT
size calculated by the system, otherwise an error message is returned.
The Relative File Number parameter is used to place the bitmaps in a desired file. If
space is not found in the file, an error is issued. The datafile specified should be part of
the tablespace being migrated. If the datafile is not specified then the system will choose
a datafile in which to place the initial bitmap blocks. If space is not found for the initial
bitmaps, an error will be raised.
Usage Notes :
The tablespace must be kept online and read write during migration. Note that temporary
tablespaces cannot be migrated. Migration of SYSTEM tablespace is not permitted in this
release.
Example:
------------------------------------------------------------------------------------------------
To access TNSNAME from a shared network, map the drive and add the entry in the
following
reg value:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\TNS_ADMIN
----------------------------------------------------------------------------------------------
To configure mts(shared server):
LOCALTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = misdba)(PORT = 1521))
(CONNECT_DATA =
(service_name = localtest)
(SERVER = SHARED)
)
)
REBUILD INDEX
select 'alter index' ||' '|| owner ||'.'|| segment_name || ' '|| 'rebuild tablespace index_data;'
from dba_segments where
segment_type='INDEX' and owner not in('SYS','SYSTEM') and tablespace_name <>
'Index_data';
Analyze Table:
Select ‘analyze table’|| ‘ ’|| owner ||’.’|| table_name || ’ ’ ||’compute statistics;’
From dba_tables;
SQL LOADER:
Control file:aa.ctl
LOAD DATA
INFILE 'c:\LODER\PERD_050407.csv'
INTO TABLE PERD_TRANS_NEW_TS_050407 Truncate
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '^'
TRAILING NULLCOLS
(PTN_SRL_NO,
PTN_TOOL_SRL_NO,
PTN_TRAN_TYPE,
PTN_SEQ_NO,
PTN_DOCU_NO,
PTN_DOCU_DATE,
PTN_ENTR_DTTM,
PTN_WIL_FIN_TRAN_QTY,
PTN_WIL_SF_TRAN_QTY,
PTN_BOT_FIN_TRAN_QTY,
PTN_BOT_SF_TRAN_QTY,
PTN_IMP_NO,
PTN_SUPP_CODE,
PTN_PORD_NO,
PTN_PORD_DATE,
PTN_VALUE,
PTN_PRIM_CC,
PTN_SECN_CC,
PTN_VALUED_DT,
PTN_VALUED_YN,
PTN_RUNN_TRNNO)