Altering databases
This topic involves making changes to a database's characteristics. We will see this command from the DB2 point of view and from an Oracle point of view. This may help clear misunderstandings from one environment to the other.
How to do it…
As understood in DB2, ALTER DATABASE
only has one function. Those of you coming from an Oracle DBA background should read on to From Oracle to DB2..., for further explanations.
The ALTER DATABASE
command lets you add or remove storage paths from the list of storage paths used for automatic storage table spaces.
Add storage path:
[db2inst1@nodedb21 ~]$ db2 "ALTER DATABASE NAV ADD STORAGE ON '/data1/db2'" DB20000I The SQL command completed successfully.
Remove storage path:
[db2inst1@nodedb21 ~]$ db2 "ALTER DATABASE NAV DROP STORAGE ON '/data1/db2'" DB20000I The SQL command completed successfully.
How it works…
Adding a storage path to a manual storage database makes it an automatic storage database. Existing manual storage table spaces...