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
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
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
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
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>: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
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
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
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 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
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