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]
Today, I arrived on writing my 200th blog post. Journey to 200th blog post is really important for me or any blogger. I wanted to thank all readers who believe in me and continue to visit my blog. The primary objective of my blog is to share my experience and notes with all technical persons. [Read More]
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]
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]
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]
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]
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]
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]
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]
Today I have restored my old Firefox profile backup. For that I have created a new profile because I don’t want to lose my current profile. Now I have two profiles on the Firefox. After that I have open the new profile that restored. After sometime I need to open the other profile. Then I [Read More]
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]
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]
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]
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]
Memory allocation is static for char data type variables but in case of varchar memory allocation is dynamic. This is the basic difference between char and varchar. Example create table test1 ( name1 char(10), name2 varchar(10) ); Insert into test1 values ('Varinder','Varinder'); select * from test1; I hope this will help.
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]