Skip to content
SQLInsight

SQLInsight

We Do SQL Right!

  • What’s New
  • Power BI Gallery
  • PowerPoint Downloads
  • About Us
  • Contact Us
  • Home
  • SQL 2005
  • Page 2

Category: SQL 2005

Determine “Locked Paged” use across your domain…

February 28, 2012 Steve Schneider

So, building on my previous blog entry, now, let’s open a multi-server query and run this script that follows.  It will tell you for each server it’s version and how much memory is in locked pages.

SQL 2005, SQL 2008, SQL AdministrationLeave a Comment on Determine “Locked Paged” use across your domain…

Programmatically act on SQL Version

February 28, 2012 Steve Schneider

I often have scripts that run across multiple versions of SQL … more and more 2008’s and less and less 2000’s.  In doing so, i need to take different actions based on that version.  Here’s the simple technique that i…

Read more

SQL 2000, SQL 2005, SQL 2008, SQL AdministrationLeave a Comment on Programmatically act on SQL Version

MSDB db too big?

January 10, 2012 Steve Schneider

Microsoft provides “sp_delete_backuphistory ‘6/1/2011’“.   However, this can take a very long time unless you also add indexes to the backup table.  This is what did the trick for me: Create Nonclustered index idx_backupset_finishdate ON backupset (backup_finish_date) INCLUDE (backup_set_id, media_set_id) What…

Read more

Performance Tuning, SQL 2005, SQL 2008, SQL AdministrationLeave a Comment on MSDB db too big?

Impersonation, Execute As & Remote queries

December 30, 2011 Steve Schneider

This week i had a developer creating a process (job) where a database user was to have authority to query remote machines.  To debug the process the developer needed to assume the role of the user running in the application.  In…

Read more

SQL 2005, SQL 2008, SQL AdministrationLeave a Comment on Impersonation, Execute As & Remote queries

DB mail Query parameter not working

December 23, 2011 Steve Schneider

On one of my servers the query parameter just wasn’t working.  I kept getting this error: Msg 22050, Level 16, State 1, Line 0 Error formatting query, probably invalid parameters Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 504…

Read more

SQL 2005, SQL 2008Leave a Comment on DB mail Query parameter not working

SQL Server’s Auto Growth settings

December 20, 2011 Steve Schneider

Over the last week I’ve been finding an unusual number of log file growths.  I did some investigation and found a good script to help me track what was the current status for file growths.  It is as follows:

SQL 2005, SQL 2008, SQL AdministrationLeave a Comment on SQL Server’s Auto Growth settings

Count your lines of code

November 1, 2011 Steve Schneider

How much code has gotten into production?  How many different objects have this code?  Isn’t that also a measure of just how ‘big’ your responsibility is?  If you have a massive application with thousands of stored procs and functions…guess who…

Read more

SQL 2005, SQL 2008, SQL AdministrationLInes of Code;Leave a Comment on Count your lines of code

Finding SQL Server’s Full-Text indexes

October 24, 2011 Steve Schneider

I have a lot of servers.  Full-Text operations sort of slipped up on me.  Then, a developer asked for assistance…in particular who else was using full-text that he could ask for guidance?  I couldn’t tell him.  That got me started…

Read more

SQL 2005, SQL 2008, SQL AdministrationFull-Text indexLeave a Comment on Finding SQL Server’s Full-Text indexes

Drop user who owns a Schema

September 28, 2011 Steve Schneider

How often are you deleting users and you get the warning that this user owns a schema and the schema is going to get dropped also…and are you sure you want to do this? … And no, you’re not really…

Read more

SQL 2005, SQL 2008, SQL Administrationdrop user, SQL SchemaLeave a Comment on Drop user who owns a Schema

Character selection by location in a string

August 31, 2011 Steve Schneider

Suppose you had a 4 character field (prefx), and you wanted to find all those records where the 2nd and 4th characters were numeric, with the other two being alphabetic.  Here’s a neat, simple solution: select * from TableName where prefx…

Read more

SQL 2005, SQL 2008, SQL AdministrationSQLLeave a Comment on Character selection by location in a string

Posts pagination

Previous 1 2 3 Next
Copyright SQL Insight 2017 © All rights reserved.
Business Era by mProThemes