Ask the Expert

Script for SHOW SGA command

Can please you send me the SQL script that SQL*Plus actually runs for SHOW SGA command?

    Requires Free Membership to View

When you issue SHOW SGA in SQL*Plus, then it runs the following SQL statement for you:

SELECT name,value FROM v$sga;

However, the first line of output from SHOW SGA is the following SQL statement:

SELECT 'Total System Global Area',SUM(value) FROM v$sga;

Performing a UNION ALL ties it all together:

SELECT 'Total System Global Area',SUM(value) FROM v$sga
UNION ALL
SELECT name,value FROM v$sga;

This was first published in March 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: