4 Aug

SQL Tip-6 | Use Covering Index to solve key lookup issues

Do you have Key Lookup problem? Key lookup taking most of the query time. then probably this is the best time to know more about covering indexes. Covering Index can solve all key lookup problems. A Non Clustered Index which contains all columns which are referred by a Query (in Select, Where or Join) is called Covering Index.

To know more read Using Covering Index.

Happy Learning 🙂

Thanks,
Sarabpreet Singh Anand
Subscribe now to get latest Tips in your Inbox


17 Jul

SQL Tip-1 | Don’t forget to recycle your SQLServer ErrorLog

Many a times I’ve seen that DBAs forget to recycle the ErrorLog of their critical SQLServers. Now I also understand that SQLServer Error Log is very important & can help you troubleshoot many issues so in theory there is nothing wrong with a large Error Log but at times this could be very frustrating.

Let’s assume you are trying to resolve a severity case and already under pressure – giving updates to n number of people on a Bridge Call, handling multiple pings from Higher management\Clients and at the same time making sure you resolve the issue within your SLA.

Now between all of this, you need to get some info from your SQL Server error log, you issue the command sp_ReadErrorLog and wait for your log to get loaded and then it keeps on loading which takes 3-4 minutes to load. I am sure you won’t be able to afford this wait, obviously you can also open the file in Notepad but that will also take some time depending on the size of file & you must be on the same server and also need to locate the folder.

Since SQL Server will recycle Error Log only at the time of starting the service until and unless you’ve recycled it explicitly. The best option would be to recycle the errorlog manually on a certain interval (based on the usage & growth rate) .

You can use any one out of the two below mentioned commands in order to recycle Error Log.

sp_cycle_errorlog

or

DBCC ErrorLog

This command will just recycle the errorlog of your SQL Server without any restart, which means if you are recycling your errorlog every 7 days – you’ll be having a fresh errorlog every 7th day without any downtime and your last errorlog will be archived & renamed to ErrorLog.1

Note: Make sure you also increase the log retention limit before recycling your errorlogs, To know more read: Do you know you can increase number of archived Errorlogs

Thanks,
Sarabpreet Singh Anand
Subscribe now to get latest Tips in your Inbox


4 Sep

SQL Server Day | Gurgaon | 8-Sept-2012 + Hiring Drive for Microsoft India

SQLServerGeeks.com cordially invites you to SQL Server Day, the quarterly dose of SQL Server knowledge & learning. And after multiple successful events in Bangalore, Kolkata, Mumbai & Delhi NCR, we are coming to Gurgaon, once again! This time SQL Server Day event has been customized for SQL Server Developers. We bring you 3 rock star speakers and 3 intriguing sessions related to SQL Server Development.

And Don’t forget to bring your CV and meet the Microsoft India Recruitment Team Smile

Details

Session & Speaker details

Venue & Contact details

Date & Time

Welcome Note (15 mins) by Amit Bansal(MVP-SQL Server)

Tips & Tricks of Transact SQL
by Sarabpreet Singh Anand, (Vice President, SQLServerGeeks.com)

Session by Microsoft IDC Recruitment Team

Optimizing Transactional and Procedural code by Amit Bansal (Director, Peopleware India, MVP-SQL Server)

SQL Server Myth-buster for Developers by Ahmad Osama

Closing Note (15 mins)

Microsoft Corporation (I) Pvt. Ltd.
DLF Phase 3, Cyber Greens,9th Floor, Tower A, DLF Cyber City, Sector 25A (Near Shankar Chowk)

Note: Refreshments will be served

 

September 8, 2012 (Saturday)
1.30 pm to 5.30 pm

Note: The event will start sharp at 2.00 pm. Please come by 1.30 pm for registration. (Due to security policies, registration takes time. Please come with a valid photo ID)


clip_image001[4]

You can register @ http://sqlserverdaygurgaon8sep2012.eventbrite.com/

8-sep-2012-t-sql-tips-sessions-gurgaon

See you at the event.