Wednesday, December 29, 2010

Kill Job in oracle expdp utility

When you are inside the session that started the expdp,
then just ctrl+C will get you to the
EXPDP> prompt from where you can issue KILL_JOB command to kill the session you are in.
Issue help for more commands in that control utility.



Export> STOP_JOB=IMMEDIATE
Are you sure you wish to stop this job ([y]/n): y

The job is placed in a stopped state and exits the client.

After finishing his other work, the DBA wants to resume the export job and the client machine from where he actually started the job is locked because, the user has locked his/her cabin. So now the DBA will go to another client machine and he reattach to the job by typing the following command

$expdp system/oracle ATTACH=SYS_EXPORT_SCHEMA_01

 expdp backup ATTACH=SYS_EXPORT_SCHEMA_16

After the job status is displayed, he can issue the CONTINUE_CLIENT command to resume logging mode and restart the myfulljob job.

Export> CONTINUE_CLIENT

select * from DBA_DATAPUMP_JOBS;

Sunday, December 26, 2010

Tuesday, December 14, 2010

recreate emctl

#emca -repos recreate


Database SID: bossarc
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: y


#emca -deconfig dbcontrol db


#emca -config dbcontrol db

session browser

SELECT ROUND (BITAND (s.ownerid, 65535)) parent_session_sid,
ROUND (BITAND (s.ownerid, 16711680) / 65536) parent_session_instid,
s.saddr, s.SID, s.serial#, s.audsid, s.paddr, s.user#, s.username,
s.command, s.ownerid, s.taddr, s.lockwait, s.status, s.server,
s.schema#, s.schemaname, s.osuser, s.process, s.machine, s.port,
s.terminal, UPPER (s.program) program, s.TYPE, s.sql_address,
s.sql_hash_value, s.sql_id, s.sql_child_number, s.sql_exec_start,
s.sql_exec_id, s.prev_sql_addr, s.prev_hash_value, s.prev_sql_id,
s.prev_child_number, s.prev_exec_start, s.prev_exec_id,
s.plsql_entry_object_id, s.plsql_entry_subprogram_id,
s.plsql_object_id, s.plsql_subprogram_id, s.module, s.module_hash,
s.action, s.action_hash, s.client_info, s.fixed_table_sequence,
s.row_wait_obj#, s.row_wait_file#, s.row_wait_block#,
s.row_wait_row#, s.top_level_call#, s.logon_time, s.last_call_et,
s.pdml_enabled, s.failover_type, s.failover_method, s.failed_over,
s.resource_consumer_group, s.pdml_status, s.pddl_status, s.pq_status,
s.current_queue_duration, s.client_identifier,
s.blocking_session_status, s.blocking_instance, s.blocking_session,
s.final_blocking_session_status, s.final_blocking_instance,
s.final_blocking_session, s.seq#, s.event#, s.event, s.p1text, s.p1,
s.p1raw, s.p2text, s.p2, s.p2raw, s.p3text, s.p3, s.p3raw,
s.wait_class_id, s.wait_class#, s.wait_class, s.wait_time,
s.seconds_in_wait, s.state, s.wait_time_micro,
s.time_remaining_micro, s.time_since_last_wait_micro, s.service_name,
s.sql_trace, s.sql_trace_waits, s.sql_trace_binds,
s.sql_trace_plan_stats, s.session_edition_id, s.creator_addr,
s.creator_serial#, s.ecid
FROM v$session s
WHERE ( (s.username IS NOT NULL)
AND (NVL (s.osuser, 'x') <> 'SYSTEM')
AND (s.TYPE <> 'BACKGROUND')
)
ORDER BY "USERNAME", ownerid

Monday, December 13, 2010

Wednesday, December 8, 2010

find object inside the code

select * from dba_source where upper(text) like '%@DEALER%';