সোমবার, ৩০ মার্চ, ২০২০

SQL Tuning Advisor

DECLARE
  l_sql_tune_task_id  VARCHAR2(100);
BEGIN
  l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
                          sql_id      => '3rfdxk7fxh9b9',
                          scope       => DBMS_SQLTUNE.scope_comprehensive,
                          time_limit  => 60,
                          task_name   => '3rfdxk7fxh9b9_tuning_task11',
                          description => 'Tuning task1 for statement 87s8z2zzpsg88');
  DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
/


XEC DBMS_SQLTUNE.execute_tuning_task(task_name => '3rfdxk7fxh9b9_tuning_task11');



set long 65536
set longchunksize 65536
set linesize 100
select dbms_sqltune.report_tuning_task('3rfdxk7fxh9b9_tuning_task11') from dual;



execute dbms_sqltune.drop_tuning_task('3rfdxk7fxh9b9_tuning_task11');

বুধবার, ১৮ মার্চ, ২০২০

EXP AND EXPDP

@echo off
REM
SET dirname="%date:~-7,2%-%date:~-10,2%-%date:~-4%"
mkdir \\192.168.1.99\Delowar-IT\EXP_BACKUP\%dirname%                     

set oracle_sid=ala
setlocal
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do set DATE=%%c-%%b-%%a
for /f "tokens=1-3 delims=: " %%a in ('time /t') do (
set hours=%%a
set minutes=%%b
set ampm=%%c
)
if {%ampm%}=={AM} if {%hours%}=={12} set hours=00
if {%ampm%}=={PM} (
for /f "delims=0 tokens=*" %%a in ("%hours%") do set hours=%%a
set /a hours+= 12
)

E:\database2\product\11.2.0\dbhome_1\BIN\exp labserp/drockfantasi29@dba file=\\192.168.1.99\Delowar-IT\EXP_BACKUP\\%dirname%\lan_%date%_%hours%.%minutes%_%ampm%.dmp  log=\\192.168.1.99\Delowar-IT\EXP_BACKUP\\%dirname%\lan_%date%_%hours%.%minutes%_%ampm%.log statistics=none



@echo off
REM
SET dirname="%date:~-7,2%-%date:~-10,2%-%date:~-4%"
--mkdir \\192.168.1.99\Delowar-IT\EXP_BACKUP\%dirname%                     

set oracle_sid=ala
setlocal
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do set DATE=%%c-%%b-%%a
for /f "tokens=1-3 delims=: " %%a in ('time /t') do (
set hours=%%a
set minutes=%%b
set ampm=%%c
)
if {%ampm%}=={AM} if {%hours%}=={12} set hours=00
if {%ampm%}=={PM} (
for /f "delims=0 tokens=*" %%a in ("%hours%") do set hours=%%a
set /a hours+= 12
)

E:\database2\product\11.2.0\dbhome_1\BIN\expdp labstest/labstest@bidba directory=expdp_dir dumpfile=expdp_%date%_%hours%.%minutes%_%ampm%.dmp logfile=expdp_%date%_%hours%.%minutes%_%ampm%.log network_link=source