Tag: write

Lessons on writing batch scripts

Lesson on learning how to write batch scripts to automate on Windows http://www.allenware.com/icsw/icswidx.htm

How to set database read only/read write?

In SQL Server 2005 using the SQL below one can make the database read-only/read-write. -- set database to read only ALTER DATABASE AdventureWorks SET READ_ONLY -- to view/check database is read only EXEC sp_dboption 'AdventureWorks', 'read only' OptionName CurrentSetting ----------------------------------- -------------- read only ON -- set database read write ALTER DATABASE AdventureWorks SET READ_WRITE -- … Continue reading How to set database read only/read write?

How to find the IO stats of filesystem?

Using v$filestat one can find the physical reads and writes to datafiles it also includes reads done by RMAN. So using this SQL one can find physical read and write on a filesystem. Note: The data reported is since the database started. SQL> column filesystem format a40 SQL> SELECT substr(vdf.name, 1, instr(vdf.name, '/', -1)) filesystem, … Continue reading How to find the IO stats of filesystem?

How to write a message to the alert log for testing

If you need to test you monitoring solution, this can be handy to directly write to the archive log. execute sys.dbms_system.ksdwrt(2,to_char(sysdate)|| ' 99 '); execute sys.dbms_system.ksdwrt(2,('ORA-07445: Alexs OEM Monitoring Test'));