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.3 -r1.1.2.4 --- openacs-4/packages/acs-core-docs/www/database-management.html 7 Apr 2003 16:59:25 -0000 1.1.2.3 +++ openacs-4/packages/acs-core-docs/www/database-management.html 15 Apr 2003 17:03:01 -0000 1.1.2.4 @@ -1,10 +1,10 @@ -Database Management

Database Management

+Database Management

Database Management

by Joel Aufrecht
OpenACS docs are written by the named authors, but 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 @@ -17,10 +17,10 @@ SVRMGR> select username, sid, serial# from v$session where lower(username)='server0';

and then

 SVRMGR> alter system kill session 'sid,serial#';

where sid and serial# are - replaced with the corresponding values for the open session.

Use with caution!

+ 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 server0 including contents cascade constraints;

Deleting a PostgreSQL tablespace

+SVRMGR> drop tablespace server0 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 @@ -30,7 +30,7 @@ q, and then restart-aolserver server0.

Then, to drop the db, just do:

 server0:~$ dropdb server0
-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 @@ -46,4 +46,4 @@

Edit your crontab:

 joeuser:~$ crontab -e

We'll set vacuum up to run nightly at 1 AM. Add the following line:

-0 1 * * * /usr/local/pgsql/bin/vacuumdb birdnotes

($Id$)
View comments on this page at openacs.org
+0 1 * * * /usr/local/pgsql/bin/vacuumdb birdnotes
($Id$)
View comments on this page at openacs.org