Displaying the most recent of 72 posts written by

nirav

Validate and Create Windows Cluster

Validate and Create Windows Cluster In this blog i am going to create windows cluster for my AlwaysOn High Availability Group configuration. I have already enabled and installed failover cluster on all recommended  servers. FailOver Cluster Step1 : Open Server Manger — Select “Failover Cluster Manager” under Features. Click on “Create Cluster” highlighted in red [...]

Create tables schema to another database using SMO

Create tables schema to another database using SMO. I have created a package which will create table script to your physical path and also executes same thing on another database to create table schema.

Script to Shrink Database

Script to Shrink Database. You need to use Database Console Commands of SQL Server to get back the free space. DBCC ShrinkDatabase : Shrink all files from database. It will shrink 90% free space and remains 10% free for database files. It will shrink data and log files to the last allocated extent, while you use [...]

SQL Server Mirroring with Certificate

SQL Server Mirroring with Certificate. Step1 : Take a backup of Database and then backup of log as well, of the database which you want mirrored. On Principal Server Step2 : Copy this both database and log backup from principal server to mirroring server and restore it in specific drive. On Mirroring Server Step3 : [...]

Enable Windows Server Failover Clustering (WSFC)

Enable Windows Server Failover Clustering (WSFC). Step1 :  On the server manager window click on “Add Features”. Step2 : On the Add Feature Wizard select “Failover Clusterintg” and click on Next. Step3 : Confirm and click on Install. Step4 : Check installed feature and click “Close” button to exit. Thanks & Regards, Nirav Gajjar

Identity reseed in SQL Server 2012

Identity reseed in SQL Server 2012 In SQL Server 2012, there is one issue regarding Identity column. I have faced identity value is jumping by 1000 when i have restarted my SQL Server Service. You can find gaps in identity while you restart your sql server service, restart of server or failover. Please review below code to [...]

Process Element XML and Attribute XML in single node

Process Element XML and Attribute XML in single node.

Modify database name with single user mode

Modify database name with single user mode

Configure Service Broker in SQL Server 2012

Configure Service Broker in SQL Server 2012. Initiator Script Step1 : Create Database, Master Key and Initiator Certificate Step2 : Create Target Certificate, Login and Endpoint Step3 : Create User, Master Key, Initiator and Target Certificate Step4 : Create Message Type, Contract, Queue, Service, Route and Binding Target Script Step1 : Create Database, Master Key [...]

Purge records of Sys.Transmission_Queue of Service Broker in SQL Server

Purge records of Sys.Transmission_Queue of Service Broker in SQL Server. Today i got one issue on service broker for sys.transmission_queue. Service broker configured well and working fine, suddenly service broker tranmission_queue goes high and high. I have checked Transfer_Status to check the error if there is any, but i can’t see any error in Transfer_Status. [...]