星期二, 4月 12, 2016
免費資源-筆記
Font Aweson
http://fortawesome.github.io/Font-Awesome/
CC0圖庫
http://librestock.com/
https://unsplash.com/
BootStrap theme
https://colorlib.com/
https://jeweltheme.com/
http://www.bootbundle.com/
Color style
http://www.google.com/design/spec/style/color.html
Free SSL
https://letsencrypt.org/
星期四, 5月 29, 2014
Oracle Session
via SQL-Plus
via SQL-IDE
查詢參數
現況連線
LOCK Session
- sessions >= 1.1 * processes + 5
SQL> show paramtere processes;
SQL> alter system set processes=1000 scope=spfile;
SQL> show parameter processes;
SQL> create pfile from spfile;
SQL> shutdown immediate;
SQL> startup
via SQL-IDE
查詢參數
select value from v$parameter where name = 'processes';
select value from v$parameter where name = 'sessions';
現況連線
select * from v$session where username is not null;
select username, count(username) from v$session where username is not null group by username;
select machine, count(machine) from v$session where machine is not null group by machine;
select count(*) from v$process;
select count(*) from v$session;
select count(*) from v$session where status = 'ACTIVE';
select sid, serial#, username, program, machine, status from v$session;
LOCK Session
select * from DBA_DML_LOCKS;
select a.sid || ',' || a.serial#, a.machine from v$session a, DBA_DML_LOCKS b
where a.sid = b.session_id group by a.sid || ',' || a.serial#, a.machine
alter system kill session 'xxx,yyyy' immediate;
星期三, 1月 03, 2007
Oracle: 如何在 SQL 敘述中使用包含 & 字元的字串常數
ref: http://www.cine.idv.tw/Learning/ComputerScience/Database/oracle/AppNotes/appnote-59824f555728-sql-65588ff04e2d4f7f75285305542b-5b57514376845b574e325e386578/
shortie 發現 TOAD 的 SQL Editor ,會把 '&' 字元後的字串,當成變數名稱,造成無法直接將欄位之值,更新為包含 '&' 字元的字串...
問題描述
INSERT INTO DTBDRG (
DRG_CODE, DRG_NHI_CODE, DRG_NAME, DRG_JD_FLAG,
DRG_SPEC, DRG_UNIT, DRG_CHARACTER, DRG_TEST_FLAG, DRG_BRAND)
VALUES (
'1CL100', 'A042448100', 'CLOPINE 100mg (Clozapine) ', ' ',
'100mg ', 'Tab ', ' ', ' ', '瑞士[1.2.2.1&~2]');
在 TOAD 中無法執行。
解決方案
這嚴格說起來並不能算是 PL/SQL 問題,而是 TOAD 的 SQL Editor 模仿 SQL *PLUS 的行為,所導致的結果。
我們只要如 http://www.jlcomp.demon.co.uk/faq/litampersand.html 中所述般地,將字串拆成兩段,把 '&' 字元放在第一段的最後一個位置即可。
也就是把上段 SQL ,做如下之修改即可完成更新的動作:
INSERT INTO DTBDRG (
DRG_CODE, DRG_NHI_CODE, DRG_NAME, DRG_JD_FLAG,
DRG_SPEC, DRG_UNIT, DRG_CHARACTER, DRG_TEST_FLAG, DRG_BRAND)
VALUES (
'1CL100', 'A042448100', 'CLOPINE 100mg (Clozapine) ', ' ',
'100mg ', 'Tab ', ' ', ' ', '瑞士[1.2.2.1&' || '~2]');
這個問題在下面兩本書中,也可以找到相關說明:
1. Oracle PL/SQL Programming, Fourth Edition
2. Oracle SQL*Plus: The Definitive Guide, 2nd Edition
星期四, 12月 28, 2006
星期三, 12月 27, 2006
memo: 休息一夏
記錄一下, 要不又會忘記.. Orz
http://qk.gokimo.com/
經緯度 景點尋找
http://qk.gokimo.com/mobile/?m=2
電力座標 景點尋找
http://qk.gokimo.com/mobile/?m=1
http://qk.gokimo.com/
經緯度 景點尋找
http://qk.gokimo.com/mobile/?m=2
電力座標 景點尋找
http://qk.gokimo.com/mobile/?m=1
全台大地震
恐怖呃~~~
20:37 2006/12/26 20:26 6.7 106 屏東恆春地震站西偏南 22.8 公里
20:38
http://www.cwb.gov.tw/V5/seismic/Data/quake/EC1226202667106.html
BTW, cwb 的 anti-DDoS 太遜了.. 十分後才有資料
第一次搖, 大家都覺得有點驚嚇到..
第二次搖, 我媽就嚇到往樓下移動了 :-
大家平安無事最好~
-t
20:37 2006/12/26 20:26 6.7 106 屏東恆春地震站西偏南 22.8 公里
20:38
http://www.cwb.gov.tw/V5/seismic/Data/quake/EC1226202667106.html
BTW, cwb 的 anti-DDoS 太遜了.. 十分後才有資料
第一次搖, 大家都覺得有點驚嚇到..
第二次搖, 我媽就嚇到往樓下移動了 :-
大家平安無事最好~
-t
星期三, 4月 19, 2006
GhostWall
http://www.ghostsecurity.com/index.php?page=ghostwall
100% FREE and CLEAN Software!
No spyware, adware or junkware
GhostWall is a firewall which allows you to restrict the communications between your computer and others. Unlike other firewalls which have forgotten their main role, GhostWall is simply a firewall mainly designed to replace the standard Microsoft firewall with better features and performance.
GhostWall works on Windows XP,XP-64 (x64),2000 and 2003
100% FREE and CLEAN Software!
No spyware, adware or junkware
GhostWall is a firewall which allows you to restrict the communications between your computer and others. Unlike other firewalls which have forgotten their main role, GhostWall is simply a firewall mainly designed to replace the standard Microsoft firewall with better features and performance.
GhostWall works on Windows XP,XP-64 (x64),2000 and 2003
星期日, 4月 02, 2006
- IT情報安全守護 -
http://www.kandamyoujin.or.jp/items/06.html
買了一個 IT情報安全守護
秋葉原電気街を氏子にもつ神田神社独自のコンピューター、携帯電話のお守り
です、当社はソフトウエアー会社やIT関連会社からも厚い崇敬を受けております
秋葉原電気街を氏子にもつ神田神社独自のコンピューター、携帯電話のお守り
です、当社はソフトウエアー会社やIT関連会社からも厚い崇敬を受けております
感謝電漿大長輩~
星期三, 2月 01, 2006
星期六, 1月 15, 2005
File System Object
MSDN Home > MSDN Library > Web Development > Scripting >
Windows Script Technologies > Script Runtime > FileSystemObject Object > FileSystemObject Basics
Windows Script Technologies > Script Runtime > FileSystemObject Object > FileSystemObject Basics
Oracle 常用文章查詢
Puget Sound Oracle Users Group
http://www.psoug.org/
Database Journal Oracle Database Administration News, Articles, Scripts, Tutorials, Forums, And Resources for the Oracle Database Professional:
http://www.databasejournal.com/features/oracle/
METALINK:
http://metalink.oracle.com
Oracle Technology Network(OTN):
http://www.oracle.com/technology/index.html
Oracle FAQ’s:
http://www.orafaq.com/
http://www.psoug.org/
Database Journal Oracle Database Administration News, Articles, Scripts, Tutorials, Forums, And Resources for the Oracle Database Professional:
http://www.databasejournal.com/features/oracle/
METALINK:
http://metalink.oracle.com
Oracle Technology Network(OTN):
http://www.oracle.com/technology/index.html
Oracle FAQ’s:
http://www.orafaq.com/
星期四, 9月 16, 2004
西元年 -> 民國年
Select (to_number(to_char(sysdate,'yyyy')) - 1911)to_char(sysdate,'/MM/DD HH24:MI:SS') AS AAD from dual;
select to_char(add_months(sysdate,-(1911*12)),'YY/MM/DD HH24:MI:SS') from dual;
select add_months(sysdate,-(1911*12)) from dual
-t
---
Tyson Chen
tysonchen () gmail
select to_char(add_months(sysdate,-(1911*12)),'YY/MM/DD HH24:MI:SS') from dual;
select add_months(sysdate,-(1911*12)) from dual
-t
---
Tyson Chen
tysonchen () gmail
星期四, 8月 26, 2004
取重複值
select * from global_deptgroup by dept_no,dept_namehaving count(dept_name)>1
取重複值
-t
---
Tyson Chen
tysonchen () gmail
取重複值
-t
---
Tyson Chen
tysonchen () gmail
星期三, 7月 21, 2004
Can one drop a column from a table?
Can one drop a column from a table?From Oracle8i one can DROP a column from a table. Look at this sample script, demonstrating the ALTER TABLE table_name DROP COLUMN column_name; command.
Other workarounds: 1. SQL> update t1 set column_to_drop = NULL;
SQL> rename t1 to t1_base;
SQL> create view t1 as select from t1_base;
2. SQL> create table t2 as select from t1;
SQL> drop table t1;
SQL> rename t2 to t1;
===========
rem -----------------------------------------------------------------------
rem Filename: dropcol.sql
rem Purpose: Demonstrate Oracle8i drop column functionality
rem Date: 28-Aug-1998
rem Author: Frank Naude, Oracle FAQ
rem -----------------------------------------------------------------------
-- drop table x
-- /
create table x(a date, b date, c date)
/
-- Drop column B:
alter table x set unused column b -- Mark col as UNUSED
/
select * from sys.dba_unused_col_tabs
/
alter table x drop unused columns
/
-- Drop column C (different method):
alter table x drop column c cascade constraints
/
=================
-t
---
Tyson Chen
tysonchen () gmail
Other workarounds: 1. SQL> update t1 set column_to_drop = NULL;
SQL> rename t1 to t1_base;
SQL> create view t1 as select
2. SQL> create table t2 as select
SQL> drop table t1;
SQL> rename t2 to t1;
===========
rem -----------------------------------------------------------------------
rem Filename: dropcol.sql
rem Purpose: Demonstrate Oracle8i drop column functionality
rem Date: 28-Aug-1998
rem Author: Frank Naude, Oracle FAQ
rem -----------------------------------------------------------------------
-- drop table x
-- /
create table x(a date, b date, c date)
/
-- Drop column B:
alter table x set unused column b -- Mark col as UNUSED
/
select * from sys.dba_unused_col_tabs
/
alter table x drop unused columns
/
-- Drop column C (different method):
alter table x drop column c cascade constraints
/
=================
-t
---
Tyson Chen
tysonchen () gmail
星期三, 7月 14, 2004
給我整個月,其餘免談
select create_date from break_report
where create_date between to_date('2004/07/01 00:00:00','YYYY/MM/DD HH24:MI:SS')
and last_day(to_date('2004/07/01 23:59:59','YYYY/MM/DD HH24:MI:SS'))
-t
---
Tyson Chen
tysonchen () gmail
where create_date between to_date('2004/07/01 00:00:00','YYYY/MM/DD HH24:MI:SS')
and last_day(to_date('2004/07/01 23:59:59','YYYY/MM/DD HH24:MI:SS'))
-t
---
Tyson Chen
tysonchen () gmail
星期一, 7月 05, 2004
當預約日期小於今天就不要show
select * from tt where to_date('2004' || '/' || tmonth || '/' || tday,'yyyy/mm/dd') > mdate
-t
---
Tyson Chen
tysonchen () gmail
-t
---
Tyson Chen
tysonchen () gmail
星期六, 6月 26, 2004
訂閱:
文章 (Atom)