Index: openacs-4/packages/acs-core-docs/www/database-management.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/database-management.html,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/acs-core-docs/www/database-management.html 4 May 2003 06:30:02 -0000 1.1.2.7 +++ openacs-4/packages/acs-core-docs/www/database-management.html 7 May 2003 17:40:58 -0000 1.1.2.8 @@ -1,13 +1,13 @@ -Database Management

Database Management

+Database Management

Database Management

by Joel Aufrecht
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Deleting a tablespace

Skip down for instructions on Deleting a PostgreSQL tablespace. -

Deleting an Oracle tablespace

+

Deleting a tablespace

Skip down for instructions on Deleting a PostgreSQL tablespace. +

Deleting an Oracle tablespace

Should it become necessary to rebuild a tablespace from scratch, - you can use the drop user command - in SVRMGRL with the cascade + you can use the drop user command + in SVRMGRL with the cascade option. This command will drop the user and every database object the user owns.

 SVRMGR> drop user service0 cascade;

@@ -20,17 +20,17 @@ replaced with the corresponding values for the open session.

Use with caution!

If you feel the need to delete everything related to the service, you can also issue the following:

-SVRMGR> drop tablespace service0 including contents cascade constraints;

Deleting a PostgreSQL tablespace

+SVRMGR> drop tablespace service0 including contents cascade constraints;

Deleting a PostgreSQL tablespace

Dropping a PostgreSQL tablespace is easy. You have to stop any AOLserver instances that are using the database that you wish to drop. If you're using daemontools, this is simple, just use the 'down' flag (-d). If you're using inittab, you have to comment out - your server in /etc/inittab, - reread the inittab with /sbin/init - q, and then restart-aolserver + your server in /etc/inittab, + reread the inittab with /sbin/init + q, and then restart-aolserver service0.

Then, to drop the db, just do:

 service0:~$ dropdb service0
-DROP DATABASE

Vacuum Postgres nightly

+DROP DATABASE

Vacuum Postgres nightly

The "vacuum" command must be run periodically to reclaim space. The "vacuum analyze" form additionally collects statistics on the disbursion of columns in the database, which the optimizer uses when