SQL Server – Ranking Functions – RANK, DENSE_RANK, ROW_NUMBER, NTILE

Ranking functions return a ranking value for each row in a partition. Depending on the function that is used, some rows might receive the same value as other rows. Ranking functions are nondeterministic. There are four functions RANK DENSE_RANK ROW_NUMBER NTILE RANK   Returns the rank of each row within

» Read more

SQL Server code name ‘Denali’ – Community Technology Preview 3 (CTP 3)

Microsoft SQL Server code name ‘Denali’ 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. SQL Server code name ‘Denali’ enables a cloud-ready

» Read more

SQL Serevr Replication – Setup and configure Subscription on SQL 2008R2 – Part 4 of 4

New Subscription wizard as below Select the publication and then press “Next” Next you have choose the subscriber and subscription database Here we are choosing the Push subscription Select Push subscription (First one) then press “Next” Select Agent Schedule “Run Continuously” the press “Next” Select Initialize when as “At first

» Read more

SQL Serever Replication – Setup and configure the Publication on SQL Server 2000 – Part 3 of 4

In part 2, we have configured a SQL Server as a main publishing server, we have to create a publication of databases which the clients can subscribe. Click on New Publication “Create Publication Wizard” starts, check the “Show advanced options in this Wizard” checkbox and press “Next” After please select

» Read more

SQL Server Replication – Setup and configure a SQL Server 2000 as a main Publisher/Distributor – Part 2 of 4

Click on the Configuring Publishing, subscribes and Distribution option then the Configuring Publishing and Distribution Wizard starts up. Specify the UNC (Universal Naming Convention) path Select “No”- accepting default settings – and press next. Successfully enabled…” message should appear. Notification that a “replication object” has been added to the console

» Read more

SQL Server Replication – Configure the SQL Server Agent – Part 1 of 4

Once you are going setup SQL Server Replication configures the SQL Server Agent as: Make Sure SQL Server Agent is running Right click My Computer -> Manage… -> Choose from the tree at the left: “Services and Applications” -> “Services” By default the SQL Server Agent runs under the local

» Read more

SQL Server – How to Setup SQL Server Replication – Part 0 of 4

Introduction This document describes a scenario how to setup the Transactional SQL Server Replication. Before we proceed for Replication setup you can read brief note about “Understanding of Replication” http://varindersandhu.in/2011/05/14/understanding-of-replication/ Here we will setup the Transactional SQL Server Replication between SQL Server 2000 and SQL Server 2008R2. Pre-requisite SQL Server

» Read more

SQL Server – Error Handling Using TRY…CATCH

Prior to SQL server 2005, the only way of performing the error handling was to test vale of @@ERROR global variable. Once the SQL Server completes the execution of a Transact-SQL statement, it records the status of result in @@ERROR. If the error occurred, @@ERROR contains the error number. If

» Read more

SQL Server – Get Comma Separated Values from table

I had requirement to get the Comma Separated Values from the table for specific column. So here sharing with you example how i handle this situation. USE tempdb GO CREATE TABLE test1 ( column1 INT, column2 VARCHAR(6) ) INSERT INTO test1 VALUES (1,'Test1'), (1,'Test2'), (2,'Test3'), (2,'Test4'), (3,'Test5') Now see the

» Read more
1 5 6 7 8 9 11