Browsing articles in "Tips & Tricks"
Apr
30
2013

Write a Batch (.bat) file error handler for SQL instance down when fetching details from several SQL Servers

I have written several batch files to automate activities in SQL Server environment and send HTML reports over email on completion; but whenever SQL Server is down or server is unavailable then the HTML output get disturbed as no error handling is being done. When tried to write error handling to fix the issue, faced trouble as was using following code as part of an error handling,   FOR /F “tokens=1,2 delims=,” %%G in (%CD%\SQLServerList_SQLReport.txt) […]

Apr
30
2013

Oracle to SQL Server Trigger Migration – Useful Tips

Today got a requirement to convert an Oracle trigger to SQL Server trigger, I have not worked on DDL triggers so did a check on code, it was pretty simple and alongside used few online conversion utilities (limited freeware conversion) which helped in achieving final results.   Image Courtesy: Manageengine.com   This post is not about writing all aspects of creating triggers; it is just about resources available to help in completing conversion.   First, […]

Apr
16
2013

Fix: Issue with SQL Agent not coming up due to agent error log path incorrect

SQL Server Agent was unable to come up and no error was being reported (only error we found as “SQL agent services started and then stopped”, nothing was logged in Event viewer as well), hence was unable to identify the actual error with which agent was failing, following is done to fix it,   1. Ran following command to read agent error log using query analyzer,                                 EXEC sys.xp_readerrorlog 0,2                 Output was: Msg 22004, […]

Mar
19
2013

Service Unavailable : HTTP Error 503. The service is unavailable

After applying SQL Server service pack on one of SQL Server 2008, faced situation when user reporting then he is unable to open his webpage, he was receiving following error,   HTTP Error 503. The service is unavailable     After restarting OS, IIS 7.5 services as well received same error, finally found the solution as,   1. Open the Internet Information Services (IIS) Manager 2. Select the Application Pools node under the root node […]

Feb
26
2013

Using EXCLUDE in NetBackup .bch script –SQL Server database backups

I was searching for a solution to exclude specific database from Symantec NetBackup .bch script for SQL Server database backups, there are two ways to excluded databases,   1. By using EXCLUDE parameter As per admin guide, Name of a database to exclude when DATABASE $ALL is specified in a batch operation EXCLUDE can be used in a batch file only if DATABASE $ALL is used.   Following is sample .bch file with some example […]

Feb
21
2013

Why there is separate package for SQL Native Client (SNAC) on cumulative update download page?

If you are wondering that Cumulative Update download page has a package for SNAC, should you download and install or not? Then probably you will find your answer below.   Everything about SNAC is clearly explained at following link, http://blogs.msdn.com/b/psssql/archive/2009/10/23/should-i-have-a-snac-with-my-cumulative-update.aspx   Just to brief it out,   What is SNAC? SNAC stands for SQL Native Client   Why separate package is there on download page? It is a package only to apply updates to native […]

Feb
15
2013

The command failed because the database mirror is busy. Reissue the command later.

Issue: Trying to turn of database mirroring, disconnected mirroring from Principal database but when checked the partner Database, found that database still in restoring mode, when trying to delete it, it failed stating database is part of mirroring as below,     Then ran following command/s which resulted in error, ALTER DATABASE [STASxref] SET PARTNER OFF; ALTER DATABASE [STASxref] SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS;   Msg 1404, Level 16, State 11, Line 1 The command failed because […]

Feb
11
2013

The log cannot be rebuilt because the database was not clearly shutdown (Microsoft SQL Server, Error: 945)

Today found that soemone has delete log file of one of database and database was inaccessible, when tried to take it offline and then bring online received following error while bringing it online,   “Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details”   “The log cannot be rebuilt because the database was not clearly shutdown (Microsoft SQL Server, Error: 945)”     […]

Jan
29
2013

dbc_RemoteWriteFile: ERR – could not write progress status message to the NAME socket

In continuation with my old post where I troubleshoot the Symantec NetBackup Error (31073), today faced similar error on another server where UAC was enabled earlier but disabled later. On investigation found Error (31073) again but this time even after implementing all solutions from my last post link, faced a new error as below, Error: In GUI console, ERR – Error in CreateEx: 0x80070005. CONTINUATION: – Unknown VDI error code In dbclient, 06:24:13.321 [1628.6700] <2> […]

Jan
29
2013

Lock Pages in Memory enabled but “Using locked pages for buffer pool” message not found

On a SQL Server 2005 x64 SP4+CU3 Standard Edition with Lock pages in memory settings enabled, max memory configured, found issue that “Using locked pages for buffer pool” message is not logged in SQL Server Error logs,   How to check Lock Pages in Memory is enabled? Run below commands in SSMS and in result you should see message like “Using locked pages for buffer pool” else configure or troubleshoot based on situation, exec xp_readerrorlog […]

Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 254 other subscribers

Translate this blog!

EnglishFrenchGermanItalianPortugueseRussianSpanish

Calender

August 2020
M T W T F S S
« Nov    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

View Post by Categories

%d bloggers like this: