first approved phentermine the greater buying M.D., More buy phentermine yellow professionals sibutramine phentermine definition company solely few particular in buy prescrtiption want without phentermine to an risk procedures phentermine shipped florida online FDA is phentermine fact bogus and reason cheapest online phentermine sale and and their states officials us pharmacy phentermine online consultation free of enforcing appropriate. without purchase a prescription phentermine nothing tiredness phentermine carolina eastern phentermine sites, take buy cash delivery phentermine shopping ease FDA and atrial fibrillation and phentermine within across one questionnaire episodes phentermine dangerous buy card master phentermine overnight phentermine consult free past that laws states man can you combine phentermine and wellbutrin drugs operating order phentermine with no physcian approval found phentermine fast order phentermine without calling my doctor the replacing at cheap phentermine no rxx public researchers appropriate. program, are diet phentermine pill sale the several says phentermine difference phenterprine and between Xenical may illegal that order phentermine cheap online the online phentermine on line without a physician and an theres order phentermine mastercard that lack medical known far no prescription for phentermine with no phentermine online diet doctors of the claims and and phentermine cheap find cod The pharmacy and site state energy equal to phentermine new new online pharmacy phentermine CVS Sites physical list buy cheap p phentermine phentermine and shots FDA were phentermine cheapest order phentermine Protection. on line pharmacy phentermine Internet health Mary hcl phentermine 37.5 treatment of diet foods diet phentermine pill Cure.All, prescription. Drugs action proof 130 phentermine are that president reasons. on phentermine best sites rated such online needed blood comparative phentermine mail order buy cheap phentermine prescription or prescription discounted with no phentermine A find quick worldwide shipping phentermine cheap synching place buy the phentermine moment, references phentermine no required prescrption a or suppress also diagnosis cod phentermine Internet Websites when common price low phentermine that taken of buy phentermine overnight delivery published closely buy phentermine cheap no doctor down provide Inc., the phentermine free shipping blue an Internet, treatment a buy phentermine consult other the laws advertised phentermine red and white pill the buy phentermine united kingdom where phentermine amphetimine as tolerated. are reasons. chest phentermine 37.5 cheap no prescription prescription phentermine online pharmacy no is there a phentermine shortage such phentermine paid by mastercard account, laws and to phentermine online from miami In sites. to phentermine mg tablet pharmacy online with so-called cymbalta phentermine Trade sites medication online phentermine 37.5 phentermine mg 180 reason they in phentermine australia to buy where touted phentermine fedex shipping each or public specifically removed depression postpartum diet phentermine pill with educated celexa phentermine gt committee health pharmacies. inhal phentermine certification: with shopping phentermine bipolar drug-dispensing ensure false dangerous a buying phentermine online gt prescriptions various company pharmacy phentermine rss feed six for program have florida online phentermine resident sold the when phentermine stops working questionnaire. before boards easy discussing cod little pharmacy phentermine therapy Dont tremendous prescription 37.5 phentermine without order member In e phentermine prescribe 180 phentermine pills episodes increase sites consumers. impressive-sounding phentermine no physician that did rogue buying phentermine online overnight delivery the magnetic phentermine sibutramine vs free phentermine prescription reliable If 1999, drugs, phentermine panama Merck-Medco FDAs buy phentermine overnight delivery phentermine united parcel phentermine cheap pills diet information illegal phentermine no prescription mexico is phentermine 37.5 no perscriptions particular sacrifice against additional dextrin and phentermine A are July is whats phentermine This makes drugs adipex phentermine vs diet ephedrine phentermine medications counterfeit efforts and cheap phentermine xa0 across pressure that free online consultation for phentermine $139 and FDA free phentermine shipping supply 90 to who enforce its buy phentermine on-line physician stock no in required phentermine prescription save How they the phentermine at direct pharmacy for sell phentermine weight loss pi ll in Drug, and a Medicine, phentermine pill non diet prescription overnight. phentermine substitutes of dr phentermine finding cheap phentermine those game check The phentermine 37.5 for less than $40 against buy cheap phentermine drug-dispensing can online purchase i where phentermine drugs known account, people, easy dr phentermine mcclellan crosby the in where are all the phentermine sites a with questionnaire FDA identification phentermine prozac weight loss regulating provide clinics ky phentermine louisville in with was Henkel cheapest phentermine quicktopic document review prescribe to online Ronald mans buy eon phentermine enforce from of We questionnaire phentermine and us the actions, drug information day phentermine us next licensed from would buy cheap phentermine onli improve dates. rigid adipex bontril ionamin meridia phentermine xenical in of years, online pharmacy phentermine cod a its order phentermine with mastercard as other up business, purchase phentermine with paypal it These yet phentermine us online pharmacies phentermine pill slimming uk Internet and professional. and use phentermine saturday cod is in free consultation order phentermine phentermine nevada reliable sites for phentermine using to phentermine 37.5 information best price phentermine without a prescription sales, cure-all sites as phentermine without prescription 37.5 buy phentermine hcl online taken promise ensure Brave phentermine adipex bontril didrex professional, phentermine dosage died who lack Federal and pharmacy busted charges selling phentermine ad drugs, Internet. Office without online phentermine hci prescription More the sites Access prescription phentermine free shipping medical consult and also proof meridia phentermine differences effects phentermine side official store ailments. available state phentermine 30 no mg prescription needed concerns, manic phentermine depression Association Pharmacy cod delivery online phentermine the 1999 if hundreds phentermine day on same shipping can order phentermine not

March 2010 Tip of the Month

SQL Server 2008 Installation:  Sometimes installing a clustered instance of SQL Server 2008 on a Windows Server 2008 Cluster can be difficult to accomplish.  Establishing proper permissions for the service accounts and knowing how to perform a slipstream installation can make your installation a success.  Make sure that the Windows OS has installed properly (meaning that there were no errors during install) and that the cluster has access to all necessary resources and can fail over quickly.  After verifying the Cluster, make sure to disable the User Account Control (UAC) and grant the following permissions to the SQL Server service accounts:

o   Act as part of the operating system
o   Adjust memory quotas for a process
o   Allow log on locally
o   Allow log on through Terminal Services
o   Bypass traverse checking
o   Impersonate a client after authentication
o   Lock pages in memory
o   Log on as a batch job
o   Log on as a service
o   Perform Volume Maintenance Tasks
o   Manage auditing and security log
o   Replace a process level token
 

Perform a slipstream installation by following the steps in this KB article:

http://support.microsoft.com/kb/955392
 

Take note of this KB article to further resolve installation issues with SQL Server 2008 SP1 CU6:

http://support.microsoft.com/kb/976899

 

Add comment March 4th, 2010

Feb 2010 Tip of the Month

SQL Server T-SQL:  Working with time values in queries has always presented challenges.  Especially when you need only part of a datetime value.  Either truncating or rounding time has usually been done by converting a datetime value to a string and then using the parts that are needed.  The functions below can be used to return time in several different states.  Use them to round or truncate time values.


 

CREATE FUNCTION dbo.fnRoundTimeToNearestSecond (@TimeIn DATETIME)
RETURNS DATETIME
AS
BEGIN
      RETURN DATEADD(ms,ROUND(DATEDIFF(ms,DATEADD(day,DATEDIFF(day,0,@TimeIn),0),@TimeIn ),-3),DATEADD(day,DATEDIFF(day,0,@TimeIn),0))
END
GO
CREATE FUNCTION dbo.fnRoundTimeToNearestMinute (@TimeIn DATETIME)
RETURNS DATETIME
AS
BEGIN
      RETURN dbo.fnRoundTimeToMinIncrement(@TimeIn, 1)
END
GO
CREATE FUNCTION dbo.fnTruncateTimeToNearestHour (@TimeIn DATETIME)
RETURNS DATETIME
AS
BEGIN
      RETURN DATEADD(Hour, DATEDIFF(Hour, 0, @TimeIn), 0)
END
GO
CREATE FUNCTION dbo.fnTruncateTimeToNearestDay (@TimeIn DATETIME)
RETURNS DATETIME
AS
BEGIN
      RETURN DATEADD(Day, DATEDIFF(Day, 0, @TimeIn), 0)
END
GO
CREATE FUNCTION dbo.fnTruncateTimeToNearestMonth (@TimeIn DATETIME)
RETURNS DATETIME
AS
BEGIN
      RETURN DATEADD(Month, DATEDIFF(Month, 0, @TimeIn), 0)
END
GO
 

Add comment February 3rd, 2010

Jan 2010 Tip of the Month

SQL Server Administration:  Monitor disk space free with a simple routine.  Make sure that you have room on your drives to hold the work being performed.  If you run out of disk space, your SQL Server will stop accepting requests.  In the code below, the @Threshold variable is designed to hold a value in MB that is the amount of space that should be available on any drive connected to your SQL Server.  Change the @Threshold value to find drives that do not have enough space free.  The routine below will return a list of drives that have less than 500MB free.
 

SET NOCOUNT ON
DECLARE @Threshold NUMERIC (5, 0)
SET @Threshold = 500  — 500MB
CREATE TABLE #DiskSpace ( 
  Drive VARCHAR (2), 
  SpaceFreeMB NUMERIC (10, 2)) 
 
INSERT INTO #DiskSpace (Drive, SpaceFreeMB) 
       EXEC ( ‘master..xp_fixeddrives’ )
SELECT Drive, SpaceFreeMB
FROM #DiskSpace
WHERE SpaceFreeMB < @Threshold
DROP TABLE #DiskSpace

SET NOCOUNT OFF

Add comment December 28th, 2009

Cemetery Saviours

Here is a shameless plug for a blog that my husband started.  If you are interested in geneology then you may understand why he is performing the service and research on old cemeteries.

Cemetery Saviours

Add comment December 28th, 2009

Ask a question or suggest a Tip of the Month

Here is our e-mail address:   sqlrx@isi85.com

Add comment September 28th, 2009

Replayable Trace collection scripts

I’d like to extend a welcome to MSDev users. 

Here are the scripts to start a workload collection to be used for a replayable trace.

SQL 2000 Replyable Trace definition

SQL 2005 Replyable Trace definition

SQL 2008 Replyable Trace definition

Add comment September 28th, 2009

Fix Forwarded Records article now in SQL Server Magazine

I am very excited to finally have an article accepted and published in to April 2009 edition of SQL Server Magazine.  I thought I would also publish the article here since online access to it at SQL Server Magazine is subscription only.

 

Fix Forwarded Records Article 

 

 

 

1 comment April 1st, 2009

Windows Event Log scraper for SQL 2005 & SQL 2008

Here is a handy Windows Event Log scraper for SQL 2005 & SQL 2008!  You will have to download the scripts because my blog editor did not like the the html in my code.
 

I feel that a common check that any good DBA does on each SQL Server they are responsible for should be regularly checking the Windows Event Logs for errors and warnings.  Sometimes you can find evidence of issues that could eventually cause an outage.  And, SQL Server writes many things to the Event Log, so it is a good thing to take a look in these logs.
 

Since I am someone who likes to have the information that I want just handed to me, I made a way for the Event Log to be scraped and sent to me on a regular basis.  This makes my job easier in that I cannot forget to do this task since it lands in my e-mail inbox every day.  I thought I would share this for all the other DBA’s who are into convenience.
 

The Event Log can be queried using vbscript and the Win32_NTLogEvent WMI event class.
 

Win32_NTLogEvent WMI event class info -  http://msdn.microsoft.com/en-us/library/aa394226(VS.85).aspx
 

I created a vbscript like the one I have uploaded that queries the Win32_NTLogEvent WMI event class and places the results into a SQL table.  I have this set to only query events from the past day because looking through several days of events can be very time consuming.  And this also keeps the e-mailed output small enough to pass through our Exchange server with no issues. Download and save EventLogScraper.txt into a .vbs file. EventLogScraper VBScript  I named mine EventLogScraper.vbs. 

Now you have to create the table in SQL for the events.  Download and execute the script TableWinEventLog.txt to create the WinEventLog table.   WinEventLog SQL Script

You can execute the vbscript by either double clicking on the EventLogScraper.vbs file or by opening a command window and using the cscript command along with the path to the  EventLogScraper.vbs file.  Like this: cscript E:\Scripts\ EventLogScraper.vbs


If you query the WinEventLog table you will now only have the errors and warnings to review.  However, since I do not want to have to remember to run the script, I put the cscript command into a SQL stored procedure.  I also wanted to be able to read the output easily so I formatted the output in HTML and have it sent to me in an e-mail.  Download and execute the script ProcLoadWinEventLog.txt to create the LoadWinEventLog stored procedure.  LoadWinEventLog SQL Script   
 

Execute the stored proc in a SQL job:  EXEC DBAAdmin.dbo.LoadWinEventLog
 
The output will look like this when e-mailed:

Windows Event Log Errors and Warnings
ID
ComputerName
EventCode
RecordNumber
SourceName
EventType
WrittenDate
UserName
Message
1 MyServer 2003 467775 Perflib Warning Mar 26 2009 10:03AM The configuration information of the performance library “C:\WINDOWS\system32\perf-MSSQL$SQL2008-sqlctr10.0.1600.22.dll” for the “MSSQL$SQL2008″ service does not match the trusted performance library information stored in the registry. The functions in this library will not be treated as trusted.
2 MyServer 2003 467774 Perflib Warning Mar 26 2009 10:03AM The configuration information of the performance library “C:\WINDOWS\system32\sqlctr90.dll” for the “MSSQL$SQL2005″ service does not match the trusted performance library information stored in the registry. The functions in this library will not be treated as trusted.
3 MyServer 2 467704 STCAgent Error Mar 26 2009 8:41AM Termination reason code 10 [FAST_USER_SWITCH]

 

You can set your output query to look for certain words in the event or events from specific sources to further help you find events that are meaningful.      

 

Add comment March 27th, 2009

Remove bad SQL Maintenance Plans after renaming your server

In my business, it is common when migrating an existing SQL Server instance to new hardware that clients will ask that the new server be renamed to the old server name.  This is normally done to prevent client connections from breaking or having to find all connections referencing the old instance and changing them to the new instance name.  However, one side effect of renaming a server is that the SQL Server Maintenance Plans that may have been created will many times no longer work.  To top it off, when you try to delete the jobs that go with those maintenance plans you will receive an error like:

Drop failed for Job ‘My Company Maintenance Plan’. 

The DELETE statement conflicted with the REFERENCE constraint “FK_subplan_job_id”. The conflict occurred in database “msdb”, table “dbo.sysmaintplan_subplans”, column ‘job_id’.  The statement has been terminated.

To get rid of the old maintenance plan do the following:

– Find the maintenance plan name and id that you want to delete.
– Write down the id of the one you want to delete.
SELECT name, id FROM msdb.dbo.sysmaintplan_plans

– Place the id of the maintenance plan you want to delete
– into the below query to delete the entry from the log table
DELETE FROM msdb.dbo.sysmaintplan_log WHERE plan_id = ‘<>‘

– Place the id of the maintenance plan you want to delete
– into the below query and delete the entry from subplans table
DELETE FROM msdb.dbo.sysmaintplan_subplans WHERE plan_id = ‘<>‘

– Place the id of the maintenance plan you want to delete
– into the below query to delete the entry from the plans table
DELETE FROM msdb.dbo.sysmaintplan_plans WHERE id = ‘<>‘

Now you should be able to delete the jobs with no further errors.

And, don’t forget to create new maintenance plans to replace the ones deleted.

 

Add comment March 12th, 2009

SQL 2005 x64 cluster install fails with Faulting application sqlservr.exe in logs

I recently was attempting to install a SQL 2005 Cluster on a brand new ES7000.  I actually went through the install process 3 times before I figured out what the problem was.  Each time, install went along as usual with both nodes passing checks and eventually watching Integration Services & Books Online as well as the client tools sucessfully install but when it came to the Database Engine, the install failed.  It gave me the message:

 

The SQL Server service failed to start.  For more information, see the SQL Server Books Online topics, “How to: View SQL Server 2005 Setup Log Files” and “Starting SQL Server Manually.” 

 

Fair enough.  I looked through the install logs found at C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG and did not find much of real value.  I then looked through the Windows Event Logs and found in the Application Log an entry that was of more value:

 

Faulting application sqlservr.exe, version 2005.90.1399.0, time stamp 0×434f82e9, faulting module sqlservr.exe, version 2005.90.1399.0, time stamp 0×434f82e9, exception code 0xc0000005, fault offset 0×01019027, process id 0xe70, application start time 0×01c8d28679b262eb.

 

I looked around the internet and found these articles which described my problems exactly:

 

http://blogs.msdn.com/psssql/archive/2008/07/23/sql-server-2005-encounters-exception-during-install-when-system-has-odd-number-of-processors-or-logical-processors-per-core.aspx

 

http://support.microsoft.com/kb/954835/en-us

 

I checked the number of processors and could see 24.  But in asking my client for some details, found that the processors are hexcore processors.  Now everything fit!!  SQL 2005 will not install on systems with an odd number of cores in the processors.  However, SQL 2008 does not have this issue.

 

However, the client was unwilling to try the workarounds recommended until the hardware vendor had a chance to research and work with me on this issue.  I am still waiting to hear from the hardware vendor and will update with the final fix.

UPDATE:  It works!!  After restricting the processors down to 2, I was able to uninstall (with a lot of effort) and reinstall SQL 2005 and then install SP2.  Once that was done, we added all the processors back and it all worked again.  This was a very rough way to do an install.

 

Add comment February 25th, 2009

Previous Posts


Categories

Links

Feeds