You are currently browsing the Blog weblog archives for May, 2008.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| « Apr | Jun » | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
- IIS (1)
- Open Source (1)
- Performance (3)
- Personal (2)
- Powershell (1)
- SQL (1)
- SQL Server (20)
- T-SQL (14)
- Uncategorized (6)
- Utilities (4)
- Windows OS (13)
- 23. August 2010: Alert for long-running SQL datbase backups
- 7. April 2010: Learning SMO & Powershell
- 25. February 2010: SQL Generators for moving database files
- 28. January 2010: Index to Filegroup mapping
- 20. January 2010: PowerShell Script to Clean Up Old Files Based on Age
- 7. January 2010: Quick & Dirty way to identify orphan files
- 29. July 2009: Trigger Mass Enable / Disable
- 29. June 2009: Moving Master and Resource databases
- 11. June 2009: Quick and Dirty CSV import to SQL Server
- 2. February 2009: Getting data file space usage
Archive for May 2008
Oracle Sysdate formatting
23. May 2008 by Bennett.
You can use the PL-SQL to_char function to format the output of SYSDATE like this:
select to_char(sysdate,’DD/MM/YYYY HH24:MI:SS’) from dual;
Posted in SQL | Print | No Comments »
The Good Books
7. May 2008 by Bennett.
I used several books to study for the ICCP DBA exam including:
- Modern Database Management, 8th Edition by Hoffer, Prescott and McFadden
- Database Systems: Design, Implementation & Management 6th Edition by Rob and Coronel
- Database Administration: The complete Guide to Practices and Procedures by Craig S. Mullins
- An Introduction to Database Systems 5th Editon by C.J. Date
Of these, Modern Database Management was my favorite. Chapter 6 of this book covers physical database design and performance. There is a section in this book that has guideline for improving query performance. Here are a few of the recommendations:
- Use compatible data types, i.e., avoid type conversions
- Write simple queries
- Break complex queries into multiple, simple parts
- Don’t nest one query inside another (just because you can use a subquery doesn’t always mean that you should)
- Don’t combine a table with itself, i.e. avoid self-joins.
- Create temporary tables for groups of queries.
Posted in T-SQL | Print | No Comments »
Remote Reboot
4. May 2008 by Bennett.
Today while applying patches to a couple of mission-critical servers, I was reminded of something: reboots issued through the terminal services client are not always successful. The server can get stuck in an odd state where it is running but terminal services is not working. For me the workaround has been to issue a remote reboot command using the shutdown utility:
shutdown /r /m \\server_name_to_reboot /t 0 /f
Posted in Windows OS | Print | No Comments »