Oracle 12c Logo

DBVERIFY: Offline Oracle Database Verification Utility For Datafile And segment

DBVERIFY is command-line utility ( external ) that used to performs physical data structure integrity check like data files, where it verifies data blocks corruption OR Segment corruption of data files.
We can use this utility to verify database backup file integrity check, i.e. Backup files are restorable or not.
This utility also called offline database verification utility, because we can verify/perform online as well as offline database integrity check. As we can perform it offline this utility is significantly faster.

Note:
DBVERIFY utility are limited to cache-managed blocks. ( data blocks )
Only used to verify data files, NOT with control files OR redo log files. Continue reading

Oracle 12c Logo

Online Move Datafiles in Oracle 12c R1 without getting file offline

Prior to Oracle 12c, moving datafiles to another location needs downtime ( Need to Offline datafiles ) but from Oracle 12c we can accomplish same with ALTER DATABASE command.

Syntax:
ALTER DATABASE MOVE DATAFILE ( ‘filename’ | ‘ASM_filename’ | file_number )
[ TO ( ‘filename’ | ‘ASM_filename’ ) ] [ REUSE ] [ KEEP ]

Note:

  • Source file would be specified with either filename, ASM_filename or file_number.
  • Destination file should be specified by filename only.
  • REUSE: New file should create even if it already exists.
  • KEEP: Original copy of the datafile should be retained.

 

// Online move datafile with the help of ALTER DATABASE command + File name.
SQL> select FILE_NAME, FILE_ID, TABLESPACE_NAME from dba_data_files where TABLESPACE_NAME=’SYSTEM’;

FILE_NAME FILE_ID TABLESPACE_NAME
—————————————————- ———- ———————–
/u01/app/oracle/oradata/ORCL/datafile/system01.dbf 1 SYSTEM

SQL> ALTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/ORCL/datafile/system01.dbf’ TO ‘/tmp/system01.dbf’;

Database altered.

// Ensure your changes by issuing same above query, In FILE_NAME column kindly observed the location of datafile has been changed to ‘/tmp/…’
SQL> select FILE_NAME, FILE_ID, TABLESPACE_NAME from dba_data_files where TABLESPACE_NAME=’SYSTEM’;

FILE_NAME FILE_ID TABLESPACE_NAME
—————————————————- ———- ———————–
/tmp/system01.dbf 1 SYSTEM

// Online move datafile with the help of ALTER DATABASE command + File number.
SQL> ALTER DATABASE MOVE DATAFILE 1 TO ‘/u01/app/oracle/oradata/ORCL/datafile/system01.dbf’;

Database altered.

// Ensure your changes by issuing same above query:
SQL> select FILE_NAME, FILE_ID, TABLESPACE_NAME from dba_data_files where TABLESPACE_NAME=’SYSTEM’;

FILE_NAME FILE_ID TABLESPACE_NAME
—————————————————- ———- ———————–
/u01/app/oracle/oradata/ORCL/datafile/system01.dbf 1 SYSTEM

 

Cheers!! Now we can move our datafile without downtime with Oracle 12c.

***********************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Oracle 12c Logo

ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 3072M – Oracle 12c

Today morning, I got new excitement with oracle error: ORA-00838. Error message itself self-explanatory.

Cause: Existing MEMORY_TARGET value not enough to start database.

Solution: Increase MEMORY_TARGET value.

 

Consider following workaround:

[oracle@12c bin]$ sqlplus “/ as sysdba” Continue reading

Oracle 12c Logo

ORA-38707: Media recovery is not enabled

Oracle Error: ORA-38707: Media recovery is not enabled

This error usually occurred when Media recovery is not enabled means database is not in archivelog mode. ( i.e. NoArchivelog mode ) After enabling it, you won’t face same error any more.

This tutorial will guide you to enable archivelog. Continue reading

Oracle 12c Logo

How to Configure Flashback Database in oracle 12c

Issue the following steps to configure your database with flashback recovery:

// Ensure flashback recovery settings by querying ‘v$database’ dictionary view, as follows:
SQL> select flashback_on from v$database;
FLASHBACK_ON
——————
NO

// Set db_recovery_file_dest system parameter for flashback recovery file destination:
[oracle@12c ~]$ sqlplus “/ as sysdba”
SQL> alter system set db_recovery_file_dest=’/u01/flash_recovery’ scope=both; Continue reading

Oracle 12c Logo

ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Today, I came across the “ORA-00265: instance recovery required, cannot set ARCHIVELOG mode” while converting database into archive log mode.

This error usually caused when database crashed unfortunately or we shutdown database with the help of database shutdown command as: shutdown abort, startup force mount or shutdown abort. These types of command will required instance recovery in next startup. In short it need clean database startup.

In my case, i am trying to alter database in archive log mode with “startup force mount” command:
SQL> startup force mount
ORACLE instance started.

Total System Global Area 1503199232 bytes
Fixed Size 2288584 bytes
Variable Size 905970744 bytes
Database Buffers 587202560 bytes
Redo Buffers 7737344 bytes
Database mounted.
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

 

// Solution:

SQL> select open_mode from v$database;

OPEN_MODE
——————–
MOUNTED

// Open your database and shutdown it normally, as follow:

SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

// Now startup database in mount state:
SQL> startup mount
ORACLE instance started.

Total System Global Area 1503199232 bytes
Fixed Size 2288584 bytes
Variable Size 905970744 bytes
Database Buffers 587202560 bytes
Redo Buffers 7737344 bytes
Database mounted.

// Now issue following to convert database into archivelog mode:
SQL> alter database archivelog;

Database altered.

// Now open database:
SQL> alter database open;

Database altered.

Database has been configured in archivelog without oracle error:ORA-00265, because this time we shutdown our database in normal way.

 

***********************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Oracle 12c Logo

How to configure oracle 12c database in archivelog mode

Connect database as sys user to configure it in archivelog mode.

[oracle@12c ~]$ sqlplus “/ as sysdba”

// Archive log list: Database is in ‘No Archive Mode’.

SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/arch
Oldest online log sequence 140
Current log sequence 142

// Shutdown database:

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

// Startup your database in mount state:

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1503199232 bytes
Fixed Size 2288584 bytes
Variable Size 905970744 bytes
Database Buffers 587202560 bytes
Redo Buffers 7737344 bytes
Database mounted.

// Configure your database in archivelog mode by issue the following:

SQL> alter database archivelog;

Database altered.

// Alter database in open mode:

SQL> alter database open;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
——————–
READ WRITE

// Database has been successfully configured in archive log mode. Issue the following:

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/arch
Oldest online log sequence 142
Next log sequence to archive 144
Current log sequence 144

 

***********************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Oracle 12c Logo

ORA-65096: invalid common user or role name and ORA-65049: creation of local user or role is not allowed in CDB$ROOT

This error usually occurs due to we are trying to create user ( common user ) under root container. In oracle 12c there is two type of users: common user and local user.

Common users belongs to CBD’s as well as current and future PDB’s. It means it can performed operation in Container or Pluggable according to Privileges assigned. For more information about common user.

Local users is purely database that belongs to only single PDB. This user may have administrative privileges but this only belongs to that PDB. For more information about local user.

// Consider following example in which i am trying to create common user in container root. Continue reading

Oracle 11g Logo

ORA-00845: MEMORY_TARGET not supported on this system

Today morning, My one of the friend reported me oracle error: “ORA-00845: MEMORY_TARGET not supported on this system” He has installed Oracle 11g R2 & not able to startup newly created database on newly installed oracle.

After diagnosis, I came to know it was the problem with ‘tmpfs’ with low space available.

This error pops up due to we are using Automatic Memory Management (AMM) feature of Oracle 11g R2 on shared memory filesystem (shmfs) which is found less than required.

Solutions for the mentioned error:

  • Increase value of oracle parameter: ‘memory_max_target’ & ‘memory_target’ and try to startup database.
  • If above not working than delete ‘memory_target’ parameter from parameter file & try to startup database.
  • If above not working than increase ‘tmpfs’ space.

Continue reading

Oracle 12c Logo

Managing Pluggable Databases from Pluggable as well as Container Databases

Following SQL* Plus are used to start/stop a pluggable databases.

Note:

  • Priviledged user must be use to connect pluggable database.
  • I will simulate whole pluggable database management with the help of HR & SALES pluggable databases.

 

[oracle@12c ~]$ sqlplus “/ as sysdba”
SQL> show con_name

CON_NAME Continue reading

Oracle 12c Logo

Delete Pluggable Database Manually using SQL Prompt

In previous article we have seen how to clone pluggable database manually from exisiting pluggable database ( Non seed )

In this article we will see how to delete pluggable database manually using SQL Prompt.

If required keep associated datafiles, in case of future use.

Note:

  • Pluggable database should be closed before being dropped.
  • I will simulate scenario with the help of PLUGDB & NEWPDB pluggable databases.

// Ensure your pluggable database mode by issuing the following query:
SQL> select name,open_mode from v$pdbs; Continue reading

Oracle 12c Logo

Clone a Pluggable Database Manually using SQL Prompt

To make a clone of existing pluggable database is exactly similar to creating a new pluggable database from the seed pluggable database.

Note:

  • We are using local pluggable database (non-seed) as the source to clone new pluggable database.
  • Source pluggable database should open in READ ONLY mode.
  • I will simulate scenario with the help of pluggable database: NEWPDB

// Ensure your pluggable database is in READ ONLY mode, if not then convert it into READ ONLY.

SQL> select name,open_mode from v$pdbs;

NAME OPEN_MODE Continue reading

Oracle 12c Logo

Create Pluggable Database Manually using SQL Prompt

In earlier article, we have seen the method of creating pluggable databases using configuration assistant.

In this article we will have a look & hands-on on creating a pluggable database manually with the help of SQL Prompt.

We can create PDB using PDB_FILE_NAME_CONVERT initialization parameter, In following example i am going to create new Pluggable Database, name: ‘newpdb’

[oracle@OL6 ~]$ sqlplus “/ as sysdba”
// Ensure database globale name by following SQL query:
SQL> select global_name from global_name;

GLOBAL_NAME Continue reading

Oracle 11g Logo

Enabling Archive log mode in RAC – Oracle 11g

In Database environment, set following database parameter as sysdba:

ALTER SYSTEM SET log_archive_format=’arch_%t_%s_%r.arc’ SCOPE=spfile;
ALTER SYSTEM SET log_archive_dest_1=’location=/u01/oradata/MYSID/archive/’ SCOPE=spfile;

In Grid environment, stop the entire clustered database by following command as oracle user.
$ srvctl stop database -d SID
Note:
By above command, database will be shutdown.
SID: Global database name.

In Database environment, issue the following command to enable archive log mode:
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
SHUTDOWN IMMEDIATE;

In Grid environment, start the entire clustered database by following command as oracle user:
$ srvctl start database -d MYSID
By above method you will alter your RAC database to archive log mode.
************************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Enabling Archive log mode in RAC – Oracle 10g

In Database environment, set following database parameter as sysdba:

ALTER SYSTEM SET log_archive_format=’arch_%t_%s_%r.arc’ SCOPE=spfile;
ALTER SYSTEM SET log_archive_dest_1=’location=Path_of_archive_dir’ SCOPE=spfile;

Mount your database in exlusive mode by following ‘alter system’ command:
ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile;
Note:
Database is not accessible to any application or user, being in exclusive mode.

In Grid environment, stop the entire clustered database by following command as oracle user.
$ srvctl stop database -d SID
Note:
By above command, database will be shutdown.

SID: Global database name.

 

In Database environment, issue the following command to enable archive log mode:
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile;
SHUTDOWN IMMEDIATE;

Note:
CLUSTER_DATABASE parameter has been changed to its orignal value.

In Grid environment, start the entire clustered database by following command as oracle user:
$ srvctl start database -d MYSID

In Database environment, Ensure changes by following SQL command:
SQL> archive log list;

 

By above method you will alter your RAC database to archive log mode.

************************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

SQL Server 2014 logo

How to uninstall SQL-Server 2014 Instance

In this article you will find a perfect way to uninstall a stand-alone instance of SQL Server 2014.

Pre-requisites to uninstall an SQL Server instance:

  • You must login system as local administrator with permission to log on as a service.
  • You must have minimum amount of physical memory with enough page size. ( page size = 2 times of physical memory )

Important points to be consider before uninstall SQL Server 2014:

  • Backup your database.
  • Drop/Delete local security groups.
  • All SQL server services must be stop. This would leads to successful removal of SQL Server.

Continue reading

SQL Server 2014 logo

SQL server 2014 stand alone installation

This article shows you step by step installation guide of SQL server 2012 ( stand alone ) on windows data center edition 64bit OS.

 

Download SQL Server 2012 from Microsoft website.

Following are the step by step guide with screenshot to install SQL server 2014:

Double click on Setup.exe this will pop up SQL server Installation Center prompt as below:

SQL server 2014 stand alone installation

SQL server 2014 stand alone installation

 

SQL server 2014 stand alone installation - SQL Server Installation Center

SQL server 2014 stand alone installation – SQL Server Installation Center

 

On SQL Server Installation Center wizard,

Click on Installation option available to left panel of SQL server Installation Center.

Then click on New SQL Server Stand-alone-installation or add features to an existing installation.

SQL server 2014 stand alone installation - SQL Server Installation Center

SQL server 2014 stand alone installation – SQL Server Installation Center

 

SQL server 2014 stand alone installation

SQL server 2014 stand alone installation

 

On Product Key wizard,

Provide your product key & click next.

In case you are evaluating SQL Server 2012 then go with Evaluation option.

SQL server 2014 stand alone installation - Product Key

SQL server 2014 stand alone installation – Product Key

 

On License Terms wizard,

Accept license terms & condition, click next.

SQL server 2014 stand alone installation - License Term

SQL server 2014 stand alone installation – License Term

 

On Install Rules wizard,

System Configuration Checker verifies your system Rules…

Click next.

SQL server 2014 stand alone installation - Install Rules

SQL server 2014 stand alone installation – Install Rules

 

On Install Setup Files wizard,

Downloading updates…

SQL server 2014 stand alone installation - Install Setup Files

SQL server 2014 stand alone installation – Install Setup Files

 

On Setup Role Wizard,

Select SQL Server Feature Installation radio button.

Click next.

SQL server 2014 stand alone installation - Setup Roles

SQL server 2014 stand alone installation – Setup Roles

 

On Feature Selection wizard,

Select feature according to your convenience.

Click next.

SQL server 2014 stand alone installation - Feature Selection

SQL server 2014 stand alone installation – Feature Selection

 

On Instance Configuration wizard,

Select Named instance radio button & give name of the instance.

In case of you wish to continue with default instance.

Click next.

SQL server 2014 stand alone installation - Instance Configuration

SQL server 2014 stand alone installation – Instance Configuration

 

On Server Configuration wizard, select Account Name as  NT AUTHORITY/NETWORK.

Set Startup Type as Automatic.

Click next.

SQL server 2014 stand alone installation - Server Configuration

SQL server 2014 stand alone installation – Server Configuration

 

On Database Engine Configuration wizard,

Select Mixed Mode radio button.

Enter your password.

Add current user.

Click next.

SQL server 2014 stand alone installation - Database Engine Configuration

SQL server 2014 stand alone installation – Database Engine Configuration

 

On Ready to Install wizard, Verify summary.

Click next.

SQL server 2014 stand alone installation - Ready to Install

SQL server 2014 stand alone installation – Ready to Install

 

On Installation Progress wizard, this will show you progress of software  installation.

SQL server 2014 stand alone installation - Installation Progress

SQL server 2014 stand alone installation – Installation Progress

 

On Complete Wizard, you will find list of features have been installed with status of completion.

SQL server 2014 stand alone installation

SQL server 2014 stand alone installation

 

By above steps you will accomplish installation of SQL Server 2014.

************************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Oracle 11g Logo

ORA-15260: permission denied on ASM disk group

If you are connected to your ASM instance with SYSDBA & try to add disk to your existing diskgroup then mentioned error will be appeared.

Workaround for the oracle error: ‘ORA-15260: permission denied on ASM disk group’ & ‘ORA-15032: not all alterations performed’ is to connect your ASM instance as SYSASM.

// Please consider following example, in which i was failed to alter existing ASM diskgroup with as SYSDBA: ( In my case DATA is my existing DG )
[root@database1 ~]# su – oracle
[oracle@database1 ~]$ grid_env
[oracle@database1 grid]$ echo $ORACLE_HOME
/u01/app/11.2.0/grid
[oracle@database1 ~]$ sqlplus “/ as sysdba”

SQL*Plus: Release 11.2.0.3.0 Production on Tue May 20 14:54:00 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> ALTER DISKGROUP DATA ADD DISK ‘/dev/oracleasm/disks/RMAN’ NAME DATA_0003 REBALANCE POWER 11;
ALTER DISKGROUP DATA ADD DISK ‘/dev/oracleasm/disks/RMAN’ NAME DATA_0003 REBALANCE POWER 11
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Real Application Clusters and Automatic Storage Management options
// Now connect ASM instance as SYSASM as follow:

[oracle@database1 ~]$ grid_env

[oracle@database1 ~]$ sqlplus “/ as sysasm”

SQL*Plus: Release 11.2.0.3.0 Production on Tue May 20 14:54:38 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> ALTER DISKGROUP DATA ADD DISK ‘/dev/oracleasm/disks/RMAN’ NAME DATA_0003 REBALANCE POWER 11;

Diskgroup altered.

SQL>

 

Enjoy… 🙂

***********************************************************************
Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Oracle 11g Logo

How to add disk to ASM diskgroup in Oracle 11g

Following step by step guide will help you to add disk to oracle ASM diskgroup.

// Following query will identify the Diskgroup to add disk:

SQL> select group_number, name from v$asm_diskgroup;
GROUP_NUMBER NAME
------------ ------------------------------
1 DATA

// Following query will identify the candidate disk:

SQL> SELECT MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,TOTAL_MB,FREE_MB,NAME,PATH,LABEL FROM V$ASM_DISK;

MOUNT_S HEADER_STATU MODE_ST STATE TOTAL_MB FREE_MB NAME PATH LABEL
------- ------------ ------- -------- ---------- ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------
CACHED MEMBER ONLINE NORMAL 10240 6528 DATA_0002 /dev/oracleasm/disks/OCR
CACHED MEMBER ONLINE NORMAL 307200 196112 DATA_0000 /dev/oracleasm/disks/ARCHIVE
CACHED MEMBER ONLINE NORMAL 307200 196141 DATA_0001 /dev/oracleasm/disks/DATA

// With the help of createdisk oracle utility, we will create oracle ASM disk. ( as root user ) Following command will create ASM disk:

[root@database1 ~]# /usr/sbin/oracleasm createdisk RMAN /dev/mapper/mpathg
Writing disk header: done
Instantiating disk: done

Note:
RMAN is the name of newly created ASM disk with path ‘/dev/mapper/mpathg’.

// Scan all oracle ASM disk after addition:

[root@database1 ~]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...

// Ensure all oracle ASM disk after scanning as follow:

[root@database1 ~]# /usr/sbin/oracleasm listdisks
ARCHIVE
DATA
OCR
 RMAN

OR

[oracle@database1 ~]$ cd /dev/oracleasm/disks/
[oracle@database1 disks]$ ls
ARCHIVE DATA OCR RMAN

// Now Add the newly created oracle ASM disk to existing ASM diskgroup with the help of following query:

[oracle@database1 disks]$ grid_env
[oracle@database1 disks]$ sqlplus "/ as sysasm"

SQL> ALTER DISKGROUP DATA ADD DISK '/dev/oracleasm/disks/RMAN' NAME DATA_0003 REBALANCE POWER 11;

Diskgroup altered.

// Ensure changes by issue following query:

SQL> SELECT MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,TOTAL_MB,FREE_MB,NAME,PATH,LABEL FROM V$ASM_DISK;
MOUNT_S HEADER_STATU MODE_ST STATE TOTAL_MB FREE_MB NAME PATH LABEL
------- ------------ ------- -------- ---------- ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------
CACHED MEMBER ONLINE NORMAL 307200 202544 DATA_0000 /dev/oracleasm/disks/ARCHIVE
CACHED MEMBER ONLINE NORMAL 10240 6743 DATA_0002 /dev/oracleasm/disks/OCR
CACHED MEMBER ONLINE NORMAL 307200 202578 DATA_0001 /dev/oracleasm/disks/DATA
CACHED MEMBER ONLINE NORMAL 307200 292732 DATA_0003 /dev/oracleasm/disks/RMAN

By above method, we can add disk to oracle ASM diskgroup.

***********************************************************************
Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a nice time. 🙂

SQL Server 2014 logo

How to change SQL Server 2014 database compatibility level

The day before yesterday i have published my thoughts about “Truncate log file up to 504 KB – SQL Server 2008, 2008-R2 & 2012”, today i am going to explain how to change compatibility of SQL Server 2014 databases.

Note:
We need to change compatibility of our earlier version of databases in order to use new features of SQL Server 2014. ( i.e. 120 )

This can be achieve in two ways, one by GUI prompt, means with the help of Microsoft SQL Server Management Studio & second with the help of T-SQL Script.

 

1st: Microsoft SQL Server Management Studio: ( GUI )
To change compatibility of SQL server databases, open Microsoft SQL Server Management Studio & Expand Databases.

Right click on TestDB >> select Properties, as show below:

How to change SQL Server 2014 database compatibility level

How to change SQL Server 2014 database compatibility level

 

On Database Properties wizard, Select Options tab & go for the Compatibility level as SQL Server 2014 (120) and click Ok.

How to change SQL Server 2014 database compatibility level - Database Property

How to change SQL Server 2014 database compatibility level – Database Property

 

2nd: T-SQL

Issue following T-SQL in order to change compatibility of databases:

USE [master]
GO
ALTER DATABASE [TestDB] SET COMPATIBILITY_LEVEL = 120
GO

How to change SQL Server 2014 database compatibility level - T-SQL

How to change SQL Server 2014 database compatibility level – T-SQL

 

By above two methods we can change compatibility of databases in SQL Server 2014 as well as SQL Server 2008, 2008-R2 & 2012.

 

Is your database log file ( .ldf ) size is greater then the data file ( .mdf ) size, then refer my one of the blog to truncate log file up to 504 KB.

***********************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.