When you try to connect MsSQL Server database, you can get an error that is Unknown Server Hostname or similar sometimes. You can resolve this problem with a few operation. Suggest If you use SERVERNAME\INSTANCENAME statement, you can try SERVERNAME;instance=INSTANCENAME statement
Tag: Database Administration
Oracle 11g Data Guard Failover With Python Script
I wrote a python script to perform failover steps and to take product database IP addresses when product database is down. If you dont use data guard broker or other application for failover operations, you can use this script for failover. My scenario is that I have Oracle 11gR2 2 nodes RAC product database and…
Move Datafiles Of Tablespaces With RMAN Set Newname in Oracle 11g
You can move datafiles of tablespaces. Scenarios can be asm to file system or file system to file system or file system to file system or asm to asm. Below operations show how to move datafiles. You have to take a backup and database has to be archivelog mode before this operations because of that…
Auto Increment Primary Key With Trigger in Oracle 11g
You can provide auto increment primary with trigger by appling below operations. Create Table SQL> CREATE TABLE TESTUSER.TBL_TEST (id number primary key, name varchar2(100)); Create Sequence SQL> CREATE SEQUENCE TESTUSER.SEQ_TEST_ID START WITH 1 MAXVALUE 999999999 MINVALUE 1 CYCLE NOCACHE NOORDER; Create Trigger For Auto Increment SQL> CREATE OR REPLACE TRIGGER TESTUSER.TRG_AUTO_INC_TEST_ID before insert on TESTUSER.TBL_TEST…
How to Move Datafiles to New Disk in MsSQL Server 2008
If database data disk space is full or you have another problem about of disk, you can move datafiles to new disk in MsSQL Server 2008 database. Show Current Paths and Names use master go select name,physical_name from sys.master.files where database_id = DB_ID(‘DATABASENAME’) dbf1 D:\OLDLOCATION\disk_1.mdf dbf1_log D:\OLDLOCATION\disk1_log.ldf go Shutdown Database use master go alter database…
How to Change Oracle Enterprise Manager Port Number
If you want to change Oracle Enterprise Manager port number, you can use “emca -reconfig ports -DBCONTROL_HTTP_PORT ” command, this is simple. You can use to take security measure for Oracle EM. I will give 1820 as port for Oracle EM as example. Change Oracle Enterprise Manager Port
RMAN Encrypt Backup in Oracle
You can protect your backups with rman encryption. You have three ways to rman backup encryption. You can use wallet, password or dual mode. I will tell you password protection. Configure RMAN Backups With Password Protection rman target / RMAN> set encryption on identified by ‘yourpassword’ only; You can backup with backup database command. Do…
How to Create Oracle Wallet for Encrpytion
Oracle Wallet Manager is a password protected stand-alone Java application tool used to maintain security credentials and store SSL related information such as authentication and signing credentials, private keys, certificates, and trusted certificates. 1- Create Wallet Directory [oracle@testdb ~] cd $ORACLE_HOME [oracle@testdb db_home] mkdir -p ORA_WALLETS 2- Write Wallet Location Information in sqlnet.ora File [oracle@testdb…
How to Move Datafile to Different Directory in Oracle
You can move datafiles to different directory. You have to make offline tablespace or take mount mode database to change datafiles location. System, temporary and rollback tablespace can move only when database is mount mode. Show Tablespaces And Datafiles With Locations SQL> select tablespace_name, file_name from dba_data_files; Change Location Of Normal Datafile SQL> alter tablespace…
How to Drop Oracle Database With RMAN
You can run the following commands to delete the target database files, as well as all backups, copies, and archived logs associated with the database. Drop Oracle Database oracle@oratest~ ]$ rman target / Note : If database is not started, you have to start database with mount mode. If database is started, you have to…