Warning: mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home4/blessonj/public_html/blog/wp-content/plugins/keywords-cloud-for-wordpress/keywords-cloud.php on line 397

Warning: mysql_real_escape_string(): A link to the server could not be established in /home4/blessonj/public_html/blog/wp-content/plugins/keywords-cloud-for-wordpress/keywords-cloud.php on line 397

Archive for category Tutorials

Oracle query to get session pga & uga memory usage for inactive sessions

I’m listing below some of the queries I have created to see various oracle session related memory statistics. Replace all occurrences of XXXXXXXXXXXXXXXX with your database username. Please drop a comment below if these queries are useful for you guys.

Query for getting ‘session pga memory’ usage for inactive sessions:

select sum(ROUND(s.value/1024)) || ‘ KB’ as pga_memory_usage_inactive from v$sesstat s , v$statname n where s.statistic# = n.statistic# and sid in (select sid from v$session where status=’INACTIVE’ and type= ‘USER’ and username=’XXXXXXXXXXXXXXXX‘) and n.name = ‘session pga memory’ group by name ;

Query for getting ‘session pga memory’ usage for all sessions:

select sum(ROUND(s.value/1024)) || ‘ KB’ as pga_memory_usage_total from v$sesstat s , v$statname n where s.statistic# = n.statistic# and n.name = ‘session pga memory’ group by name ;

Query for getting ‘session uga memory’ usage for inactive sessions:

select sum(ROUND(s.value/1024)) || ‘ KB’ as uga_memory_usage_inactive from v$sesstat s , v$statname n where s.statistic# = n.statistic# and sid in (select sid from v$session where status=’INACTIVE’ and type= ‘USER’ and username=’XXXXXXXXXXXXXXXX‘) and n.name = ‘session uga memory’ group by name ;

Query for getting ‘session uga memory’ usage for all sessions:

select sum(ROUND(s.value/1024)) || ‘ KB’ as uga_memory_usage_total from v$sesstat s , v$statname n where s.statistic# = n.statistic# and n.name = ‘session uga memory’ group by name ;

You can determine how much memory each inactive session is consuming using the following query:

select TO_CHAR(ROUND(s.value/1024),99999999) || ‘ KB’ as Memory_Usage , n.name|| ‘(‘||s.statistic#||’)’ as memory_type , sid from v$sesstat s , v$statname n where s.statistic# = n.statistic# and sid in (select sid from v$session where status=’INACTIVE’ and type= ‘USER’ and username=’XXXXXXXXXXXXXXXX‘) and n.name like ‘%ga memory%’ order by value;

VN:F [1.9.12_1141]
Rating: 9.2/10 (5 votes cast)
VN:F [1.9.12_1141]
Rating: +2 (from 2 votes)

Tags: ,

How to get maximum limit of open_cursors, sessions and processes in Oracle

In order to display the maximum limit of open_cursors, sessions and processes in Oracle, you can run the below queries on SQL Plus:

select value from v$parameter where name = ‘open_cursors’

select value from v$parameter where name = ‘sessions’

select value from v$parameter where name = ‘processes’

VN:F [1.9.12_1141]
Rating: 8.0/10 (3 votes cast)
VN:F [1.9.12_1141]
Rating: +1 (from 1 vote)

Tags: , , ,

How to get current open_cursors utilization and maximum limit in Oracle

If you are looking for a query which will list you the current open_cursors utilization and maximum limit in Oracle database, then try the below given query:

select max(a.value) as highest_value, p.value as max_value from v$sesstat a, v$statname b, v$parameter p where a.statistic# = b.statistic# and b.name = ‘opened cursors current’ and p.name= ‘open_cursors’ group by p.value;

VN:F [1.9.12_1141]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.12_1141]
Rating: 0 (from 0 votes)

Tags: ,

Viewing PGA Statistics of your Oracle Database

VIEWING PGA STATISTICS

———————————-

V$PGASTAT – This view gives instance-level statistics on the PGA memory usage and the automatic PGA memory manager. For example:

SELECT * FROM V$PGASTAT;

VN:F [1.9.12_1141]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.12_1141]
Rating: 0 (from 0 votes)

Tags: ,

java.lang.Exception: SQL Error : java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)

If you get the following error in your java+jsp+oracle application, then you probably need to increase your maximum session/process limits (Default process and sessions limit in Oracle 9i are 150 and 170 respectively)

java.lang.Exception: SQL Error : java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)

Instructions for Increasing session, process and open_cursors max limits to 500 each are:

1. Login to SQL Plus as a normal user.

2. Run this query on SQL Plus (Replace xxxxxxxxxxxxx with your sys user password)

connect sys/xxxxxxxxxxxxx as sysdba

ALTER SYSTEM SET open_cursors=500 SCOPE=SPFILE;

3. Then run the below query on SQL Plus (Replace xxxxxxxxxxxxx with your sys user password)

connect sys/xxxxxxxxxxxx as sysdba

ALTER SYSTEM SET sessions=500 SCOPE=SPFILE;

4. Then run the below query on SQL Plus (Replace xxxxxxxxxxxxx with your sys user password)

connect sys/xxxxxxxxxxxxx as sysdba

ALTER SYSTEM SET processes=500 SCOPE=SPFILE;

5. Then run the below query on SQL Plus

commit;

6. Open Control Panel > Administrative Tools >  Services

7. Restart all the oracle services that are running.

That’s it. Now the open_cursors, session and process limits will be set to 500 each.

If you want to check the current value of session and process maximum limit you can run the below query any time.

SELECT name, value FROM v$parameter WHERE name = ‘sessions’;

and

SELECT name, value FROM v$parameter WHERE name = ‘processes’;

If you want to check the process & session current utilization, maximum utilization and maximum limit you can run the below query:

select
resource_name,
current_utilization,
max_utilization,
limit_value
from
v$resource_limit
where
resource_name in ( ‘sessions’, ‘processes’);

Hope instructions are clear. Please let me know if you need any more info.

VN:F [1.9.12_1141]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.12_1141]
Rating: +1 (from 1 vote)

Tags: , ,

How to change footer copyright text in your wordpress site (Mystique Theme)

In order to change the footer copyright text for Mystique Theme, login to your administrative account, click on the Mystique settings link under Appearance section. Go to the General section and edit the Footer content section.

If you use any other theme, check in your theme’s settings under Appearance and if there is no field for it, you can try editing the Footer (footer.php) manually. Editing footer.php or any other php related to the themes can be done by clicking on Editor link under Appearance section.

Hope it helps. If you need any further assistance, please feel free to write a comment below.

VN:F [1.9.12_1141]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.12_1141]
Rating: +1 (from 1 vote)

Tags: , , , ,

Unable to delete drupal sites folder when uninstalling? Here is the solution..

This is a common issue when people try to remove their test drupal installation files. Most of us try to delete all the files through ftp and suddenly we realize that it deletes all files except the sites folder and some files in it.

In order to delete these files you just need to change their permission to something like 775.

For changing the permission you need to login to your cpanel, go to the file manager and change the permission of all these files and folders

default.settings.php, settings.php and their parent folders default, sites and sibling folder files

Please note that you need to first set permissions of all of the above files and folders before attempting to delete any.

Hope it helps! Let me know if that doesn’t work for you..

-Blesson

VN:F [1.9.12_1141]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.12_1141]
Rating: -1 (from 1 vote)

How to install firefox plugins

In this post, I will show you two ways to install Firefox plugins (add-ons). The last few steps in each method is similar and I’ve put those in PART II. And PART I shows steps for each method separately.

I have used Video DownloadHelper 4.6.4 firefox plugin for this post. But any firefox plugin can be installed with similar steps.

PART I – Installing (2 Methods)

METHOD (1) – “Add to Firefox” – STEPS for installing the plugin directly on firefox:

Step 1. Open Firefox Add-ons website by following this link: Video DownloadHelper 4.6.4. Make sure this website is open with firefox browser.

Video DownloadHelper 4.6.4 Firefox Plugin

Video DownloadHelper 4.6.4 Firefox Plugin

Step 2. On the plugin web page you will see a green button named “Add to Firefox”. Click on that button.

Add to firefox button

Add to firefox button


Step 3. The “Software Installation” window appears. Click “Install Now” button.

Firefox Plugin Software Installation Window

Firefox Plugin Software Installation Window

Step 4. The video download helper starts to download. Wait till the download finishes in few seconds.

Video DownloadHelper downloading

Video DownloadHelper downloading

METHOD (2) – “Download the .xpi file” – STEPS for downloading the plugin as a .xpi file and installing:
Step 1 . Open Firefox Add-ons website by following this link: Video DownloadHelper 4.6.4. Make sure this website is open with any other browser than firefox.

Video DownloadHelper 4.6.4 Firefox Plugin on non firefox browsers

Video DownloadHelper 4.6.4 Firefox Plugin on non firefox browsers

Step 2. On the plugin web page you will see a green button named “Download Now”. Click on that button.

Download Now Firefox Plugin Button

Download Now Firefox Plugin Button

Step 3. Save the “downloadhelper-4.6.4-fx.xpi” file somewhere on your computer. You will need this file to do the installation later.

Step 4. Open a blank Firefox browser window.

Step 5. Drag to Firefox window, the “downloadhelper-4.6.4-fx.xpi” file that you had downloaded in step 3

Step 6. The “Software Installation” window appears. Click “Install Now” button.

Firefox Plugin Software Offline xpi Installation Window

Firefox Plugin Software Offline xpi Installation Window

PART II – Restarting and finalizing installation

Step 1. Click “Restart Firefox” button to finish the installation and restart firefox.

Restart Firefox after plugin installation

Restart Firefox after plugin installation

Step 2. If the following window shows up click “Restart” button.

Restart Firefox restore tabs

Restart Firefox restore tabs

Step 3. Firefox closes itself. Wait till firefox restarts on its own. When Firefox loads again, the plugin should be installed and ready to use (If the Add-ons window appears, just close it) .

VN:F [1.9.12_1141]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.12_1141]
Rating: 0 (from 0 votes)

Tags: , , , , , ,

Download youtube with DownloadHelper firefox plugin

For better understanding of the steps, please watch my video on this topic How to download youtube videos with DownloadHelper firefox plugin

A – HOW TO DOWNLOAD AND INSTALL Video DownloadHelper 4.6.4 firefox plugin:

Video DownloadHelper 4.6.4 is available here.

If you don’t know how to install it, please read my post on How to install firefox plugins

B – HOW TO USE Video DownloadHelper 4.6.4 firefox plugin to download any youtube video as .flv or .mp4 video file:

Step 1. Open a youtube video. I’m opening the following url for this example: 1,000,000 Subscribers!!!

Step 2. Click the down arrow next to DownloadHelper Icon on firefox toolbar. It should look something like the snapshot below. Basically you need to select the type of video that is available for download and click “Download” on the menu.

Video DownloadHelper Download Menu

Video DownloadHelper Download Menu

Step 3. Select the folder where you want to save the video and click save. The video file will be saved in the folder that you selected. Enjoy the video!

DONE!

If you don’t know how to play .flv files you might want to try this free flv player: Applian Technologies FLV Player FREE

There is also another method to download youtube videos: How to download youtube videos using keepvid.com

VN:F [1.9.12_1141]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.12_1141]
Rating: +1 (from 1 vote)

Tags: , , , , , , , , , , ,

Youtube to creative zen player video conversion

Please read my previous post to learn how to download youtube video as .flv file.

When you have downloaded the flv file, follow these easy steps to convert the video to the format that creative zen will play without any problems!

1. Open SUPER © Simplified Universal Player Encoder & Renderer and select the following settings.

super_settings_for_youtube_creative_zen

Output Container: AVI

Ouput Video Codec: MPEG-4

Output Audio Codec: mp3

FFmpeg or MEncoder: FFmpeg

Video Scale Size: 320:240

Aspect: 4:3

Frame/Sec: 30

Bitrate kbps: 1008

Sampling Frequency: 22050

Channels: 2

Bitrate kbps: 64

2. Drag and drop the .flv file to the super encoder file list.

3. Press Encode (Active Files) Button

4. when asked to select “Rendered file optimizer”, select DX50 – Best with DivX5/DivX6 decoders and click ok.

5. when the coversion is complete, the file should be ready to be just copied to Zen mp3/mp4 player using Zen Media Explorer without any more zen conversion!

VN:F [1.9.12_1141]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.12_1141]
Rating: 0 (from 0 votes)

Tags: , , , , , ,