Sometimes you want to see your freespace in your tablespace.
Here we are
column total_space format 9,999,999,999,999
column freespace format 9,999,999,999
(select tablespace,
datafile total_space,
freespace freespace
from
(select tablespace_name tablespace
from dba_tablespaces where status=’ONLINE’) a,
(select tablespace_name tablespace1, sum(bytes) datafile
from dba_data_files group by tablespace_name) b,
(select tablespace_name tablespace2, sum(bytes) freespace
from dba_free_space group by tablespace_name) c
where tablespace=tablespace1 and
tablespace1=tablespace2(+));
Archive for April, 2007
Check Freespace in Tablespace
Posted in Oracle on April 30, 2007 | Leave a Comment »
Kill all user process
Posted in Solaris on April 30, 2007 | Leave a Comment »
Sometimes you want to kill all user process, you can’t do “kill -9 PID” for all process that users have.
You can use this trick
Example :
You (as root), want to kill all process which is had by user “oracle”.
Maybe you want to use this script before you shutdown immediate your Oracle DB
# ps -ef | grep [...]
Forget root password on MySQL
Posted in MySQL on April 27, 2007 | Leave a Comment »
1. Shutdown your mysql database
2. Turn on your mysql db with this comman.
#safe_mysqld –skip-grant-tables &
3. Enter mysql without using password
#mysql -u root
4.Update your root’s password
#update user set password=password(‘passwd_baru’) where
user=’root’;
5. Shutdown your mysql
6. Turn on your mysql daemon
#safe_mysqld &