Category: SQLServer

  • Archiving old mail and mail attachment in SQL Server 2005

    In this blog post, I gave out script to set up database mail for Sql Server 2005, if you already have smtp server up and running. One thing you need to pay attention to is that Sql Server 2005 logs all those mail messages into msdb database, including mail attachments, if any. You probably can…

  • Hot fix for SP4 is cluster-aware

    Service Pack 4 for Sql Server 2000 introduced a bug. After it is installed, if Address Windowing Extentions (AWE) support is enabled, a single instance of SQL Server 2000 can only use a maximum of 50 percent of the physical memory that is on the server. Microsoft has a hot fix for that problem here.…

  • CTAS and Select Into

    In both Oracle and MySQL, you can do: create table T1 as select * from T1 This CREATE TABLE AS statement basically clones table T1 with its structure and data in T2. This can be pretty handy at times. The equivalent of that in Sql Server is SELECT INTO. For example, you can do: select…

  • Sql Server GUI display setting for easy viewing

    This is a little note for myself, when overhead projector is involved. Your milage may vary. Query Analyzer, options window: General tab: change Query File Directory to c:\MyPreferredFolder Fonts tab: Editor -> Arial Black, size 16 Fonts tab: Results Text -> Courier New 18 Fonts tab: Selected Text -> Foreground black, Background yellow Windows display…

  • Delete permission implementation differences

    I mentioned when grant statements take into effect in Sql Server, MySql, and Oracle here. I found out recently that there are some implementation differences when you grant only delete permission on a table to a user. MySql and Sql Server do this the same way, whereas Oracle is different. Suppose you have: 1. Table…