本地创建Duplicate数据库,新创建的文件路径与目标数据库不同,并且辅助实例的初始化參数DB_NAME与目标数据库不能同样。

1.创建辅助实例的秘钥文件

[oracle@linux5 dbs]$ pwd

/u01/app/oracle/10.2.0/db_1/dbs

[oracle@linux5 dbs]$ orapwd file=/u01/app/oracle/10.2.0/db_1/dbs/orapworcldup password=safe entries=30

2.手工建库

[oracle@linux5 admin]$ pwd

/u01/app/oracle/admin

[oracle@linux5 admin]$ mkdir orcldup

[oracle@linux5 admin]$ cd orcldup/

[oracle@linux5 orcldup]$ mkdir {a,b,c,u}dump

[oracle@linux5 orcldup]$ ls

adump  bdump  cdump  udump

[oracle@linux5 orcldup]$

3.配置初始化參数文件

[oracle@linux5 orcldup]$ export ORACLE_SID=orcl

[oracle@linux5 orcldup]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 17 05:32:56 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> create pfile='/u01/dup_test/pfile' from spfile;

File created.

[oracle@linux5 orcldup]$ export ORACLE_SID=orcldup  创建辅助实例的spfile之前要指定sid为辅助实例的sid,否则会覆盖目标数据库。

[oracle@linux5 orcldup]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 17 05:31:41 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

[oracle@linux5 ~]$ cd /u01/

[oracle@linux5 u01]$ ls

app  arch  bak  dup_test

[oracle@linux5 u01]$ cd dup_test/

[oracle@linux5 dup_test]$ ls

pfile

[oracle@linux5 dup_test]$ pwd

/u01/dup_test

[oracle@linux5 dup_test]$ mkdir orcldup

[oracle@linux5 dup_test]$ ls

orcldup  pfile

PFILE:

*.control_files='/u01/dup_test/orcldup/control01.ctl','/u01/dup_test/orcldup/control02.ctl','/u01/dup_test/orcldup/control03.ctl'

*.db_block_size=8192

*.db_name='orcldup'

*.shared_pool_size=200000000

*.db_block_size=8192

*.db_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/dup_test/orcldup'

#*.log_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/dup_test/orcldup' 这样也能生成logfile,不用在duplicate再指定语句

*.log_file_name_convert='/u01/arch','/u01/dup_test/orcldup'

*.audit_file_dest='/u01/app/oracle/admin/orcldup/adump'

*.background_dump_dest='/u01/app/oracle/admin/orcldup/bdump'

*.compatible='10.2.0.1.0'

*.core_dump_dest='/u01/app/oracle/admin/orcldup/cdump'

*.user_dump_dest='/u01/app/oracle/admin/orcldup/udump'

SQL> create spfile from pfile='/u01/dup_test/pfile';

File created.

4.启动辅助实例

SQL> startup nomount  //必须启动到nomount状态后面才干够运行duplicate命令

ORACLE instance started.

Total System Global Area  281018368 bytes

Fixed Size                  1218968 bytes

Variable Size             226494056 bytes

Database Buffers           50331648 bytes

Redo Buffers                2973696 bytes

5.配置网络

/etc/sysconfig/network-scripts

eth0:

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth0

BOOTPROTO=static

DHCPCLASS=

HWADDR=00:0C:29:53:DB:E3

ONBOOT=yes

IPADDR=10.255.17.222

NETMASK=255.255.0.0

GATEWAY=10.255.0.1

~                                                                                                                        

~

eth1:

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth1

BOOTPROTO=static

ONBOOT=yes

HWADDR=00:0c:29:53:db:ed

IPADDR=192.168.1.222

NETMASK=255.255.255.0

~                                                                                                                        

~                                                                                                                        



[root@linux5 network-scripts]# service network stop

Shutting down interface eth0:                              [  OK  ]

Shutting down interface eth1:                              [  OK  ]

Shutting down loopback interface:                          [  OK  ]

[root@linux5 network-scripts]# service network start

Bringing up loopback interface:                            [  OK  ]

Bringing up interface eth0:                                [  OK  ]

Bringing up interface eth1:                                [  OK  ]

配置监听和网络服务名                                                           

LISTENER.ORA

# listener.ora Network Configuration File: /u01/app/oracle/10.2.0/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = orcl)

      (ORACLE_HOME = /u01/app/oracle/10.2.0/db_1)

      (global_name = orcl)

    )

  (SID_DESC =

      (SID_NAME = orcldup)

      (ORACLE_HOME = /u01/app/oracle/10.2.0/db_1)

      (global_name = orcldup)

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.222)(PORT = 1521))

    )

  )

TNSNAMES.ORA

# tnsnames.ora Network Configuration File: /u01/app/oracle/10.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

orcl_local =

  (DESCRIPTION =

   (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.222)(PORT = 1521))

   )

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )

orcl_dup =

  (DESCRIPTION =

   (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.222)(PORT = 1521))

   )

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcldup)

    )

  )

EXTPROC_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

    )

    (CONNECT_DATA =

      (SID = PLSExtProc)

      (PRESENTATION = RO)

    )

  )

重新启动监听,使其生效

[oracle@linux5 admin]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-APR-2014 04:56:44

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))

The command completed successfully

[oracle@linux5 admin]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-APR-2014 04:59:12

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /u01/app/oracle/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production

System parameter file is /u01/app/oracle/10.2.0/db_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/10.2.0/db_1/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.222)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                17-APR-2014 04:59:12

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/10.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.222)(PORT=1521)))

Services Summary...

Service "orcl" has 1 instance(s).

  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

Service "orcldup" has 1 instance(s).

  Instance "orcldup", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

6.启动目标数据库到MOUNT或OPEN状态

[oracle@linux5 orcldup]$ export ORACLE_SID=orcl   //ORACLE_SID要大写

[oracle@linux5 orcldup]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 17 05:08:29 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  1218316 bytes

Variable Size              75499764 bytes

Database Buffers           88080384 bytes

Redo Buffers                2973696 bytes

Database mounted.

Database opened.

7.验证备份

RMAN> list backup of database

2> ;

using target database control file instead of recovery catalog

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

5       Full    573.44M    DISK        00:00:53     26-FEB-14     

        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20140226T035256

        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_02_26/o1_mf_nnndf_TAG20140226T035256_9jvodwgh_.bkp

  List of Datafiles in backup set 5

  File LV Type Ckp SCN    Ckp Time  Name

  ---- -- ---- ---------- --------- ----

  1       Full 500685     26-FEB-14 /u01/app/oracle/oradata/orcl/system01.dbf

  2       Full 500685     26-FEB-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf

  3       Full 500685     26-FEB-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf

  4       Full 500685     26-FEB-14 /u01/app/oracle/oradata/orcl/users01.dbf

  5       Full 500685     26-FEB-14 /u01/app/oracle/oradata/orcl/example01.dbf

8.RMAN连接目标库和辅助实例,正式环境依据实际分配通道

[oracle@linux5 admin]$ rman target sys/oracle@orcl_local auxiliary sys/safe@orcl_dup

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Apr 17 05:54:44 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: ORCL (DBID=1368292794)

connected to auxiliary database: ORCLDUP (not mounted)

RMAN> duplicate target database to orcldup

2> ;

Starting Duplicate Db at 17-APR-14

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=35 devtype=DISK

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of Duplicate Db command at 04/17/2014 05:57:23

RMAN-05501: aborting duplication of target database

RMAN-05001: auxiliary filename /u01/app/oracle/oradata/orcl/redo03.log conflicts with a file used by the target database

RMAN-05001: auxiliary filename /u01/app/oracle/oradata/orcl/redo02.log conflicts with a file used by the target database

RMAN-05001: auxiliary filename /u01/app/oracle/oradata/orcl/redo01.log conflicts with a file used by the target database

RMAN> duplicate target database to orcldup  //先要创建/u01/app/oracle/oradata/orcldup

2> logfile

3> '/u01/app/oracle/oradata/orcldup/redo01.log' size 20m,

4> '/u01/app/oracle/oradata/orcldup/redo02.log' size 20m,

5> '/u01/app/oracle/oradata/orcldup/redo03.log' size 20m

6> ;

Starting Duplicate Db at 17-APR-14

using channel ORA_AUX_DISK_1

contents of Memory Script:

{

   set until scn  500750;

   set newname for datafile  1 to

 "/u01/dup_test/orcldup/system01.dbf";

   set newname for datafile  2 to

 "/u01/dup_test/orcldup/undotbs01.dbf";

   set newname for datafile  3 to

 "/u01/dup_test/orcldup/sysaux01.dbf";

   set newname for datafile  4 to

 "/u01/dup_test/orcldup/users01.dbf";

   set newname for datafile  5 to

 "/u01/dup_test/orcldup/example01.dbf";

   restore

   check readonly

   clone database

   ;

}

executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 17-APR-14

using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /u01/dup_test/orcldup/system01.dbf

restoring datafile 00002 to /u01/dup_test/orcldup/undotbs01.dbf

restoring datafile 00003 to /u01/dup_test/orcldup/sysaux01.dbf

restoring datafile 00004 to /u01/dup_test/orcldup/users01.dbf

restoring datafile 00005 to /u01/dup_test/orcldup/example01.dbf

channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_02_26/o1_mf_nnndf_TAG20140226T035256_9jvodwgh_.bkp

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_02_26/o1_mf_nnndf_TAG20140226T035256_9jvodwgh_.bkp tag=TAG20140226T035256

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:12

Finished restore at 17-APR-14

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ORCLDUP" RESETLOGS ARCHIVELOG

  MAXLOGFILES     16

  MAXLOGMEMBERS      3

  MAXDATAFILES      100

  MAXINSTANCES     8

  MAXLOGHISTORY      292

 LOGFILE

  GROUP  1 '/u01/app/oracle/oradata/orcldup/redo01.log' SIZE 20 M ,

  GROUP  2 '/u01/app/oracle/oradata/orcldup/redo02.log' SIZE 20 M ,

  GROUP  3 '/u01/app/oracle/oradata/orcldup/redo03.log' SIZE 20 M

 DATAFILE

  '/u01/dup_test/orcldup/system01.dbf'

 CHARACTER SET WE8ISO8859P1

contents of Memory Script:

{

   switch clone datafile all;

}

executing Memory Script

released channel: ORA_AUX_DISK_1

datafile 2 switched to datafile copy

input datafile copy recid=1 stamp=845100699 filename=/u01/dup_test/orcldup/undotbs01.dbf

datafile 3 switched to datafile copy

input datafile copy recid=2 stamp=845100699 filename=/u01/dup_test/orcldup/sysaux01.dbf

datafile 4 switched to datafile copy

input datafile copy recid=3 stamp=845100699 filename=/u01/dup_test/orcldup/users01.dbf

datafile 5 switched to datafile copy

input datafile copy recid=4 stamp=845100700 filename=/u01/dup_test/orcldup/example01.dbf

contents of Memory Script:

{

   set until scn  500750;

   recover

   clone database

    delete archivelog

   ;

}

executing Memory Script

executing command: SET until clause

Starting recover at 17-APR-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=35 devtype=DISK

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=7

channel ORA_AUX_DISK_1: reading from backup piece /u01/bak/rman_bak_02-26_840513235.bak

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/u01/bak/rman_bak_02-26_840513235.bak tag=TAG20140226T035355

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04

archive log filename=/u01/app/oracle/10.2.0/db_1/dbs/arch1_7_840512061.dbf thread=1 sequence=7

channel clone_default: deleting archive log(s)

archive log filename=/u01/app/oracle/10.2.0/db_1/dbs/arch1_7_840512061.dbf recid=1 stamp=845100711

media recovery complete, elapsed time: 00:00:11

Finished recover at 17-APR-14

contents of Memory Script:

{

   shutdown clone;

   startup clone nomount ;

}

executing Memory Script        //////long  time  有链接卡在这。最好仅仅开一个窗体

database dismounted

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     281018368 bytes

Fixed Size                     1218968 bytes

Variable Size                226494056 bytes

Database Buffers              50331648 bytes

Redo Buffers                   2973696 bytes

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ORCLDUP" RESETLOGS ARCHIVELOG

  MAXLOGFILES     16

  MAXLOGMEMBERS      3

  MAXDATAFILES      100

  MAXINSTANCES     8

  MAXLOGHISTORY      292

 LOGFILE

  GROUP  1 '/u01/app/oracle/oradata/orcldup/redo01.log' SIZE 20 M ,

  GROUP  2 '/u01/app/oracle/oradata/orcldup/redo02.log' SIZE 20 M ,

  GROUP  3 '/u01/app/oracle/oradata/orcldup/redo03.log' SIZE 20 M

 DATAFILE

  '/u01/dup_test/orcldup/system01.dbf'

 CHARACTER SET WE8ISO8859P1

contents of Memory Script:

{

   set newname for tempfile  1 to

 "/u01/dup_test/orcldup/temp01.dbf";

   switch clone tempfile all;

   catalog clone datafilecopy  "/u01/dup_test/orcldup/undotbs01.dbf";

   catalog clone datafilecopy  "/u01/dup_test/orcldup/sysaux01.dbf";

   catalog clone datafilecopy  "/u01/dup_test/orcldup/users01.dbf";

   catalog clone datafilecopy  "/u01/dup_test/orcldup/example01.dbf";

   switch clone datafile all;

}

executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to /u01/dup_test/orcldup/temp01.dbf in control file

cataloged datafile copy

datafile copy filename=/u01/dup_test/orcldup/undotbs01.dbf recid=1 stamp=845228858

cataloged datafile copy

datafile copy filename=/u01/dup_test/orcldup/sysaux01.dbf recid=2 stamp=845228860

cataloged datafile copy

datafile copy filename=/u01/dup_test/orcldup/users01.dbf recid=3 stamp=845228862

cataloged datafile copy

datafile copy filename=/u01/dup_test/orcldup/example01.dbf recid=4 stamp=845228865

datafile 2 switched to datafile copy

input datafile copy recid=1 stamp=845228858 filename=/u01/dup_test/orcldup/undotbs01.dbf

datafile 3 switched to datafile copy

input datafile copy recid=2 stamp=845228860 filename=/u01/dup_test/orcldup/sysaux01.dbf

datafile 4 switched to datafile copy

input datafile copy recid=3 stamp=845228862 filename=/u01/dup_test/orcldup/users01.dbf

datafile 5 switched to datafile copy

input datafile copy recid=4 stamp=845228865 filename=/u01/dup_test/orcldup/example01.dbf

contents of Memory Script:

{

   Alter clone database open resetlogs;

}

executing Memory Script

database opened

Finished Duplicate Db at 18-APR-14

RMAN>

验证:

SQL> conn sys/safe@orcl_dup as sysdba

Connected.

SQL> select name from v$tablespace;

NAME

------------------------------

SYSTEM

TEMP

UNDOTBS1

SYSAUX

USERS

EXAMPLE

6 rows selected.

SQL> select name from v$datafile;

NAME

--------------------------------------------------------------------------------

/u01/dup_test/orcldup/system01.dbf

/u01/dup_test/orcldup/undotbs01.dbf

/u01/dup_test/orcldup/sysaux01.dbf

/u01/dup_test/orcldup/users01.dbf

/u01/dup_test/orcldup/example01.dbf

SQL> select name from v$tempfile;

NAME

--------------------------------------------------------------------------------

/u01/dup_test/orcldup/temp01.dbf

注意路径已经转化。

本地创建Duplicate数据库的更多相关文章

  1. 在相同的主机上创建一个duplicate数据库

    在相同的主机上创建一个duplicate数据库 source db:dbtest auxiliary db:dupdb duplicate database会自动分配一个新的DBID要确保auxili ...

  2. 使用RMAN创建复制数据库

    我的实验环境: - 源数据库A机: RHEL6.4 + Oracle 11.2.0.4 IP地址:192.168.99.159 db_name=oradb 数据库已正常运行 - 复制数据库B机: RH ...

  3. 可以这样创建E-Notebook数据库

    最新版的ChemDraw的名称是ChemOffice Professional 15.用户朋友们在使用它的E-Notebook功能的时候,会发现需要先创立一个数据库,作为上传文档的储存空间.并且还可以 ...

  4. 创建Oracle数据库、数据库名与实例名与SID之间的关系(图文详解)

    分类: Oracle(9) 版权声明:转载请注明出处 JmilkFan_范桂飓:http://blog.csdn.net/jmilk 目录(?)[+] 目录 目录 软件环境 前言 安装Oracle监听 ...

  5. ASP.NET Core Web API + Angular 仿B站(二)后台模型创建以及数据库的初始化

    前言: 本系列文章主要为对所学 Angular 框架的一次微小的实践,对 b站页面作简单的模仿. 本系列文章主要参考资料: 微软文档: https://docs.microsoft.com/zh-cn ...

  6. CREATE DATABASE - 创建新数据库

    SYNOPSIS CREATE DATABASE name [ [ WITH ] [ OWNER [=] dbowner ] [ LOCATION [=] 'dbpath' ] [ TEMPLATE ...

  7. ArcGIs创建企业级数据库

    本文主要描述ArcGIs创建企业级数据库. 目标:创建企业级地理数据库,使用ArcMap通过SDE引擎 与Oracle交互数据,创建完成后将本地的mdb数据库中数据迁移到Oracle的地理数据库当中. ...

  8. 创建ASP.NET Core MVC应用程序(3)-基于Entity Framework Core(Code First)创建MySQL数据库表

    创建ASP.NET Core MVC应用程序(3)-基于Entity Framework Core(Code First)创建MySQL数据库表 创建数据模型类(POCO类) 在Models文件夹下添 ...

  9. 创建ACCESS数据库,并且创建表和数据。重点:关闭ACCESS数据库引用

    /// <summary> /// 创建ACCESS数据库,并且创建表和数据 /// </summary> /// <param name="dictTable ...

随机推荐

  1. ajax请求发送和页面跳转的冲突

    http://blog.csdn.net/allenliu6/article/details/77341538?locationNum=7&fps=1 在A页面中,有一个click事件,点击时 ...

  2. C#连接六类数据库的代码集

    本文列出了C#连接Access.SQL Server.Oracle.MySQL.DB2和SyBase六种不同数据库的程序源码和需要注意的点. 1.C#连接Access 程序代码: ;

  3. c#中的Out, params,ref 细说并沉淀

    1. Out,params,ref之前先记录平时用的最多的按值传递参数的情况,当然默认情况下参数传入函数的默认行为也是按值传递的. 1: //默认情况下参数会按照值传递 2: static int a ...

  4. Win10下Docker学习(1)安装

    Docker简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制, ...

  5. ANDROID基础ACTIVITY篇之Activity的加载模式

    在这之前首先让我们先了解一下什么是Task Task,简单的说,就是一组以栈的模式聚集在一起的Activity组件集合.它们有潜在的前后驱关联,新加入的Activity组件,位于栈顶,并仅有在栈顶的A ...

  6. Java8 方式解决Stream流转其他数组

    Java8 方式解决Stream流转其他数组 一. 题记:原来的List转数组用的是如下方式: example private static void listToStringArray(List l ...

  7. eclipse中hibernate和mybatis中xml配置文件的没有标签提醒解决方法

    当我们使用eclipse编写Mybatis或hibernate的xml文件时,面对众多标签的配置文件,却没有自动提醒,对于工作和学习都十分不方便. 之所以没有自动提醒,是因为dtd文件没有加载成功. ...

  8. 写一个PHP函数,实现扫描并打印出指定目录下(含子目录)的所有jpg文件名

    写一个PHP函数,实现扫描并打印出指定目录下(含子目录)的所有jpg文件名 <?php $dir = "E:\照片\\";//打印文件夹中所有jpg文件 function p ...

  9. alex python of day2

      模块 sys模块:sys模块是用c语言写的,所以在lib下是不会有sys.py这个文件存在 1 import sys 2 print(sys.path) #打印环境变量 3 print(sys.a ...

  10. jfinal 源码学习

    源由 最近闲来无事,顺带看了下jfinal的源码,以下均为自己的个人理解,如有错误请指定: jfinal 使用 在web.xml中配置JfinalFilter 并定义JfinalConfig的类 自定 ...