DB2 Error Set Tablespace Container : SQL0968C The File System is Full


Error Set Tablespace Container : SQL0968C The File System is Full

We can solve this problem by using automatic management :

before
SET TABLESPACE CONTAINERS FOR 11 USING
  (File '/plnhr/new/TSLOB0101' 786432,
   File '/plnhr/new/TSLOB0102' 786432,
   File '/plnhr/new/TSLOB0103' 786432,
   File '/plnhr/new/TSLOB0104' 786432,
   File '/plnhr/new/TSLOB0105' 786432,
   File '/plnhr/new/TSLOB0106' 786432) ;

after
SET TABLESPACE CONTAINERS FOR 11 USING AUTOMATIC STORAGE

Error Install SQL Server 2014 An error occurred during the installation assembly.

I found this error when install SQL Server 2014 :


 I choose cancel, and installation still running. But when finished, Database Engine & Management Tools not installed.

To fix the problem, We need to download System Update Readiness Tool from :
https://support.microsoft.com/en-hk/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness#

Click Install, and our windows will install updates.
http://mintywhite.com/windows-7/7maintenance/trouble-installing-windows-updates-system-update-readiness-tool-windows/

db2 restore : SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

bash-4.2$ cd /db2data
bash-4.2$ ls
QAGAL28.0.db2qa.DBPART000.20170715091643.001  db2qa
bash-4.2$ db2 restore database QAGAL28 taken at 20170715091643
SQL0970N  The system attempted to write to a read-only file.  SQLSTATE=55009

When we facing error like this, we can solve this problem by :
bash-4.2$ ls
QAGAL28.0.db2qa.DBPART000.20170715091643.001  db2qa
bash-4.2$ pwd
/db2data
bash-4.2$ db2 restore database QAGAL28 from /db2data on /db2data
SQL2555I  The database was restored and then successfully upgraded to the
current DB2 release where you issued the RESTORE DATABASE command.
bash-4.2$ db2 list db directory

 System Database Directory

 Number of entries in the directory = 1

Database 1 entry:

 Database alias                       = QAGAL28
 Database name                        = QAGAL28
 Local database directory             = /db2data
 Database release level               = 14.00
 Comment                              =
 Directory entry type                 = Indirect
 Catalog database partition number    = 0
 Alternate server hostname            =
 Alternate server port number         =

Database Oracle : Increase Capacity Temporary Tablespace

We can increase capacity temporary tablespace by using command :

ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/gg1/temp03.dbf' SIZE 25M AUTOEXTEND ON;

it's different with datafile :
alter tablespace PRD_SOAINFRA add datafile '/u01/app/oracle/oradata/orcl4p2b/PRD_SOAINFRA2.dbf' size 32000M autoextend on;

when increasing temporary, we using word : TEMPFILE not DATAFILE

DB2 restore from path

We can restore DB2 from file backup on specify path by using command :

db2 restore db G24 user db2qa using db2qa123 from /BACKUP2/G24 taken at 20170716014859 into DBAT

or :

db2 restore database QAGAL28 from /db2data/bint on /db2data
db2 restore database QAGAL28 incremental from /db2data/bint on /db2data

After restore, we can check DB by using command : db2 list db directory :
[db2admin@db2server ~]$ db2 list db directory

 System Database Directory

 Number of entries in the directory = 2

Database 1 entry:

 Database alias                       = PLNBKP
 Database name                        = PLNBKP
 Local database directory             = /home/db2admin
 Database release level               = 14.00
 Comment                              =
 Directory entry type                 = Indirect
 Catalog database partition number    = 0
 Alternate server hostname            =
 Alternate server port number         =

Database 2 entry:

 Database alias                       = DBCM
 Database name                        = DBCM
 Local database directory             = /home/db2admin
 Database release level               = 14.00
 Comment                              =
 Directory entry type                 = Indirect
 Catalog database partition number    = 0
 Alternate server hostname            =
 Alternate server port number         =

By Default, when db already restored, it restore into parameter DFTDBPATH

db2 get dbm cfg | grep -i PATH
Default database path                       (DFTDBPATH) = /home/db2admin

DB2setup to upgrade database

1. Run ./db2setup, choose New Install

2. Choose Server Edition

3. Choose Typical, Uncheck "create an instance" because we have existing instance

4. Click Finish


Step by step upgrade DB2 from v10.1 to v11.1 on Linux in HADR environment

Hi all, we have existing environment like this :


Step by step to upgrade db2 :



Prerequisities
Make sure all prerequisities already passed.
yum install compat-libstdc++-33.i686
yum install compat-libstdc++-33.x86_64
yum install libstdc++.i686
yum install libstdc++.x86_64
yum install libstdc++-devel.i686
yum install pam-devel.i686
yum install pam-devel.x86_64

Rollforward db on standby
Rollforward db on standby to make upgrade db2 version in standby running without error
[db2admin@db2s2 ~]$ db2 rollforward db db_01 to end of logs and complete

                                 Rollforward Status

 Input database alias                   = db_01
 Number of members have returned status = 1

 Member ID                              = 0
 Rollforward status                     = not pending
 Next log file to be read               =
 Log files processed                    = S0000000.LOG - S0000019.LOG
 Last committed transaction             = 2017-07-12-02.14.52.000000 UTC

DB20000I  The ROLLFORWARD command completed successfully.
[db2admin@db2s2 ~]$ db2 get db cfg for gdev | grep -i PENDING
 Backup pending                                          = NO
 Rollforward pending                                     = NO
 Restore pending                                         = NO 

Execute db2setup 
http://willyristanto.blogspot.co.id/2017/07/db2setup-to-upgrade-database.html 

Upgrade instance
[root@db2s1 instance]# ./db2iupgrade -u db2fenc1 db2admin
DBI1446I  The db2iupgrade command is running.


DB2 installation is being initialized.

 Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)

Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end

Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end

Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end

The execution completed successfully.

For more information see the DB2 installation log at
"/tmp/db2iupgrade.log.53317".
DBI1070I  Program db2iupgrade completed successfully.


[root@db2s1 instance]#

Upgrade Database
[db2admin@db2s1 ~]$ db2 upgrade database gdev
SQL1032N  No start database manager command was issued.  SQLSTATE=57019
[db2admin@db2s1 ~]$ db2start
SQL8007W  There are "90" day(s) left in the evaluation period for the product
"DB2 Advanced Enterprise Server Edition". For evaluation license terms and
conditions, refer to the License Agreement document located in the license
directory in the installation path of this product. If you have licensed this
product, ensure the license key is properly registered. You can register the
license by using the db2licm command line utility. The license key can be
obtained from your licensed product CD.
07/12/2017 13:13:13     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.
[db2admin@db2s1 ~]$ db2 upgrade database gdev
DB20000I  The UPGRADE DATABASE command completed successfully.
[db2admin@db2s1 ~]$