Index: openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html 12 Jul 2009 01:08:28 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html 13 Sep 2009 23:54:40 -0000 1.10 @@ -1,25 +1,25 @@ - -
Skip down for instructions on Deleting a PostgreSQL tablespace. -
+ +
Skip down for instructions on Deleting a PostgreSQL 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 $OPENACS_SERVICE_NAME cascade;
- If this does not work because svrmgrl "cannot drop a user that - is currently connected", make sure to kill the AOLserver using - this user. If it still does not work, do:
SVRMGR> select username, sid, serial# from v$session where lower(username)='$OPENACS_SERVICE_NAME';
and then
SVRMGR> alter system kill session 'sid, serial#';
+ the user owns.
SVRMGR> drop user $OPENACS_SERVICE_NAME cascade;
+ If this does not work because svrmgrl "cannot drop a user that + is currently connected", make sure to kill the AOLserver using + this user. If it still does not work, do:
SVRMGR> select username, sid, serial# from v$session where lower(username)='$OPENACS_SERVICE_NAME';
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 $OPENACS_SERVICE_NAME including contents cascade constraints;
+ related to the service, you can also issue the following:
SVRMGR> drop tablespace $OPENACS_SERVICE_NAME including contents cascade constraints;
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
- $OPENACS_SERVICE_NAME
.
Then, to drop the db, just do:
-[$OPENACS_SERVICE_NAME ~]$dropdb $OPENACS_SERVICE_NAME
+ your server in /etc/inittab, + reread the inittab with /sbin/init + q, and then restart-aolserver + $OPENACS_SERVICE_NAME.Then, to drop the db, just do:
+[$OPENACS_SERVICE_NAME ~]$ dropdb $OPENACS_SERVICE_NAME DROP DATABASE