DECLARE
match_count integer;
v_search_string varchar2(4000) :='%MYSTR%';
BEGIN
FOR t IN (SELECT owner, table_name, column_name FROM all_tab_columns WHERE DATA_TYPE ='CHAR' ) LOOP
EXECUTE IMMEDIATE
'SELECT COUNT(*) FROM '||t.owner || '.' || t.table_name||
' WHERE '||t.column_name||' like :1'
INTO match_count
USING v_search_string;
IF match_count > 0 THEN
dbms_output.put_line( t.owner || '.' || t.table_name ||' '||t.column_name||' '||match_count );
END IF;
END LOOP;
END;
我這只查出 DATA_TYPE='CHAR' 請依需求改成 VARCHAR2 NUMBER....等等.
2015年5月14日 星期四
2015年3月25日 星期三
FreeNas owncloud 安裝後心得 裝好後CLIENT 用IP 可以連到主機可是用 DOMAIN NAME 又不行. .
裝好後CLIENT 用IP 可以連到主機可是用 DOMAIN NAME 又不行. 就是需要需在 config.php 中設定 trusted domain .
用SSH 連上FreeNas
>jls
JID IP Address Hostname Path
6 - owncloud_1 /mnt/ztank/jails/owncloud_1
進入JID 為6 的 jails
>jexec 6 /bin/tcsh
vi /usr/pbi/owncloud-amd64/www/owncloud/config/cofnig.php
'trusted_domains' =>
array (
0 => '192.168.11.4',
0 => 'cloud.xxx.tw',
),
SSL renew
用SSH 連上FreeNas
>jls
JID IP Address Hostname Path
6 - owncloud_1 /mnt/ztank/jails/owncloud_1
進入JID 為6 的 jails
>jexec 6 /bin/tcsh
>cd /usr/pbi/owncloud-amd64/etc/apache24/
>openssl req -new -x509 -days 3650 -nodes -out owncloud.crt -keyout owncloud.key
#請回答FQDN 相關MSG.
>vi /usr/pbi/owncloud-amd64/etc/apache22/extra/httpd-ssl.conf
找到
SSLCertificateFile "/usr/pbi/owncloud-amd64/etc/apache24/server.crt
SSLCertificateKeyFile "/usr/pbi/owncloud-amd64/etc/apache24/server.key
換成
SSLCertificateFile "/usr/pbi/owncloud-amd64/etc/apache24/owncloud.crt
SSLCertificateKeyFile "/usr/pbi/owncloud-amd64/etc/apache24/owncloud.key
重啟 apache
/usr/local/etc/rc.d/apache22 restart
用SSH 連上FreeNas
>jls
JID IP Address Hostname Path
6 - owncloud_1 /mnt/ztank/jails/owncloud_1
進入JID 為6 的 jails
>jexec 6 /bin/tcsh
vi /usr/pbi/owncloud-amd64/www/owncloud/config/cofnig.php
'trusted_domains' =>
array (
0 => '192.168.11.4',
0 => 'cloud.xxx.tw',
),
SSL renew
用SSH 連上FreeNas
>jls
JID IP Address Hostname Path
6 - owncloud_1 /mnt/ztank/jails/owncloud_1
進入JID 為6 的 jails
>jexec 6 /bin/tcsh
>cd /usr/pbi/owncloud-amd64/etc/apache24/
>openssl req -new -x509 -days 3650 -nodes -out owncloud.crt -keyout owncloud.key
#請回答FQDN 相關MSG.
>vi /usr/pbi/owncloud-amd64/etc/apache22/extra/httpd-ssl.conf
找到
SSLCertificateFile "/usr/pbi/owncloud-amd64/etc/apache24/server.crt
SSLCertificateKeyFile "/usr/pbi/owncloud-amd64/etc/apache24/server.key
換成
SSLCertificateFile "/usr/pbi/owncloud-amd64/etc/apache24/owncloud.crt
SSLCertificateKeyFile "/usr/pbi/owncloud-amd64/etc/apache24/owncloud.key
重啟 apache
/usr/local/etc/rc.d/apache22 restart
2015年3月18日 星期三
VMWare Windows7 NIC did not work
1.關閉guest os
2.編輯 guest os 的 .vmx 檔
ethernet0.virtualDev = "e1000"
OK
2.編輯 guest os 的 .vmx 檔
3.在最下面加入一行
OK
2015年3月17日 星期二
在VMWare ESXi 5.x 上安裝FTP SERVER
請先開啟 vmware esxi server 的SSH.功能.
我是用vcenter client 去看主機的 configuration-> software\security profile-> service ( properites..)->
SSH -> option -> start automatically if... OK
請使用有 SSH 功能的 telnet 軟體, 我是用putty
登入後. 先下載ProFTPD FTP SERVER
可用 wget 方式下載或是自行下載後 再用 vcenter server client 上傳到 vmware esxi server中
wget http://esxi-customizer.googlecode.com/files/ProFTPD-1.3.3-8-offline_bundle.zip
再執行以下命令(紅字部份請改成你自己的路徑)
esxcli software vib install --no-sig-check -d /vmfs/volumes/yourpath/ftp/ProFTPD-1.3.3-8-offline_bundle.zip
.....
Installation Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed: VFrontDe_bootbank_ProFTPD_1.3.3-8
VIBs Removed:
VIBs Skipped:
等他安裝完後就完成了..
要移除ProFTPD 請用以下命令
esxcli software vib remove -n ProFTPD
這時你就可以用FTP Cient 來連進這個主機了.
我是用vcenter client 去看主機的 configuration-> software\security profile-> service ( properites..)->
SSH -> option -> start automatically if... OK
請使用有 SSH 功能的 telnet 軟體, 我是用putty
登入後. 先下載ProFTPD FTP SERVER
可用 wget 方式下載或是自行下載後 再用 vcenter server client 上傳到 vmware esxi server中
wget http://esxi-customizer.googlecode.com/files/ProFTPD-1.3.3-8-offline_bundle.zip
再執行以下命令(紅字部份請改成你自己的路徑)
esxcli software vib install --no-sig-check -d /vmfs/volumes/yourpath/ftp/ProFTPD-1.3.3-8-offline_bundle.zip
.....
Installation Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed: VFrontDe_bootbank_ProFTPD_1.3.3-8
VIBs Removed:
VIBs Skipped:
等他安裝完後就完成了..
要移除ProFTPD 請用以下命令
esxcli software vib remove -n ProFTPD
這時你就可以用FTP Cient 來連進這個主機了.
2014年11月29日 星期六
去日本必裝APP
去日本必裝APP
NTT的無線上網APP. 註冊可用90天沒用會被回收帳號
https://play.google.com/store/apps/details?id=com.nttbp.jfw
NAVITIME for Japan Travel
https://play.google.com/store/apps/details?id=com.navitime.inbound.walk&referrer=utm_source%3Dfrom_ntt%26utm_medium%3Dpc
Free Wifi
http://flets.com/freewifi/tw/spot.html
地鐵轉乘APP
https://play.google.com/store/apps/details?id=jp.co.jorudan.NrKjGree
NTT的無線上網APP. 註冊可用90天沒用會被回收帳號
https://play.google.com/store/apps/details?id=com.nttbp.jfw
NAVITIME for Japan Travel
https://play.google.com/store/apps/details?id=com.navitime.inbound.walk&referrer=utm_source%3Dfrom_ntt%26utm_medium%3Dpc
Free Wifi
http://flets.com/freewifi/tw/spot.html
地鐵轉乘APP
https://play.google.com/store/apps/details?id=jp.co.jorudan.NrKjGree
2014年11月8日 星期六
linux mount USB DISK (NTFS)
0.安裝 NTFS : sudo apt-get install ntfs-3g
1.查看所有 DEVICE 的狀況: fidks -l
2.查看所有 mount 資料: df -aTh
3.解除原本系統自動MOUNT 上來的東西
umount /media/AABBCCDDEE
4.重新mount 自己要的東西.
mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/usbhdd
5.去 nano /etc/fstab
增加一行
/dev/sda1 /media/usbhdd ntfs-3g uid=pi,gid=pi 0 0
注解:
-t vfat' tells the mount command that your drive has a fat32 file system. If your drive is formatted with NTFS, you should use '-t ntfs-3g' instead. The '-o uid=pi,gid=pi' part of the command means that the disk will be owned by user pi. You can use this command to unmount the disk:
1.查看所有 DEVICE 的狀況: fidks -l
2.查看所有 mount 資料: df -aTh
3.解除原本系統自動MOUNT 上來的東西
umount /media/AABBCCDDEE
4.重新mount 自己要的東西.
mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/usbhdd
5.去 nano /etc/fstab
增加一行
/dev/sda1 /media/usbhdd ntfs-3g uid=pi,gid=pi 0 0
注解:
-t vfat' tells the mount command that your drive has a fat32 file system. If your drive is formatted with NTFS, you should use '-t ntfs-3g' instead. The '-o uid=pi,gid=pi' part of the command means that the disk will be owned by user pi. You can use this command to unmount the disk:
2014年11月7日 星期五
重設 owncloud 密碼
OwnCloud 密碼忘了..
1先找出 owncloud.db 的存方地.
sudo find / -name "owncloud.db"
/var/www/owncloud/data/owncloud.db
2.先產生一組新的密碼
echo -n "1234567" | sha1sum
201231asdfafwerq913132412341412341 <=等下要UPDATE 密碼用的
3.進到1 的目錄中
cd /var/www/owncloud/data
4.進sqlite
sqlite3 owncloud.db
5. 先看看 owncloud 中 oc_users table 欄位的名稱
pragma table_info(people);
回傳
uid|varchar(64)||||
displayname|varchar(64)||
password|varchar(255)|||
6. Update使用者密碼.
update oc_users set password='201231asdfafwerq913132412341412341' where uid='user id'
OK
1先找出 owncloud.db 的存方地.
sudo find / -name "owncloud.db"
/var/www/owncloud/data/owncloud.db
2.先產生一組新的密碼
echo -n "1234567" | sha1sum
201231asdfafwerq913132412341412341 <=等下要UPDATE 密碼用的
3.進到1 的目錄中
cd /var/www/owncloud/data
4.進sqlite
sqlite3 owncloud.db
5. 先看看 owncloud 中 oc_users table 欄位的名稱
pragma table_info(people);
回傳
uid|varchar(64)||||
displayname|varchar(64)||
password|varchar(255)|||
6. Update使用者密碼.
update oc_users set password='201231asdfafwerq913132412341412341' where uid='user id'
OK
訂閱:
文章 (Atom)