Oracle PL/SQL/System Tables Views/global name
Версия от 13:45, 26 мая 2010; (обсуждение)
get global name
SQL>
SQL> set echo off
SQL> set serveroutput on size 1000000
SQL> define _editor=vi
SQL>
SQL> column object_name format a30
SQL> column segment_name format a30
SQL> column file_name format a40
SQL> column name format a30
SQL> column file_name format a30
SQL> column what format a30 word_wrapped
SQL>
SQL> set trimspool on
SQL> set long 5000
SQL> set linesize 100
SQL> set pagesize 9999
SQL>
SQL> column global_name new_value gname
SQL> set termout off
SQL> select lower(user) || "@" || global_name global_name from global_name;
GLOBAL_NAME
----------------------------------------------------------------------------------------------------
sqle@XE
1 row selected.
SQL> set termout on
SQL> set sqlprompt "&gname> "
SQL>
SQL> column TABLESPACE_NAME format a30 word_wrapped
SQL> column DEFAULT_TABLESPACE format a30 word_wrapped
SQL> column TEMPORARY_TABLESPACE format a30 word_wrapped
SQL>
SQL> --
Query global_name table
SQL>
SQL> set termout off
SQL> column global_name new_value gname
SQL> select lower(user) || "@" || global_name global_name
2 from global_name;
GLOBAL_NAME
----------------------------------------------------------------------------------
sqle@XE
1 row selected.
SQL> set termout on
SQL> set sqlprompt "&gname> "
SQL>
SQL> --