Displaying posts published in

May 2014

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