//
archives

Oracle

This category contains 14 posts

Find Slow/Worst Query in Database

1. SQL Server Sql Server haven’t monitoring GUI for finding worst query may be need optimized, but can use this sql script SELECT TOP 10 SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.TEXT) ELSE qs.statement_end_offset END – qs.statement_start_offset)/2)+1), qs.execution_count, qs.total_logical_reads, qs.last_logical_reads, qs.total_logical_writes, qs.last_logical_writes, qs.total_worker_time, qs.last_worker_time, qs.total_elapsed_time/1000000 total_elapsed_time_in_S, qs.last_elapsed_time/1000000 last_elapsed_time_in_S, qs.last_execution_time, qp.query_plan FROM sys.dm_exec_query_stats qs CROSS … Continue reading

Connection to host as user administrator failed: ERROR: Wrong password for user, Oracle Backup Schedule

You have to provide the ‘Log on as a batch job’ privilege: 1. Go to control panel/administrative tools a. click on “local security policy” b. click on “local policies” c. click on “user rights assignments” d. double click on “log on as a batch job” e. click on “add” and add the user that was … Continue reading

Oracle Date and Time

A. Getting Year, Month, Day from Date SQL> — EXTRACT(): return a year, month, day, hour, minute, second, or time zone from x; SQL> SQL> SELECT EXTRACT(YEAR FROM TO_DATE(’01-JAN-2005 19:15:26′,’DD-MON-YYYY HH24:MI:SS’)) AS YEAR FROM dual; YEAR ———- 2005 B. Date Format & Number Format TO_CHAR Convert a numeric or date expression to a character String. … Continue reading

Backup Oracle Pump using batch DOS command

create file (example : exportday.bat) write file with this script: @echo off echo Start export Data …. sqlplus system/oracle10g@live @export.sql echo Create DMP File …. ExportDayLog.bat echo Export finished exit then create file export.sql. with SQL script: set heading off spool ExportDayLog.bat select ‘exp system/oracle10g@live full=yes file=backup_’||to_char(sysdate,’ddmmrrrrhh24miss’) from dual; spool off exit File result will … Continue reading

Starting the Oracle Enterprise Manager Console

Before starting OEM Oracle web version starting OEM service : 1. Run > type “cmd” > 2. c:\> emctl start dbconsole 3. Open your browser and type on address : http://<host&gt;:1158/em/console/aboutApplication ___________________________________________________________________ Starting the Oracle Enterprise Manager Console To access the Oracle Enterprise Manager Console from a client browser, the dbconsole process needs to be … Continue reading

Oracle, TNS Listener Error in Windows

If you have those problem, follow this  intruction : Solution A.  Set Database and restart listener –  open cmd command ( start menu > run > type “cmd” <enter>) –  C:\> set ORACLE_SID=YOUR_ORACLE_DB –  C:\>lsnrctl stop –  C:\>lsnrctl start –  open windows service and starting Service[YOUR_ORACLE_SERVICE] start menu > run > type “services.msc” <enter> Solution … Continue reading

Oracle Job Schedule (Run Procedure with schedule)

Example Oracle job schedule : BEGIN DBMS_SCHEDULER.CREATE_JOB( job_name          =>  ‘bt_auto_schedule’, job_type          =>  ‘STORED_PROCEDURE’, job_action        =>  ‘bt_job’,–procedure name start_date        =>  TO_TIMESTAMP_TZ(’30-DEC-2008 00:00:00′,’DD-MM-YYYY HH24:MI:SS’), repeat_interval   =>  ‘FREQ = DAILY; INTERVAL = 1’); END; / BEGIN dbms_scheduler.enable(‘bt_auto_schedule’); END; /  — List all existing jobs: SELECT * FROM all_scheduler_jobs; — Disable temporary a job: BEGIN dbms_scheduler.disable(‘populate_nodes’, TRUE); END; / … Continue reading

EXPORT / IMPORT ORACLE (ORACLE DUMP)

Create database directories Execute the following commands to create a database directory. This directory must point to a valid directory on the same server as the database: Login SQLPlus 1. Start Menu > run > type “cmd” <enter> 2. c:\>set oracle_sid=<oracle_sid> 3. c:\>sqlplus system/<pwd> SQL> CREATE DIRECTORY dmpdir AS ‘/opt/oracle’; Directory created. SQL> GRANT read, … Continue reading

Installing Oracle 10g for Windows

Installing Oracle 10g database software : Insert Oracle CD , the autorun window opens automatically. If you are installing from network or hard disk, click setup.exe in the installation folder. The Oracle Universal Installer (OUI) will run and display the Select Installation Method Window. Choose Basic Installation: Select this option to quickly install Oracle Database … Continue reading

First ASP Classic Code : How to Install IIS 6.0 and Create Virtual Directory

A. Installing IIS (IIS 6.0) _____________________ This topic describes 3 methods for installing IIS: • Using the Configure Your Server Wizard. • Using Add or Remove Programs from Control Panel. • Using unattended setup. This topic also lists the directories created on install, describes the IIS initial configuration backup, and briefly describes IIS optional components. … Continue reading

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 10 other subscribers
May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Archives

Web Statistic

Blog Stats

  • 187,124 hits