Author Archives: Sher khan

About Sher khan

Senior Oracle DBA, Oracle 10g , Oracle 11g OCE ,Oracle 12C and Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g , 11g and 12C. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com

Chnage the Path for the mdf and ldf file while Creating a SQL Database

To change the default path for mdf and ldf files in SQL ServerUSE [master] GO EXEC xp_instance_regwrite N’HKEY_LOCAL_MACHINE’, N’Software\Microsoft\MSSQLServer\MSSQLServer’, N’DefaultData’, REG_SZ, N’F:\Data\DB05′ GO EXEC xp_instance_regwrite N’HKEY_LOCAL_MACHINE’, N’Software\Microsoft\MSSQLServer\MSSQLServer’, N’DefaultLog’, REG_SZ, N’F:\Data\DB05′ GO Advertisements

Posted in SQL Server, Uncategorized | Leave a comment

The file ‘F:\data\DB05_log.ldf’ cannot be overwritten. It is being used by database ‘test’.

First I took a backup of DB05BACKUP DATABASE DB05 TO DISK=’F:\backup\DB05_20190131.BAK’ WITH INITThen I restored this DB05 as test RESTORE DATABASE test from DISK=’F:\backup\DB05_20190131.BAK’ WITH RECOVERYMy test DB is working fine. But when I am trying to Restore the same … Continue reading

Posted in SQL Server | Leave a comment

LINUX USEFULL COMMANDS

To Check the RPM is Installed or not rpm -qa –queryformat “%{NAME} -%{VERSION}-%{RELEASE} (%{ARCH})\n” | grep libXp Mount the ISO in Linux machine to install RPM Mounting ISO mount -o loop /media/DISK_IMG/OracleLinux-R5-U7-Server-i386-dvd.iso /u02

Posted in Uncategorized | Leave a comment

Public key for .rpm is not installed

I was trying to Install RPM in Oracle Linux 5.7. It was giving me error public key for .rpm is not installed. Resolved the issue with rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-oraclerpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

Posted in Uncategorized | Leave a comment

Migration of Database With Zero Down Time

I have been Migrated a Live Database almost 200GB with Zero Down Time . My step was. 1- Take RMAN backup from source Database. My Script was RMAN> run {2> allocate channel d1 type disk FORMAT “E:\rman-backup\Weekly_%T_L0_%d-%s_%p.db” MAXPIECESIZE 500M;3> allocate … Continue reading

Posted in Database Migration | Leave a comment

Backup Database Users

To export selected users daily, you can do it very easily backup.bat  expdp system/password parfile=dailybackup.ora   dailybackup.ora DIRECTORY=dailybackup reuse_dumpfiles=y LOGFILE=Daily.log DUMPFILE=Daily%u.dmp Schemas = scott,hr,system FILESIZE=5gb  

Posted in Uncategorized | Leave a comment

How to synchronize windows folder

In have two fodders i.e. source and target. In this demo it is explained that all files from source folder should be copied or update the target folder. As show in the picture I have created some files in source … Continue reading

Posted in Uncategorized | Leave a comment