tonydba
asked on
to find the size
I was trying to find the size of the database...
The results not executed.
Can you please rectify..
SQL> select
( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) +
2 3 ( select nvl(sum(bytes),0)/1024/102 4/1024 temp_size from dba_temp_file s ) +
4 ( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) +
5 ( select sum(BLOCK_SIZE*FILE_SIZE_B LKS)/1024/ 1024/1024 controlfile_size fro m v$controlfile) "Size in GB"
6 from
7 dual
8
SQL> select
( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) +
2 3 2 3 ( select nvl(sum(bytes),0)/1024/102 4/1024 temp_size from dba_temp_file s ) +
4 4 ( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) +
5 5 ( select sum(BLOCK_SIZE*FILE_SIZE_B LKS)/1024/ 1024/1024 controlfile_size fro m v$controlfile) "Size in GB"
6 6 from
7 7 dual
8
The results not executed.
Can you please rectify..
SQL> select
( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) +
2 3 ( select nvl(sum(bytes),0)/1024/102
4 ( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) +
5 ( select sum(BLOCK_SIZE*FILE_SIZE_B
6 from
7 dual
8
SQL> select
( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) +
2 3 2 3 ( select nvl(sum(bytes),0)/1024/102
4 4 ( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) +
5 5 ( select sum(BLOCK_SIZE*FILE_SIZE_B
6 6 from
7 7 dual
8
First off, your examples lack either the "/" or ";" to execute the statement.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Note that Gerwin used in line 8, "dual;" whereas you had "dual".
2nd one runs also, same result.
How are you running this query and what error do you get?
How are you running this query and what error do you get?
Ahhh -- look at line 5, you have split the word "from" with a carriage return. Copy and paste Gerwin's example, or else run your code through a text editor to proof for punctuation.
Tony, a side comment since I don't have email access. You are asking a slew of great, new questions this week. Would you please take time to go back through them, and close the issues by awarding points. Guidelines on doing so are available with a help query.
Regards,
dvz
Regards,
dvz
ASKER
This is good..