1.不使用递归的方法调用。
public void traverseFolder1(String path) {
int fileNum = 0, folderNum = 0
File file = new File(path)
if (file.exists()) {
LinkedList list = new LinkedList()
File[] files = file.listFiles()
for (File file2 : files) {
if (file2.isDirectory()) {
System.out.println("文件夹:" + file2.getAbsolutePath())
list.add(file2)
fileNum++
} else {
System.out.println("文件:" + file2.getAbsolutePath())
folderNum++
}
}
File temp_file
while (!list.isEmpty()) {
temp_file = list.removeFirst()
files = temp_file.listFiles()
for (File file2 : files) {
if (file2.isDirectory()) {
System.out.println("文件夹:" + file2.getAbsolutePath())
list.add(file2)
fileNum++
} else {
System.out.println("文件:" + file2.getAbsolutePath())
folderNum++
}
}
}
} else {
System.out.println("文件不存在!")
}
System.out.println("文件夹共有:" + folderNum + ",文件共有:" + fileNum)
}
rda指雷达的硬件实体部分。
RDA有多个可能的释义,例如:
RDA(Radar Data Acquisition)雷达数据采集子系统。
雷达数据采集子系统是雷达的硬件实体部分。它由天线与伺服系统、定时器与信号源、发射机、接收机、信号处理器以及雷达监控等部分组成。
相关信息:
远程数据访问 (RDA) 使移动应用程序能够访问远程 SQL Server 数据库表中的数据,并将这些数据存储在本地 SQL Server Mobile 数据库表中。
随后该应用程序就可以读取和更新本地 SQL Server Mobile 数据库表。SQL Server Mobile 可以选择跟踪对本地表所做的所有更改。之后,应用程序可以将本地表中更改过的记录更新回 SQL Server 表。
在 SQL Server Mobile 中,将数据从 SQL Server 表传播至本地 SQL Server Mobile 表的过程称为“拉”数据。将本地 SQL Server Mobile 表中所做的更改传播回 SQL Server 表的过程称为“推”数据。
以下在AIX 6.1+Veritas CFS环境上安装11gR2 RAC :1. 11gR2 GI/RAC安装预备工作
1.1 安装环境:
硬件环境为2节点IBM p系列小型机,每个节点物理CPU数目32个,内存509440 MB,交换空间32768MB操作系统版本为64bit AIX 6.1(6100-06-09-1228)。
SettingValue
Machine and versionAIX macleandb-007 1 6 00F71C964C00
Fully qualified host namemacleandb-007
Platform64-bit AIX
O/S Version6.1.0.0
O/S Maintenance Level6100-06
O/S Service Pack Level6100-06-09-1228
Logged in asoracle
Last run asuid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1200(dba),1300(asmdba)
Executed as Oracle home owner?Yes
RDA home directory/oracle/rda
RDA work directory/oracle/rda
Output file prefixRDA
Output file directory/oracle/rda/output
Setup profileDB11g
Perform network pings?No
ItemValue
Processor(s)32 Processor(s) Installed
[01]: PowerPC_POWER7 3864 MHz
[02]: PowerPC_POWER7 3864 MHz
[03]: PowerPC_POWER7 3864 MHz
[04]: PowerPC_POWER7 3864 MHz
[05]: PowerPC_POWER7 3864 MHz
[06]: PowerPC_POWER7 3864 MHz
[07]: PowerPC_POWER7 3864 MHz
[08]: PowerPC_POWER7 3864 MHz
[09]: PowerPC_POWER7 3864 MHz
[10]: PowerPC_POWER7 3864 MHz
[11]: PowerPC_POWER7 3864 MHz
[12]: PowerPC_POWER7 3864 MHz
[13]: PowerPC_POWER7 3864 MHz
[14]: PowerPC_POWER7 3864 MHz
[15]: PowerPC_POWER7 3864 MHz
[16]: PowerPC_POWER7 3864 MHz
[17]: PowerPC_POWER7 3864 MHz
[18]: PowerPC_POWER7 3864 MHz
[19]: PowerPC_POWER7 3864 MHz
[20]: PowerPC_POWER7 3864 MHz
[21]: PowerPC_POWER7 3864 MHz
[22]: PowerPC_POWER7 3864 MHz
[23]: PowerPC_POWER7 3864 MHz
[24]: PowerPC_POWER7 3864 MHz
[25]: PowerPC_POWER7 3864 MHz
[26]: PowerPC_POWER7 3864 MHz
[27]: PowerPC_POWER7 3864 MHz
[28]: PowerPC_POWER7 3864 MHz
[29]: PowerPC_POWER7 3864 MHz
[30]: PowerPC_POWER7 3864 MHz
[31]: PowerPC_POWER7 3864 MHz
[32]: PowerPC_POWER7 3864 MHz
Total Physical Memory509440 MB
Swap: Max Size32768 MiB
Swap: Percent Used1%
1.1 网络环境:
对于每台机器,需要配置:
1 个机器固有IP 地址(Public IP)和对应的机器名,在DNS 中注册,或者写到
/etc/hosts 文件中。
1 个虚拟IP 地址(Virtual IP)和对应的服务名,在DNS 中注册,或者写到
/etc/hosts 文件中。(与Public IP 不同,但必须处于同一网段)
1 个互联IP 地址(Private IP)和对应的私有名,写到/etc/hosts 文件中。(这类IP
地址建议采用如: 172.168.*.* 或192.168.*.*网段的地址)
3 个SCAN IP地址,在DNS中注册,不适用DNS的情况下配置1个SCAN IP到/etc/hosts 中
NodeInterface NameTypeIp AddressRegistered in
macleandb-007macleandb-007Public192.168.18.227/etc/hosts
macleandb-008macleandb-008Public192.168.18.231/etc/hosts
macleandb-007macleandb-007-vipVIP192.168.18.226/etc/hosts
macleandb-008macleandb-008-vipVIP192.168.18.230/etc/hosts
macleandb-008macleandb-scan1SCAN IP192.168.18.224/etc/hosts
macleandb-007macleandb-007-privaPrivate172.168.1.101/etc/hosts
macleandb-008macleandb-008-privaPrivate172.168.1.102/etc/hosts
macleandb-007macleandb-007-privbPrivate172.168.2.101/etc/hosts
macleandb-008macleandb-008-privbPrivate172.168.2.102/etc/hosts
使用FTP测试网络传输速率,2节点传输文件平均速度为50M/s:
macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip macleandb-008-priva:/oracleThe authenticity of host ‘macleandb-008-priva (172.168.1.102)’ can’t be established.RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ‘macleandb-008-priva,172.168.1.102′ (RSA) to the list of known hosts.p10404530_112030_AIX64-5L_1of7.zip 20% 343MB 47.3MB/s 00:28 ETAKilled by signal 2.
macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip macleandb-008-privb:/oracle
The authenticity of host ‘macleandb-008-privb (172.168.2.102)’ can’t be established.
RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘macleandb-008-privb,172.168.2.102′ (RSA) to the list of known hosts.
p10404530_112030_AIX64-5L_1of7.zip 11% 202MB 51.2MB/s 00:28 ETAKilled by signal 2.
macleandb-007 #
macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip macleandb-008:/oracle
p10404530_112030_AIX64-5L_1of7.zip 17% 299MB 50.6MB/s 00:27 ETAKilled by signal 2.
1.1 缺省网关:
在每台机器上都要对于公网接口定义缺省网关。
定义网关是为了跨网段的客户端和应用服务器可以访问数据库服务器;如果操作系统已经
配置了静态或动态路由,此处无需再配置网关。
1.2 时钟同步:
11.2中使用GI自带的CTSSD节点间时间同步服务,不开启NTPD时间同步守护进程。
NTP is not required for 11gR2 since we have the Cluster Time Synchronization Service (CTSD), but if youare using NTP you need to use it with â..-xâ.. option:Checking: ps -ef |grep ntpsIf it has no -x option do below steps:
· a. Open the /etc/rc.tcpip file, and locate the following line: start /usr/sbin/xntpd “$src_running”
· b. Change the line to the following: start /usr/sbin/xntpd “$src_running” “-x”
· c. Save the file.
1.3 用户和组:
创建必要的grid和oracle用户,以及oinstall、dba等组,保持在2个节点间的UID、GID一致
macleandb-007 # mkgroup -’A’ id=’1000′ adms=’root’ oinstallmacleandb-007 # mkgroup -’A’ id=’1100′ adms=’root’ asmadminmacleandb-007 # mkgroup -’A’ id=’1200′ adms=’root’ dbamacleandb-007 # mkgroup -’A’ id=’1300′ adms=’root’ asmdbamacleandb-007 # mkgroup -’A’ id=’1301′ adms=’root’ asmopermacleandb-007 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ gridmacleandb-007 # mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oracle
macleandb-007 # mkdir -p /oracle/app/product/11.2.0/db_1
macleandb-007 # mkdir -p /oracle/app/product/grid
macleandb-007 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1
macleandb-007 # chown grid:oinstall /oracle/app/product/grid
macleandb-007 # chmod 755 /oracle/app/product/11.2.0/db_1
macleandb-007 # chmod 755 /oracle/app/product/grid
macleandb-008 # mkgroup -’A’ id=’1000′ adms=’root’ oinstall
macleandb-008 # mkgroup -’A’ id=’1100′ adms=’root’ asmadmin
macleandb-008 # mkgroup -’A’ id=’1200′ adms=’root’ dba
macleandb-008 # mkgroup -’A’ id=’1300′ adms=’root’ asmdba
macleandb-008 # mkgroup -’A’ id=’1301′ adms=’root’ asmoper
macleandb-008 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ grid
macleandb-008 # mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oracle
macleandb-008 # mkdir -p /oracle/app/product/11.2.0/db_1
macleandb-008 # mkdir -p /oracle/app/product/grid
macleandb-008 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1
macleandb-008 # chown grid:oinstall /oracle/app/product/grid
macleandb-008 # chmod 755 /oracle/app/product/11.2.0/db_1
macleandb-008 # chmod 755 /oracle/app/product/grid
macleandb-007 # id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)
macleandb-007 # id grid
uid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)
macleandb-008 # id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)
macleandb-008 # id grid
uid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)
赋予grid用户CAP_NUMA_ATTACH等权限:
macleandb-008 # lsuser -a capabilities gridgridmacleandb-008 # chuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE gridmacleandb-008 # lsuser -a capabilities gridgrid capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE
1.1 用户profile:
在profile文件中为Oracle和Grid用户配置必要的环境变量参数:
Grid profileumask 022export AIXTHREAD_SCOPE=Sexport ORACLE_HOME=/oracle/app/product/grid
export ORACLE_BASE=/oracle/app
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export CRS_HOME=$ORACLE_HOME
export LIBPATH=$ORACLE_HOME/lib
oracle profile
umask 022
export AIXTHREAD_SCOPE=S
export ORACLE_HOME=/oracle/app/product/11.2.0/db_1
export ORACLE_BASE=/oracle/app
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LIBPATH=$ORACLE_HOME/lib
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG=”Simplified Chinese”_China.AL32UTF8
1.1 配置oracle和grid用户的shell limit参数:
可以通过smitty chuser或者 修改/etc/security/limits配置文件配置用户的shell limit参数:
macleandb-007 # cat /etc/security/limitsoracle:fsize = -1data = -1stack = -1
core = -1
rss = -1
nofiles = -1
grid:
fsize = -1
data = -1
stack = -1
core = -1
rss = -1
nofiles = -1
$ ulimit -a
time(seconds)unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes)4194304
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user) unlimited
macleandb-008 # cat /etc/security/limits
oracle:
fsize = -1
data = -1
stack = -1
core = -1
rss = -1
nofiles = -1
grid:
fsize = -1
data = -1
stack = -1
core = -1
rss = -1
nofiles = -1
$ ulimit -a
time(seconds)unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes)4194304
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user) unlimited
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)