|
| | Unregister snapshots
Script to generate sql to unregister snapshots in Oracle database
select 'exec DBMS_SNAPSHOT.UNREGISTER_SNAPSHOT(snapowner => ' || '''' || owner ||
'''' || ', snapname => ' || '''' || name || '''' || ', snapsite => ' || '''' ||
snapshot_site || '''' || ');'
from dba_registered_snapshots
/ | | More... 02/13/06 | | | | | | | | |
|
| | How to purge MySQL binary logs
You can put this command in crontab to run at regular intervals. This will purge database binary logs. $ designates shell prompt, replace passwd with the actual password.
$ /bin/echo 'reset master' | /usr/local/mysql/bin/mysql --password=passwd
| | More... 02/08/06 | | | | | | | | |
|
| | How to switch to another user
Need to become a different Oracle database user? There is a way to login into a another user's account without knowing their password:
1. Find out the encrypted password for the user
SQL> select username, password from dba_users where username = 'USERNAME';
USERNAME PASSWORD
------------ ------------------------------
USERNAME ... | |  More... 02/07/06 | | | | | | | | |
|
| | How to create externally identified user
This is an example how to create externally identified user in Oracle; i.e. if you want the os oracle user to connect to database without supplying password run the following statement from sqlplus:
SQL> create user OPS$ORACLE identified externally
default tablespace users
temporary ... | |  More... 02/07/06 | | | | | | | | |
|
| | Show system parameters on Solaris
The sysdef utility outputs the current system definition in tabular form. It lists all hardware devices, as well as pseudo devices, system devices, loadable modules, and the values of selected kernel tunable parameters.
$ /usr/sbin/sysdef
| | More... 02/06/06 | | | | | | | | |
|
| | How to kill Unix user session
One way to kill all sessions for a specific user is to run the following command (replace username with the actual user name):
kill -9 `ps -u username | grep -v PID | awk '{ printf ("%s ", $1); }'`
Of course you should only use the -9 option when you really ... | |  More... 01/25/06 | | | | | | | | |
|
| | How to find unused indexes
To determine if your indexes are being used or you can drop them use index monitoring (this feature is available from Oracle 9 onwards).
1. To start index monitoring:
SQL> alter index SAMPLE_INDEX monitoring usage;
If this statement fails with
ORA-00054: resource busy and acquire with NOWAIT specified
The index is already being used, so ... | |  More... 01/24/06 | | | | | | | | |
|
| | How to remove a parameter from spfile
This feature is available in Oracle 9 and Oracle 10. To remove a parameter from spfile and reset it to default value run the following command:
alter system reset "_db_block_lru_latches" scope=spfile sid='*';
| |  More... 01/23/06 | | | | | | | | |
|
| | Special syntax for searches in Google
This is a list of special commands to use for search on Google. They could greatly improve the quality of search results, filtering sites you are not interested in.
1. Search for something in the page title
intitle:
2. Restrict your search to the URL of websites
inurl:
3. Only search in the context of ... | | More... 01/17/06 | | | | | | | | |
|
<< 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page 10 | 11 | 12 | 13 | 14 | 15 | 16 >> |