oracle 如何附加数据库 现在碰到一个问题,有Oracle的数据文件,不知道如何把它加入到Oracle里面,SQL Server有附加数据库功能,不知道oracle是否有类似的功能?如果没有,请附上相关步骤,谢谢大家! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考一个迁移目录的://oracle目录为旧目录 oracle2为迁移目录 oracle 安装目录为/home/oracle;//chown oracle:dba /oracle2#copy目录admin 和 目录oradata及其文件至oracle2修改 /oracle2/admin/orcl/pfile/initorcl.ora#修改链接ln -s /oracle2/admin/orcl/pfile/initorcl.ora /home/oracle/dbs/initorcl.ora#用oracle身份登陆并启动sqlplussqlplus / nologconnect /as sysdbaSTARTUP NOMOUNT #修改control file中所有数据文件的位置alter database rename file '/oracle/oradata/orcl/system01.dbf' to '/oracle2/oradata/orcl/system01.dbf';alter database rename file '/oracle/oradata/orcl/undotbs01.dbf' to '/oracle2/oradata/orcl/undotbs01.dbf';alter database rename file '/oracle/oradata/orcl/cwmlite01.dbf' to '/oracle2/oradata/orcl/cwmlite01.dbf';alter database rename file '/oracle/oradata/orcl/drsys01.dbf' to '/oracle2/oradata/orcl/drsys01.dbf';alter database rename file '/oracle/oradata/orcl/example01.dbf' to '/oracle2/oradata/orcl/example01.dbf';alter database rename file '/oracle/oradata/orcl/indx01.dbf' to '/oracle2/oradata/orcl/indx01.dbf';alter database rename file '/oracle/oradata/orcl/odm01.dbf' to '/oracle2/oradata/orcl/odm01.dbf';alter database rename file '/oracle/oradata/orcl/tools01.dbf' to '/oracle2/oradata/orcl/tools01.dbf';alter database rename file '/oracle/oradata/orcl/users01.dbf' to '/oracle2/oradata/orcl/users01.dbf';alter database rename file '/oracle/oradata/orcl/xdb01.dbf' to '/oracle2/oradata/orcl/xdb01.dbf';alter database rename file '/oracle/oradata/orcl/redo01.log' to '/oracle2/oradata/orcl/redo01.log';alter database rename file '/oracle/oradata/orcl/redo02.log' to '/oracle2/oradata/orcl/redo02.log';alter database rename file '/oracle/oradata/orcl/redo03.log' to '/oracle2/oradata/orcl/redo03.log';#重建控制文件CREATE CONTROLFILE REUSE DATABASE "orcl" NORESETLOGS ARCHIVELOG MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXDATAFILES 254 MAXINSTANCES 1 MAXLOGHISTORY 453 LOGFILE GROUP 1 '/oracle2/oradata/orcl/redo01.log' SIZE 100M, GROUP 2 '/oracle2/oradata/orcl/redo02.log' SIZE 100M, GROUP 3 '/oracle2/oradata/orcl/redo03.log' SIZE 100M DATAFILE '/oracle2/oradata/orcl/system01.dbf','/oracle2/oradata/orcl/undotbs01.dbf','/oracle2/oradata/orcl/cwmlite01.dbf','/oracle2/oradata/orcl/drsys01.dbf','/oracle2/oradata/orcl/example01.dbf','/oracle2/oradata/orcl/indx01.dbf','/oracle2/oradata/orcl/odm01.dbf','/oracle2/oradata/orcl/tools01.dbf','/oracle2/oradata/orcl/users01.dbf','/oracle2/oradata/orcl/xdb01.dbf'CHARACTER SET ZHS16GBK ; //RECOVER DATABASE //ALTER SYSTEM ARCHIVE LOG ALL; ALTER DATABASE OPEN; #将临时文件添加到TEMP表空间中alter tablespace TEMP add tempfile '/oracle2/oradata/orcl/temp01.dbf' size 20M; 有x.dmp,谢谢楼上朋友热心,麻烦提供一下有dmp的情况下应该怎么加上来。 你查查imp,exp的相关知识就有了。 针对: *.dmp文件步骤:1 运行: cmd2 执行: imp system/system@orcl file= F:\*.dmp fromuser=scott touser = tiger 楼主,我有相同问题 呵呵 我有Pks,pkb文件不知道怎么附加知道的话 还请赐教啊!谢谢了! solaris的终端里面如何操作编译c++ 兄弟们帮忙,dataguard的问题 请大家来帮忙讨论一下,关于一个大型项目数据库设计问题 “服务并未及时响应启动或控制请求”导致无法启动服务! 今天学习Oracle遇到一个奇怪的问题: 如何替换字符的问题 ORACLE有那些好书推荐? 在Windows2K的服务程序中连接Oracle的问题 求sql语句:将一条记录,根据分割符,分割成多条记录 SQL优化求解 这几组SQL语句效率哪个高? oracle10g下无法启动isqlplus服务
//oracle目录为旧目录 oracle2为迁移目录 oracle 安装目录为/home/oracle;
//chown oracle:dba /oracle2#copy目录admin 和 目录oradata及其文件至oracle2
修改 /oracle2/admin/orcl/pfile/initorcl.ora
#修改链接
ln -s /oracle2/admin/orcl/pfile/initorcl.ora /home/oracle/dbs/initorcl.ora
#用oracle身份登陆并启动sqlplus
sqlplus / nolog
connect /as sysdba
STARTUP NOMOUNT
#修改control file中所有数据文件的位置
alter database rename file '/oracle/oradata/orcl/system01.dbf' to '/oracle2/oradata/orcl/system01.dbf';
alter database rename file '/oracle/oradata/orcl/undotbs01.dbf' to '/oracle2/oradata/orcl/undotbs01.dbf';
alter database rename file '/oracle/oradata/orcl/cwmlite01.dbf' to '/oracle2/oradata/orcl/cwmlite01.dbf';
alter database rename file '/oracle/oradata/orcl/drsys01.dbf' to '/oracle2/oradata/orcl/drsys01.dbf';alter database rename file '/oracle/oradata/orcl/example01.dbf' to '/oracle2/oradata/orcl/example01.dbf';
alter database rename file '/oracle/oradata/orcl/indx01.dbf' to '/oracle2/oradata/orcl/indx01.dbf';
alter database rename file '/oracle/oradata/orcl/odm01.dbf' to '/oracle2/oradata/orcl/odm01.dbf';
alter database rename file '/oracle/oradata/orcl/tools01.dbf' to '/oracle2/oradata/orcl/tools01.dbf';alter database rename file '/oracle/oradata/orcl/users01.dbf' to '/oracle2/oradata/orcl/users01.dbf';
alter database rename file '/oracle/oradata/orcl/xdb01.dbf' to '/oracle2/oradata/orcl/xdb01.dbf';alter database rename file '/oracle/oradata/orcl/redo01.log' to '/oracle2/oradata/orcl/redo01.log';
alter database rename file '/oracle/oradata/orcl/redo02.log' to '/oracle2/oradata/orcl/redo02.log';
alter database rename file '/oracle/oradata/orcl/redo03.log' to '/oracle2/oradata/orcl/redo03.log';
#重建控制文件
CREATE CONTROLFILE REUSE DATABASE "orcl" NORESETLOGS ARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 254
MAXINSTANCES 1
MAXLOGHISTORY 453
LOGFILE
GROUP 1 '/oracle2/oradata/orcl/redo01.log' SIZE 100M,
GROUP 2 '/oracle2/oradata/orcl/redo02.log' SIZE 100M,
GROUP 3 '/oracle2/oradata/orcl/redo03.log' SIZE 100M
DATAFILE
'/oracle2/oradata/orcl/system01.dbf',
'/oracle2/oradata/orcl/undotbs01.dbf',
'/oracle2/oradata/orcl/cwmlite01.dbf',
'/oracle2/oradata/orcl/drsys01.dbf',
'/oracle2/oradata/orcl/example01.dbf',
'/oracle2/oradata/orcl/indx01.dbf',
'/oracle2/oradata/orcl/odm01.dbf',
'/oracle2/oradata/orcl/tools01.dbf',
'/oracle2/oradata/orcl/users01.dbf',
'/oracle2/oradata/orcl/xdb01.dbf'
CHARACTER SET ZHS16GBK
;
//RECOVER DATABASE
//ALTER SYSTEM ARCHIVE LOG ALL;
ALTER DATABASE OPEN; #将临时文件添加到TEMP表空间中
alter tablespace TEMP add tempfile '/oracle2/oradata/orcl/temp01.dbf' size 20M;
步骤:
1 运行: cmd
2 执行: imp system/system@orcl file= F:\*.dmp fromuser=scott touser = tiger
知道的话 还请赐教啊!谢谢了!