Find locked SQL accounts on SQL 2005

We are in the process of upgrading a Microsoft product that just hasn’t gotten around to integrating with AD and uses SQL accounts.  It also has a really bad habit of locking SQL accounts if your AD policy for failed login attempts is set low.  So I got tired of searching through SSMS to unlock [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments
AD

Find all Triggers

I was asked to find all tables in a database that had a DML trigger so a developer could ensure that all the old functionality was available in the new database.  So once I built my query to give me the information, I thought I’d save it here for future use.
select a.name as ‘Trigger’, b.name [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

SKU is Invalid when installing 2nd node in SQL 2008

I was installing SQL Server 2008 on a Windows 2008 cluster the other day and I received and error:  ‘The current SKU is Invalid’.  So I went looking for the resolution.  I came across  a blog post by Vittorio Pavesi that pointed me to the answer.  I did not take the course of copying the [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Stored Procedure with Execute as

We have a database that holds information that is fairly personal, so much that the application team that supports it may only have read access to the database.  There came a need to occasionally lock all the administrators out of the system for updates.  These updates will occur every few months.  So I created a [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Renaming a SQL server

Here’s a little simple one that I’ll probably need again, so I thought I’d just blog it:
How to rename a SQL server used mostly when the windows server it resides on changes names:
To change the name of a default instance of SQL, run the following procedures:
sp_dropserver <old_name>
GO
sp_addserver <new_name>, local
GO
To change the name of a named [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Cleaning up the disk

When I became our companies MSSQL DBA I inherited an smooth running machine.  My predecessors were extremely talented and their scripts did everything we needed done.  But I can’t just live off their hard work, I need to leave my mark on the environment.  So I am tweaking some of their scripts to get rid [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Find the Windows Server Name

I was working with SQL2000 on a windows cluster.  I needed to write the results of a query to a test file on the local drive.  I was using @@servername to get the server name to write the file.  Unfortunately that appends the instance name and gave me a problem.  So I went looking for [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Update: Degrees of Parallelism

Well, it’s been 10 days since I started to play with parallelism on this server.  I have gotten the self blocking to stop.  My CPU utilization has stabalized and my phone is not ringing.  So I think that the issues is mitigated.  I finally settled on Max Degrees of Parallelism of 2 and the Cost [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Things You Know Now

Denny Cherry tagged me in a blog thread with a question asking “What do you wish you knew when you started?”.  So here you go.  As you know I am still relatively new to the SQL profession so I’m still figuring out what I don’t know.  I seem to find several every day, so I’m [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Starting up database ‘SomeDbName’

I love it when I learn something within a half hour of getting to work.  I had an unrelated alert on a vendor supplied database server.  As I was investigating that problem I came across two things.  One was funny, one I actually learned something.  First the funny: they had named the sysadmin account ‘God’.  [...]

Tags:

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments
 Page 1 of 2  1  2 »