Lesson on learning how to write batch scripts to automate on Windows http://www.allenware.com/icsw/icswidx.htm
Tag: write
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?