1、oracle 查詢某張表的信息(如列名彻况、空間名等)
select * from user_tab_columns where table_name = upper('表名')
擴(kuò)展:查詢某張表的字段信息
select to_char(wm_concat(column_name)) from user_tab_columns where table_name = upper('表名')
2离唐、Oracle大小寫轉(zhuǎn)換函數(shù)
select lower(name) from 表名;
select upper(name) from 表名;
3、Oracle修改自身默認(rèn)連接數(shù)
3.1、在cmd命令行蹈集,輸入sqlplus
3.2、以SYSDBA的方式連接到數(shù)據(jù)庫
3.3雇初、查看processes和sessions參數(shù)
show parameter processes;
show parameter sessions;
3.4拢肆、修改processes和sessions值
alter system set processes=300 scope=spfile;
alter system set sessions=335 scope=spfile;
修改processes和sessions值必須重啟oracle服務(wù)器才能生效
ORACLE的連接數(shù)(sessions)與其參數(shù)文件中的進(jìn)程數(shù)(process)有關(guān),它們的關(guān)系如下:sessions=(1.1process+5)
3.5靖诗、重啟數(shù)據(jù)庫:
shutdown immediate;
startup;
3.6郭怪、查詢數(shù)據(jù)庫當(dāng)前進(jìn)程的連接數(shù):
select count() from v$process;
查看數(shù)據(jù)庫當(dāng)前會(huì)話的連接數(shù):
select count() from v$session;
查看數(shù)據(jù)庫的并發(fā)連接數(shù):
select count() from v$session where status='ACTIVE';
查看當(dāng)前數(shù)據(jù)庫建立的會(huì)話情況:
select sid,serial#,username,program,machine,status from v$session;
查詢數(shù)據(jù)庫允許的最大連接數(shù):
select value from v$parameter where name = 'processes';
或者:show parameter processes;
3.7、詳細(xì)操作: