Moving TempDB

Steps to move TempDB Database.

1. Open SQL Server Management Studio.

2. Connect to the desired server.

3. Click the New Query button.

4. Copy and paste the following into the query pane:
USE master;
MODIFY FILE (NAME = tempdev, FILENAME = ‘{new location}tempdb.mdf’);
MODIFY FILE (NAME = templog, FILENAME = ‘{new location}templog.ldf’);

5. Change {new location} in the pasted code (for both the tempdb.mdf and templog.ldf files) to the path of the new location.

6. Click Execute.

7. Go to the Control Panel and then Administrative Tools. Select Services.

8. Stop and Start SQL Server (MSSQLSERVER).

9. Go back to SQL Server Management Studio and open a new query pane.

10. Copy and paste the following to verify that tempdb has moved to the new location:
SELECT name, physical_name
FROM sys.master_files
WHERE database_id = DB_ID(‘tempdb’);

11. Click Execute.

12. In the physical_name column, you should see the path to the new location.

Microsoft ISA Server 2006, Firewall Client Configuration

Microsoft ISA Server 2006, Firewall Client Configuration

Microsoft ISA Server 2006 Fire wall clinet

Script to copy Backup file from DB server to Backup server

Script to copy Backup file and if require  you can send mail once backup file copied. To configure mail service need to permit the system IP to communicate rellay server and than SMTP service.

On error resume next
‘ VBScript source code
”Deepak Bhardwaj
”        This code is copying the backups from DATABSE backup folder to the Specifed Folder
On error resume next
Dim objFSOSrc , objFolderSrc , ObjFilesrc ,objFSODes
Set objFSOSrc=CreateObject(“Scripting.FileSystemObject”)
Set objFSODes=CreateObject(“Scripting.FileSystemObject”)
dim myMail,strSITFromEMail
strSITFromEMail = “”
Dim srcFolderPath, destFolderPath
Dim Error
srcFolderPath  = “C:BackupsBackups”
srcFolder =”DB”
destFolderPath = “C:Copied”
Error= “False”
if (objFSODes.FolderExists(srcFolderPath)=false) then
‘SendMail  Err.Description, “SourceFolder Not Found”
Error= “True”
‘SendMail Err.Description, “SourceFolder Found”
Error= “True”
end if

‘if (objFSODes.FolderExists(destFolderPath &””& srcFolder) = false) then
objFSODes.CopyFolder srcFolderPath&””& srcFolder, destFolderPath , true
‘        return
‘end if

‘If (err.number <> 1) then
‘    strSITFromEMail=””
‘    Set myMail = CreateObject(“CDONTS.NEWMAIL”)
‘    myMail.From = trim(strSITFromEMail)
‘    myMail.To =  “”
‘     mymail.mailformat = 0
‘    mymail.BodyFormat = 0
‘    mymail.Subject = “Backup Error has occured :”
‘    str = “An error has occured ” & vbCrLf & _
‘    “<br>Error number: ” & Err.Number & vbCrLf & _
‘    “<br>Error Description :</font> ” & Err.Description & vbCrLf
‘    mymail.body = str
‘    mymail.send
‘end if

Problem faced when you install SQL Server 2005 on a computer that is running Windows Server 2008

Workarounds for Problem faced when you install SQL Server 2005 on a computer that is running Windows Server 2008

SQL Server 2005 on Windows Server 2008

SQL Database Log shipping

Step by Step configuration of SQL Database Log shipping.

This document applies on SQL Server 2008.

SQL Database Log shipping

Step by Step SQL Server 2008 Database Active/Passive Cluster

Clustering can be described as a technology that automatically allows one physical server to take over the tasks and responsibilities of another physical server that has failed.

An Active/Passive SQL Server cluster means where only one instance of SQL Server is running on one of the physical servers in the cluster, and the other physical server does nothing, other that waiting to takeover should the primary node should fail.

Server 2008 Cluster

Step By Step Configuration of Oracle Service on Windows Cluster 2008R2

This document outlines the step by step process to install Oracle11G Standard Edition on Windows Server 2008R2 failover Cluster.

Oracle Service on Windows Cluster

How to Change Cluster IP Address in Windows 2008R2!

Cluster.exe will show you cluster groups and resources that are not shown in the Failover Cluster Management Console.

C:>Cluster.exe group

Listing status for all available resource groups:

Group Node Status
——————– ————— ——
Available Storage WINCLUDB Offline
Cluster Group WINCLUDB Online
MBX W2K8CCR1 Online

C:>Cluster res

Listing status for all available resources:

Resource Group Node Status
——————– ————— ———— ——
CCR2/Mailbox Database (MBX) MBX WINCLUDB Online
Cluster IP Address Cluster Group WINCLUDB Online
Cluster Name Cluster Group WINCLUDB Online
Exchange Information Store Instance (MBX) MBX WINCLUDB Online
Exchange System Attendant Instance (MBX) MBX WINCLUDB Online
File Share Witness (\W2K8CASHUBFSM_MBX) Cluster Group WINCLUDB Online
First Storage Group/Mailbox Database (MBX) MBX WINCLUDB Online
IPv4 DHCP Address 1 (MBX) MBX WINCLUDB Online
Network Name (MBX) MBX WINCLUDB Online
Pub/Public (MBX) MBX WINCLUDB Online

C:>Cluster.exe res “Cluster IP Address” /priv

Listing private properties for ‘Cluster IP Address’:

T Resource Name Value
– ——————– —————————— ———————-
FTR Cluster IP Address LeaseObtainedTime 4/4/1801 4:00:00 PM
FTR Cluster IP Address LeaseExpiresTime 4/4/1801 4:00:00 PM
SR Cluster IP Address DhcpServer
SR Cluster IP Address DhcpAddress
SR Cluster IP Address DhcpSubnetMask
S Cluster IP Address Network Public Network
S Cluster IP Address Address
S Cluster IP Address SubnetMask
D Cluster IP Address EnableNetBIOS 2 (0×2)
D Cluster IP Address OverrideAddressMatch 0 (0×0)
D Cluster IP Address EnableDhcp 0 (0×0)

To change the Cluster IP Address just use the following command.

C:Cluster.exe res “Cluster IP Address” /priv address=

SQL Database Mirroring

Database Mirroring

Database mirroring is the creation and maintenance of redundant copies of a database. The purpose is to ensure continuous data availability and avoid downtime that might otherwise result from data corruption or loss, or from a situation when the operation of a network is partially compromised.

Apply on SQL Server 2005 and 2008 SP2

Step By Step Database Mirroring

About Me

I’m Deepak Bhardwaj over 15 years of experience in IT industry. Having solid exposer in Domestic and Globel complex organizations database operations Management.
Key responsibility area (Operation stability, standardization, Management, Monitoring, Complex Infra Implementation and Monitoring tools (Implementation, Testing and Reporting).

I am persistent in my avocation of the Exceptional customer experience, the Exceptional employee experience, and the desired results to the business.

Accustomed to fast paced environments where deadlines are a priority and handling multiple responsibilities is the norm.

Project Delivery Deadlines are priority to me and handle multiple responsibilities.

Resolving critical issues with proper analysis and share the Root cause analysis with permanent fix. Provide effective permanent solution to business Units as when needed. Managing SQL Server in (Development, testing and production) environments. My DB background includes database configuration, maintenance, troubleshooting and

managing day to day operation activities Co-ordinates Project implementations and migrations for business-critical applications

1. Installed and configured MSSQL 2008/2008R2/2012/2014, applied patches and cumulative Hotfixes.
2. Done Side-by-Side Migration and In-Place Upgrade of MSSQL Server 2008 to 2012.
3. Extensive work on High Availability and Disaster Recovery Solutions includes (AlwaysOn, Clustering, Mirroring, Logshipping and Replication).
4. Security Management (Logins, Users, Database/Server Roles and Granting/revoking permissions).
5. Implemented AlwaysOn Availability Groups in SQL Server 2012 (In Azure Cloud and In-Prim Environment).
6. Experience troubleshooting SQL Server jobs, Backup compression, Support for large and Complex Databases.
7. Expert in VM ware and Cloud DB infra deployment.
8. Expertise in Cloud Solution (AWS, Azure & GCP)

Note: I am writing blogs just to share my knowledge with my friends globally. Please check your environment first before implementing any solution.

WP2Social Auto Publish Powered By :