Thursday, August 15, 2013

Saturday, June 8, 2013

SQL SERVER 2014

Microsoft has announced SQL server 2014. We may have a trial version soon by end of this year. Microsoft also released a 2014 data sheet.





...Happy SQLing / Thanks for Visiting and Sharing your Views

Wednesday, May 15, 2013

How to Automate Common DBA Tasks

Jonathan Kehayias has created a nice useful Article to find solutions for common monitoring tasks. Mostly useful for regular day to day monitoring.

http://archive.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=AutomatedDBA&referringTitle=ServiceStatusMon#

...Happy SQLing / Thanks for Visiting and Sharing your Views

Experienced Guidelines for upcoming or growing DBA's

Hello Friends,
This morning I felt writing these practices that helped me grow up to as a good SQL DBA. Hope this will also help you grow faster and better.
I haven't organized them in a proper sequence or factor. But have jotted all those good qualities that I recollected from my experience.
 
· Plan to reserve a schedule on a weekend for any maintenance. Ensure there are no data driven jobs or high maintenance jobs running during that window. Having this across the servers will help to work effectively as it allows maintaining all serves in a single window.  
· Always ensure to have identical monitoring across all the servers unless there is a particular issue that you are addressing needs a special unique monitoring. 
· Review the recovery models of all User databases across the servers and plan backups based on the recovery model. Never leave a database in full recovery Model and without configuring frequent T-log backups. This will grow the log file to huge size impacting the disk free space as well as log file reader due to high VLF’s. Practically there should be no database without a Full backup per day.
· On a 64 bit SQL Server; ensure the Max memory value is reserved and not unlimited as it will try to occupy all the memory available on the Physical Server.
· It will be nice to have a production identical Test server to diagnose or troubleshoot or improve performance of the servers. Will be a good platform to test the windows / SQL Server changes
· Keep track of all the migrations or changes to the Server, Databases & Code. Will help you review the improvements you have done in a long way on supporting the SQL Servers
· Request end users and business to submit a request for any performance issues, so that you will know where to tune up.
· Set coding standards and educate developers to follow them and request DBA to always review the code for performance factors and better logic
· Ensure developers never code with “Select *” or run any Select without NOLOCK. This is purely based on the isolation levels
· Maintain a friendly environment with your peers and mates
· Having a manager with knowledge on “SQL Server internals” is the best work place
· Always Calculate Risk and Cost for any kind of implementation
· Try to have a Monthly Downtime where you can reboot your SQL Servers at least once a while
· Try to convince your managers to purchase license for a good monitoring tool like ‘SQLSentry’. I have so far used MOM, Sitescope, Spotlight and SQLSentry. Among which SQLSentry is the best of my experience.
· Keep yourself advanced and innovative on a day-day basis. Watch Plural sight, Read Blogs, Articles, Books etc. This will satisfy your day when you learn at least one new thing related to your job
· Perform periodic health Checks on SQL Servers. You can do this by using some tools like: SQL Server error log, Activity and Resource Monitors, SQL Server monitoring tools, Microsoft Baseline Configuration Analyzer, Server Administrator Console etc
· Disable all the services unless they are being used. Say like SSAS, SSRS. Not all SQL production servers will use this. But will have those services running by default when you install SQL Server. This will save some memory and CPU as they reserve resources by default.
· It is better to always have your own favorite tools and scripts to monitor SQL Server. Have them handy where ever you work.
· Keep a practice of reviewing and validating the SQL Servers as your first primary task for any new job or any new server. Document your investigation and analysis. Submitting some good reports to your managers will really help you gain their confidence and trust on you.
· Discuss as much as you can with the Server and Network administration team so you know well about the hardware equipment and infrastructure.
· Work with broad minded personality rather than narrow minded.
· Always stress for a root cause analysis and resolution for any issue and from any dependent team. Ensure to document them.
· Keep a habit of noting your achievements and Service oriented appreciations to add them in your self-input for Performance review and Appraisals.
 
 
 
 
...Happy SQLing / Thanks for Visiting and Sharing your Views
 

Tuesday, April 2, 2013

Meeting the Giants.. Paul Randal and Kimberly L Tripp on 8th April 2013

yes. you too can meet them and have a chat at SQLIntersection @LasVegas.

http://www.sqlintersection.com/


...Happy SQLing / Thanks for Visiting and Sharing your Views

Holy Cow.. really? thats too much

yea. exactly. that is what I felt when i saw so many Database products out in the market

http://db-engines.com/en/ranking




...Happy SQLing / Thanks for Visiting and Sharing your Views

Thursday, February 16, 2012

know the cost of turning your SQL databases to SQLAzure

Microsoft has recently brought their cloud services cost to half of the Actual

Was reading an article today and found this cap over there. With this you can estimate the Cloud cost for each of your existing databases



SELECT  @@SERVERNAME AS ServerName ,
DB_NAME(database_id) AS DatabaseName ,
SUM(( size * 8.0 ) / 1048576) SizeGB ,
SQLAzurePrice = CASE WHEN SUM(( size * 8 ) / 1048576) > 150
THEN 999999.000
WHEN SUM(( size * 8.0 ) / 1048576) > 50 THEN (125.874 + ((SUM(( size * 8.0 ) / 1048576) - 50) * .999))
WHEN SUM(( size * 8.0 ) / 1048576) > 10 THEN (45.954 + ((SUM(( size * 8.0 ) / 1048576) - 10) * 1.998))
WHEN SUM(( size * 8.0 ) / 1048576) > 1 THEN (9.990 + ((SUM(( size * 8.0 ) / 1048576) - 1) * 3.996))
WHEN SUM(( size * 8.0 ) / 1024) > 100 THEN 9.990
ELSE 4.995
END
FROM    sys.master_files
WHERE&nbsp;&nbsp; type_desc <> 'LOG'
GROUP BY DB_NAME(database_id)
ORDER BY DB_NAME(database_id)


...Happy SQLing / Thanks for Visiting and Sharing your Views

Wednesday, October 5, 2011

PowerPivot for Excel with SQL Server Code Name "Denali" CTP3

Try these new features in Excel and powerful Pivoting, Mostly for reporting & analysis services.
You may also go through the belw blogs
http://blogs.technet.com/b/dataplatforminsider/archive/2011/09/28/what-s-new-in-powerpivot-for-excel-with-sql-server-code-name-quot-denali-quot-ctp3.aspx

Have you download the new PowerPivot for Excel with SQL Server Code Name Denali CTP3? Check out our latest video blog to learn about the new PowerPoint features that are available with CTP3! http://cot.ag/p2ucjk



...Happy SQLing / Thanks for Visiting and Sharing your Views

PASS Summit 2011 by SQL Server Team

SQL Server Team at PASS Summit 2011

Microsoft is once again delighted to be a premier sponsor of the PASS Summit in Seattle from Oct 11 – 14, 2011. We are committing our top resources to the most value-packed SQL Server and Business Intelligence event of the year. This event includes informative keynotes from Microsoft executives as well as Microsoft Customer Service and Support (CSS), SQL Server Clinic to program sessions, Hands-On-Labs, and products on display at the Microsoft Product Pavilion.
The following is where you can find Microsoft’s most knowledgeable experts and top speakers:
  • Keynotes from top Microsoft SQL Server executives: Ted Kummert, Quentin Clark, and technical fellow David J. DeWitt
  • Expert Pods - Meet Microsoft SQL Server Engineering team members and SQL Server MVPs in an informal area on the 6th floor of the conference center
  • SQL Server Clinic - Work through your technical issues with SQL Server CSS and get architectural guidance from SQLCAT
    • SQL Server Kinection – Come to the SQL Server Clinic and sign up to control a SQL Server environment via an Xbox Kinect
  • Hands-On Labs - Get experience through self-paced & instructor-led labs on our cloud based lab platform – bring your laptop or use Hewlett Packard-sponsored hardware
    • Bare Metal Labs – Instructor led labs
      • Learn how to build out your SQL Server Code Name “Denali” based environment from scratch
      • Install SQL Server on Windows Server Core and how to implement AlwaysOn Availability groups
      • Learn new manageability capabilities in SQL Server Code Name “Denali”
  • Microsoft Product Pavilion - Talk with Microsoft SQL Server and BI experts to learn about the next version of SQL Server, check out our new appliances, and make sure you stop in and attend our Solutions Theater sessions
    • Variety of Solutions Theatre Sessions – stop by the Microsoft Product Pavilion to check out the current list of Theatre sessions
  • Microsoft Regular Sessions - Attend 75-minute to 90-minute technical sessions with an excellent lineup of Microsoft speakers
  • Focus Groups - Have your say and share your feedback on SQL Server technologies in the many focus groups that are available. Be sure to sign up now as these fill up VERY quickly! The following is just one of the many focus groups available at the event:
    • Masters, Maestros and Architects
Microsoft Learning wants to deliver quality, meaningful certifications and training to help you get to the highest levels of your profession. You will have an opportunity to ask questions about the advanced certification programs while providing valuable feedback to help us deliver the programs and training you need to reach that next level. Agenda is flexible and will flow with the direction of the discussion. Topics on the table include:
· SQL Server Master Certification (Microsoft Learning)
· SSAS Maestro Certification (SQL CAT)
· SQL Server BI Master Certification (rumored)
· SQL Server Architect Certification (Microsoft Learning)

***You can also follow them on Facebook, Twitter & MSDN Blog****


...Happy SQLing / Thanks for Visiting and Sharing your Views

Thursday, September 29, 2011

Blog on Mobile

Dear Visitors,

This blog is now compatible for all mobile editions. You may also access the page from your Mobiles.

...Happy SQLing / Thanks for Visiting and Sharing your Views

Thursday, September 22, 2011

Is your Database having Too many VLFs? (Tuning Log File Auto Growth doesnt help ?)

Too many VLFs will cause to slow down the operations on the database.
As the Virtual log files grows, the time taken to read the log file will also grow.

So watch on the virtual log files on your databases.

Analyse
Count of VLFs can be either pulled using

DBCC LOGINFO
OR
Try to shrink the log file and it will provide you the number of files
DBCC SHRINKFILE ('MSDBLOG') -- Check the "UsedPages" value from the resultset.

Too many virtual log files can be seen in one among the below cases

1) When there is no transaction log backup and the database is in Full Recovery Model
2) Where the database is acting as a replication Publisher and is either in Full or Simple Recovery model. Frequent periodic T-log backups are still recommended
3) where there is a large / older Open transaction on a Database

Solution:-

1) Try to take periodic regular T-log backups
2) Issue Checkpoint
3) Shrink the log file

Try to apply the proceedure in the given series and mostlikely issuing a continous checkpoint will also help when the database is in Simple Recovery model.

Hope it helps

...Happy SQLing / Thanks for Visiting and Sharing your Views

Tuesday, August 9, 2011

SQL Server Internal Memory Notifications


Below Query helps you to read the notifications that SQL Server has generated internally.



SELECT CONVERT (varchar(30), GETDATE(), 121) as runtime,

DATEADD (ms, -1 * (sys.ms_ticks - a.[Record Time]), GETDATE()) AS Notification_time,

a.* , sys.ms_ticks AS [Current Time]

FROM

(SELECT x.value('(//Record/ResourceMonitor/Notification)[1]', 'varchar(30)') AS [Notification_type],

x.value('(//Record/MemoryRecord/MemoryUtilization)[1]', 'bigint') AS [MemoryUtilization %],

x.value('(//Record/MemoryRecord/TotalPhysicalMemory)[1]', 'bigint') AS [TotalPhysicalMemory_KB],

x.value('(//Record/MemoryRecord/AvailablePhysicalMemory)[1]', 'bigint') AS [AvailablePhysicalMemory_KB],

x.value('(//Record/MemoryRecord/TotalPageFile)[1]', 'bigint') AS [TotalPageFile_KB],

x.value('(//Record/MemoryRecord/AvailablePageFile)[1]', 'bigint') AS [AvailablePageFile_KB],

x.value('(//Record/MemoryRecord/TotalVirtualAddressSpace)[1]', 'bigint') AS [TotalVirtualAddressSpace_KB],

x.value('(//Record/MemoryRecord/AvailableVirtualAddressSpace)[1]', 'bigint') AS [AvailableVirtualAddressSpace_KB],

x.value('(//Record/MemoryNode/@id)[1]', 'bigint') AS [Node Id],

x.value('(//Record/MemoryNode/ReservedMemory)[1]', 'bigint') AS [SQL_ReservedMemory_KB],

x.value('(//Record/MemoryNode/CommittedMemory)[1]', 'bigint') AS [SQL_CommittedMemory_KB],

x.value('(//Record/@id)[1]', 'bigint') AS [Record Id],

x.value('(//Record/@type)[1]', 'varchar(30)') AS [Type],

x.value('(//Record/ResourceMonitor/Indicators)[1]', 'bigint') AS [Indicators],

x.value('(//Record/@time)[1]', 'bigint') AS [Record Time]

FROM (SELECT CAST (record as xml) FROM sys.dm_os_ring_buffers

WHERE ring_buffer_type = 'RING_BUFFER_RESOURCE_MONITOR') AS R(x)) a

CROSS JOIN sys.dm_os_sys_info sys

ORDER BY a.[Record Time] ASC



...Happy SQLing / Thanks for Visiting and Sharing your Views


Sunday, July 17, 2011

Important support changes for SQL Server 2000 and SQL Server 2005


What is happening:

SQL Server 2000
On 4/9/2013, Extended Support for SQL Server 2000 will come to an end, and SQL Server 2000 will no longer be supported.
After this date:
·         Updates to this software will stop and so you will no longer receive patches including security updates.
·         Self-Help Online Support will be available for a minimum of 12 months.

SQL Server 2005
On 4/12/2011, SQL Server 2005 will transition from Mainstream Support to Extended Support, which includes:
·         Paid support (charged on an hourly basis per incident). Customers will no longer receive no-charge incident support and warranty claims, and won’t be able to request design changes or features.
·         Security update support at no additional cost.
·         Non-security related hotfix support will require a separate Extended Hotfix Support Agreement to be purchased within 90 days of the end of Mainstream Support – July 11th, 2011.

Microsoft Support Lifecycle Policy
The Microsoft Support Lifecycle policy took effect in October 2002, and applies to most products currently available through retail purchase or volume licensing and most future release products.

Through the policy, Microsoft will offer a minimum of:
·         10 years of support (5 years Mainstream Support and 5 years Extended Support) at the supported service pack level for Business and Developer products
·         5 years Mainstream Support at the supported service pack level for Consumer/Hardware/Multimedia products
·         3 years of Mainstream Support for products that are annually released (for example, Money, Encarta, Picture It!, and Streets & Trips)
  

Phases of the Support Lifecycle
clip_image002

Your options in moving forward:
SQL Server 2000
·         Upgrade to a supported version of SQL Server.
·         Find out more about a Custom Support Agreement (CSA).
·         Run SQL Server 2000 unsupported with access to Self-Help Online Support only (not recommended)

SQL Server 2005
·         Remain on SQL Server 2005 with Extended Support. You can still open support incidents and receive support, however you will not be able to request specific fixes.
·         Remain on SQL Server 2005 with Extended Support and purchase Extended Hotfix Support. You can then open support incidents and request specific fixes.
·         Upgrade to a supported version of SQL Server

Get more details on how to stay supported along with other important resources at: http://www.microsoft.com/sqlserver/en/us/support/support-updates.aspx

Source: Microsoft SQL Server Team Blog

...Happy SQLing
Thanks for Visiting and Sharing your Views

Saturday, July 16, 2011

SQL Server Developer Tools "Juneau" CTP3 bits available now!

Are you a wanted Developer?
Take a look at the Pre-release SQL Server developer tools from Denali CTP3.
Donot forget to Provide your feedback to Microsoft.

http://www.microsoft.com/web/gallery/install.aspx?appid=JUNEAU10


...Happy SQLing
Thanks for Visiting and Sharing your Views

SQL Server Code Name “Denali” CTP3 and SQL Server 2008 R2 SP1 are HERE!

Denali's Community Technology preview 3 Bits are now available. Start downloading and have fun with Denali (the most hiped and awaited product from Microsoft SQL Server team)

https://www.microsoft.com/betaexperience/pd/SQLDCTP3CTA/enus/

...Happy SQLing
Thanks for Visiting and Sharing your Views

Friday, July 1, 2011

Unable to Shrink Log File?

Log File Can only be Shrunk when :-

1) There are no Open Transactions in the Database

USE DB
DBCC OPENTRAN

2) When the Log File is not in use

DBCC LOGINFO
Verify that the File status <> 2 for all the Virtual log files.
 Backup the Log file to mark the file status to inactive.

3) Check if the Database is involved in Transactional Replication
If your database is involved in Transactional replication and you see there are no undelivered transactions, then execute the below

USE [database]
go
exec sp_repldone @xactid = NULL, @xact_seqno = NULL, @numtrans = 0, @time = 0, @reset = 1
go
DBCC Shrinkfile ('logfilename')

Increase in the Virtual Log files and Size will also lead to fail replication from delivering the transactions to the Subscriber.




...Happy SQLing
Thanks for Visiting and Sharing your Views

Review CPU Utilization history from SQL Server

There will be at times where we would be wondering as what happened in the history that caused the SQL Server slow down or poor performance.
one such clue to look at initially is the CPU pressure.

using the Below Query we can pull the CPU Utilization history for the last 30 minutes.
You can see CPU Utilized by SQL Server and Other Windows Processes.

DECLARE @ts_now bigint SET @ts_now = (SELECT cpu_ticks/(cpu_ticks/ms_ticks)FROM sys.dm_os_sys_info); SELECT
SystemIdle
100
TOP(50) SQLProcessUtilization AS [SQL Server Process CPU Utilization], AS [System Idle Process], - SystemIdle - SQLProcessUtilization AS [Other Process CPU Utilization], DATEADD(ms, -1 * (@ts_now - [timestamp]), GETDATE()) AS [Event Time] FROM ( SELECT
record
record.value('(./Record/@id)[1]', 'int') AS record_id, .value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') AS
record
[SystemIdle], .value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') AS [SQLProcessUtilization], [timestamp] FROM ( SELECT [timestamp], CONVERT(xml, record) AS [record] FROM sys.dm_os_ring_buffers WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' AND record LIKE '%<SystemHealth>%') AS x ) AS y ORDER BY record_id DESC;

...Happy SQLing
Thanks for Visiting and Sharing your Views