May 142012
 

SQL Complete is a tool available freely (and advanced professional version) which acts as a plugin to SQL Server Management Studio and Visual Studio, and provides powerful autocompletion and formatting of T-SQL code that replaces native Microsoft T-SQL Intellisense. That increases development productivity to quite an extent. For more detail and download one can refer [Read More]

May 072012
 

Many times we need to review the SQL Server instance configuration values while troubleshooting performance problems. We have one view in SQL Server 2005 or higher version that contains a row per server-wide configuration option value in the system. The catalog view that provides details about all the server wide configuration values is called sys.configurations. sys.configurations [Read More]

May 042012
 

Inline variable assignment is available in SQL Server 2008 or higher version. Beside this is very simple but very useful feature. Many of the programming languages have this feature. But now SQL Server 2008 or higher version has this feature. Example: —- SQL Server 2005 or earlier versions DECLARE @var1 INT SET @var1 = 100 [Read More]

Apr 272012
 

Backup compression was introduced in SQL Server 2008 Enterprise. At installation, backup compression default is set to 0, which makes backup compression off by default. To change the default to COMPRESSION, set backup compression default to 1. To revert the default to NO_COMPRESSION, set backup compression default back to 0. Backup Compress at Server Level [Read More]

Apr 252012
 

Microsoft SQL Server 2012 enables a cloud-ready information platform that will help organizations unlock breakthrough insights across the organization as well as quickly build solutions and extend data across on-premises and public cloud backed by capabilities for mission critical confidence. Deliver required uptime and data protection with AlwaysOn Gain breakthrough & predictable performance with ColumnStore [Read More]

Apr 202012
 

With the help of the given procedure one can get the list of Stored Procedures update or modify in last N number days. Script: — Get the List of Stored Procedures update/modify in last N number days CREATE PROCEDURE GetListModifySP ( @days INT ) AS SELECT name AS SP_Name, modify_date as Modfiy_Date FROM sys.objects WHERE [Read More]

Apr 192012
 

If you want to get the  Last Execution Date/Time of a Stored Procedure then here is solution. Sys.dm_exec_procedure_stats it’s a system dynamic view that returns aggregate performance statistics for cached stored procedures. This view has been introduced from SQL Server 2008. The view returns one row for each cached stored procedure plan, and the lifetime [Read More]

Apr 182012
 

Microsoft has released one second draft of this book. PART I   DATABASE ADMINISTRATION   (Ross’s part) Denali Editions and Enhancements High Availability and Disaster Recovery Enhancements Scalability and Performance Security Enhancements Beyond Relational PART II   BUSINESS INTELLIGENCE DEVELOPMENT   (Stacia’s part) Integration Services Data Quality Services Master Data Services Analysis Services and PowerPivot Reporting Services This release [Read More]

Apr 162012
 

In SQL Server 2012, seven new datetime functions have been introduced. EOMONTH is one of them.  This is really useful function because many times we need to find the last date of month. Syntax: EOMONTH ( start_date [, month_to_add ] ) Find Last Day of Current Month Example: SELECT EOMONTH (GETDATE()) Last_Date_Month Result: Date ————– [Read More]

Apr 132012
 

In SQL Server 2012, seven new datetime functions have been introduced. DATEFROMPARTS is one of them. Syntax: DATEFROMPARTS (year, month, day) DATEFROMPARTS returns a date value with the date portion set to the specified year, month and day, and the time portion set to the default. If the arguments are not valid, then an error [Read More]

Apr 112012
 

There are seven new datetime functions are introduced in SQL Server 2012 as motioned below DATEFROMPARTS ( year, month, day) DATETIMEFROMPARTS ( year, month, day, hour, minute, seconds, milliseconds ) DATETIME2FROMPARTS ( year, month, day, hour, minute, seconds, fractions, precision ) DATETIMEOFFSETFROMPARTS ( year, month, day, hour, minute, seconds, fractions, hour_offset, minute_offset, precision ) SMALLDATETIMEFROMPARTS [Read More]

Apr 042012
 

With UTL_INADDR The UTL_INADDR package provides a PL/SQL procedure to support internet addressing. It provides an API to retrieve host names and IP addresses of local and remote hosts. Example select UTL_INADDR.GET_HOST_NAME Host_Name, UTL_INADDR.GET_HOST_ADDRESS IP_Address from dual ; With SYS_CONTEXT SYS_CONTEXT returns the value of parameter associated with the context namespace. You can use this [Read More]

Mar 222012
 

While restoring the SQL database error occurred… Through UI following error occurred Through Script following error occurred Script: RESTORE DATABASE mydb FROM DISK = 'D:\ DB Backup\mydb.bak' WITH MOVE 'mydb_Data' TO 'E:\Database\mydb.mdf', MOVE 'mydb_Log' TO 'E:\Database\mydb.ldf', REPLACE GO Msg 3203, Level 16, State 1, Line 1 Read on “D:\ DB Backup\mydb.bak” failed: 38(Reached the end [Read More]