Tuesday, November 18, 2014
Oracle: Check Table Analyzed Time
SELECT t.owner,
t.table_name AS "Table Name",
t.num_rows AS "Rows",
t.avg_row_len AS "Avg Row Len",
Trunc((t.blocks * p.value)/1024) AS SizeKB,
to_char(t.last_analyzed,'DD/MM/YYYY HH24:MM:SS') AS "Last Analyzed"
FROM dba_tables t,
v$parameter p
WHERE t.owner like '%PROD'
AND p.name = 'db_block_size'
ORDER by t.table_name,t.owner,t.last_analyzed desc,t.table_name
/
Friday, November 14, 2014
Tinycore Resources
Install SSH on Tinycore Linux
$ sudo tce-load -iw openssh.tcz
$ sudo cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
$ sudo /usr/local/etc/init.d/openssh start
Persist sshd
Append below lines to /opt/.filetool.lst
http://gr8idea.info/os/tutorials/tiny-core/resolution.html
/usr/local/etc/ssh
/etc/passwd
/etc/shadow
Protect user tc with password
Automatically start up sshd
Append below line to /opt/bootlocal.sh
/usr/local/etc/init.d/openssh start
Backup new configurations
$sudo filetool.sh -b
$ sudo filetool.sh -b
If using the live CD, when you get to the boot prompt, type "tinycore xsetup" and press enter.
$ sudo tce-load -iw openssh.tcz
$ sudo cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
$ sudo /usr/local/etc/init.d/openssh start
Persist sshd
Append below lines to /opt/.filetool.lst
http://gr8idea.info/os/tutorials/tiny-core/resolution.html
/usr/local/etc/ssh
/etc/passwd
/etc/shadow
Protect user tc with password
Automatically start up sshd
Append below line to /opt/bootlocal.sh
/usr/local/etc/init.d/openssh start
Backup new configurations
$sudo filetool.sh -b
Change Display Resolution
To change the screen resolution, in the menu (right mouse click), go to Tools -> Xvesa Setup. You will see a new window where you can change the screen resolution. Set this as desired, and press "Enter." You will see a new window where you can select the mouse type. Select the appropriate type, and press "Enter." For this to take effect, you need to turn the computer off and restart. To save settings, you must Backup when shutting down Tiny Core.
$ sudo filetool.sh -b
Alternate Methods
Another way to change the screen resolution is to edit the Grub menu. Open the file "menu.lst" in Grub, and add "xsetup" to the end of the line which begins with "kernel /boot/bzImage." After starting the computer, you will be able to select the screen resolution and mouse type. To save these settings, you must Backup when shutting down Tiny Core. Once this is set up, you can remove "xsetup" from Grub.If using the live CD, when you get to the boot prompt, type "tinycore xsetup" and press enter.
Xorg
If Xorg is installed, Xvesa Setup won't run. To overcome this, remove Xorg from the tce directory, start the computer without it, run Xvesa Setup, then put Xorg back. Restart the computer for it to be loaded.Friday, November 7, 2014
Oracle DB Optimization
Some info on the Optimizer, Optimizer Mode and the Cost Based Approach: http://docs.oracle.com/cd/B28359_01/server.111/b28274/optimops.htm#PFGRF001
http://www.dba-oracle.com/art_otn_cbo.htm
SET LINESIZE 300
SELECT t.owner,
t.table_name AS "Table Name",
t.num_rows AS "Rows",
t.avg_row_len AS "Avg Row Len",
Trunc((t.blocks * p.value)/1024) AS "Size KB",
to_char(t.last_analyzed,'DD/MM/YYYY HH24:MM:SS') AS "Last Analyzed"
FROM dba_tables t,
v$parameter p
WHERE t.owner like '%PROD'
AND p.name = 'db_block_size'
ORDER by t.owner,t.last_analyzed desc,t.table_name
/
Subscribe to:
Posts (Atom)