Welcome to SqlAdvice Sign in | Join | Help

Browse by Tags

All Tags » Sql Server » SQL   (RSS)

Change Login's Default Database in SQL Server

If you have ever dropped a database and found yourself not able to login because your default database no longer exists you know it can be quite annoying. You can still connect through query analyzer by connecting to a different database, but you won't
Posted by gstark | 1 Comments

Enable XP_CMDSHELL in SQL Server 2005

I needed to use xp_cmdshell recently and discovered that it isn't on by default on SQL Server 2005. I had to dig a bit to find out how to enable it. The code is very simple. Figured I would blog it here so I can easily find it next time. EXECUTE sp_configure
Posted by gstark | 1 Comments

Move TempDB Sql Server 2005

I recently needed to move the TempDB on my Sql Server so I looked in Books Online and my initial thought based on what it said was that there is no way that will work. Basically it says to find where the files are, and then move them to the new location
Posted by gstark | 3 Comments

SQL Server 2005 Templates

I have found the SQL Server 2005 templates to be extremely useful. I have created custom templates for creating a new stored procedure, scalar functions, table-value functions and views. The benefit of these is that it creates a standard for creating

Sql Server Cursor Template

This is a template that I have been using in SQL server for when I do have to write cursors. Notice that there is only one fetch statement in there which is much slicker than the typical method of initially doing a fetch, with a while condition of while
Posted by gstark | 1 Comments
Filed under: , ,