当前位置: 首页 > news >正文

网站开发实践报告百度账号申请注册

网站开发实践报告,百度账号申请注册,济南高新网站建设,公司网站建站软件主要步骤: 1、停掉服务, 2、关闭数据库shutdown immediate 3、移动数据文件到新的位置。 4、启动到mount状态,如果也移动了ctl,需要启动到nomount下,生成参数文件。 5、alter database rename 文件名 to 新位置&a…

主要步骤:

1、停掉服务,

2、关闭数据库shutdown immediate

3、移动数据文件到新的位置。

4、启动到mount状态,如果也移动了ctl,需要启动到nomount下,生成参数文件。

5、alter database rename '文件名' to '新位置',逐个文件处理。

6、startup。(alter database open)

迁移前准备

查看当前数据库所有文件信息

查看当前数据库所有文件信息,含数据文件、日志文件、临时文件、控制文件、参数文件

export ORACLE_SID=topicisxc
sqlplus / as sysdbaSQL> startup
ORACLE 例程已经启动。Total System Global Area 4977278976 bytes
Fixed Size                  2261768 bytes
Variable Size            1610616056 bytes
Database Buffers         3355443200 bytes
Redo Buffers                8957952 bytes
数据库装载完毕。
数据库已经打开。
SQL> archive log lis;t
SP2-0718: 非法的  ARCHIVE LOG 选项
SQL> archive log list;         
数据库日志模式             非存档模式
自动存档             禁用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     1
当前日志序列           3
SQL> select name from v$datafile;NAME
--------------------------------------------------------------------------------
/data/oradata/topicisxc/system01.dbf
/data/oradata/topicisxc/sysaux01.dbf
/data/oradata/topicisxc/undotbs01.dbf
/data/oradata/topicisxc/users01.dbfSQL> select name from v$tempfile;NAME
--------------------------------------------------------------------------------
/data/oradata/topicisxc/temp01.dbfSQL> select member from v$logfile;MEMBER
--------------------------------------------------------------------------------
/data/oradata/topicisxc/redo03.log
/data/oradata/topicisxc/redo02.log
/data/oradata/topicisxc/redo01.logSQL> select name from v$controlfile;NAME
--------------------------------------------------------------------------------
/data/oradata/topicisxc/control01.ctl
/opt/u01/app/oracle/fast_recovery_area/topicisxc/control02.ctlSQL> show parameter pfileNAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /opt/u01/app/oracle/product/11.2.0/db_1/dbs/spfiletopicisxc.ora

迁移步骤

创建pfile文件

export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> create pfile='/home/oracle/pfiletopicisxc0104.ora' from spfile;
File created.

关闭数据库

export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit--查看进程
[oracle@cxdb gs]# ps -ef | grep ora_pmon
root     12919 12862  0 17:43 pts/7    00:00:00 grep --color=auto ora_pmon
[oracle@cxdb gs]# 

移动数据库文件到新路径

--创建目录
[root@cxdb ~]# cd /gs
[root@cxdb gs]# ls -l
总用量 20
drwxr-xr-x. 2 root root  4096 1月   4 15:55 back
drwx------  2 root root 16384 1月   3 20:24 lost+found
[root@cxdb gs]# mkdir -p oradatanew
[root@cxdb gs]# chown -R oracle:oinstall oradatanew/
[root@cxdb gs]# ls -ld oradatanew/
drwxr-xr-x 2 oracle oinstall 4096 1月   4 17:41 oradatanew/
[root@cxdb gs]# chmod -R 755 oradatanew/--移动数据库文件到新路径  尽可能用oracle用户移动
[oracle@cxdb data]$ cd oradata/
[oracle@cxdb oradata]$ ls -l
total 0
drwxr-x---. 2 oracle oinstall 179 Jan  3 19:43 topicisxc
[oracle@cxdb oradata]$ cp -r topicisxc /gs/oradatanew/
[oracle@cxdb oradata]$ ls -l /gs/oradatanew/
total 4
drwxr-x--- 2 oracle oinstall 4096 Jan  4 17:43 topicisxc
[oracle@cxdb oradata]$ ls -l /gs/oradatanew/topicisxc/
total 2919424
-rw-r----- 1 oracle oinstall   9748480 Jan  4 17:43 control01.ctl
-rw-r----- 1 oracle oinstall 524288512 Jan  4 17:43 redo01.log
-rw-r----- 1 oracle oinstall 524288512 Jan  4 17:43 redo02.log
-rw-r----- 1 oracle oinstall 524288512 Jan  4 17:43 redo03.log
-rw-r----- 1 oracle oinstall 545267712 Jan  4 17:43 sysaux01.dbf
-rw-r----- 1 oracle oinstall 775954432 Jan  4 17:43 system01.dbf
-rw-r----- 1 oracle oinstall  30416896 Jan  4 17:43 temp01.dbf
-rw-r----- 1 oracle oinstall  78651392 Jan  4 17:43 undotbs01.dbf
-rw-r----- 1 oracle oinstall   5251072 Jan  4 17:43 users01.dbf--移动控制文件到新路径   尽可能用oracle用户移动
[oracle@cxdb ~]$ cp /opt/u01/app/oracle/fast_recovery_area/topicisxc/control02.ctl /gs/oradatanew/topicisxc/control02.ctl--复制完成后查看
[oracle@cxdb ~]$ ls -l /gs/oradatanew/topicisxc
total 2928944
-rw-r----- 1 oracle oinstall   9748480 Jan  4 17:43 control01.ctl
-rw-r----- 1 oracle oinstall   9748480 Jan  4 17:51 control02.ctl
-rw-r----- 1 oracle oinstall 524288512 Jan  4 17:43 redo01.log
-rw-r----- 1 oracle oinstall 524288512 Jan  4 17:43 redo02.log
-rw-r----- 1 oracle oinstall 524288512 Jan  4 17:43 redo03.log
-rw-r----- 1 oracle oinstall 545267712 Jan  4 17:43 sysaux01.dbf
-rw-r----- 1 oracle oinstall 775954432 Jan  4 17:43 system01.dbf
-rw-r----- 1 oracle oinstall  30416896 Jan  4 17:43 temp01.dbf
-rw-r----- 1 oracle oinstall  78651392 Jan  4 17:43 undotbs01.dbf
-rw-r----- 1 oracle oinstall   5251072 Jan  4 17:43 users01.dbf

更改生成的参数文件中的控制文件路径

--更改pfile中的控制文件路径
[oracle@cxdb oradata]$ cd
[oracle@cxdb ~]$ ls -l
total 4
-rw-r--r-- 1 oracle oinstall 1188 Jan  4 17:38 pfiletopicisxc0104.ora
[oracle@cxdb ~]$ vi pfiletopicisxc0104.ora
topicisxc.__db_cache_size=4110417920
topicisxc.__java_pool_size=33554432
topicisxc.__large_pool_size=50331648
topicisxc.__oracle_base='/opt/u01/app/oracle/'#ORACLE_BASE set from environment
topicisxc.__pga_aggregate_target=1677721600
topicisxc.__sga_target=4999610368
topicisxc.__shared_io_pool_size=0
topicisxc.__shared_pool_size=771751936
topicisxc.__streams_pool_size=0
*.audit_file_dest='/opt/u01/app/oracle/admin/topicisxc/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/gs/oradatanew/topicisxc/control01.ctl','/gs/oradatanew/topicisxc/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='topicisx'
*.db_recovery_file_dest='/opt/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=214748364800
*.db_unique_name='topicisxc'
*.diagnostic_dest='/opt/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=topicisxcXDB)'
*.filesystemio_options='setall'
*.job_queue_processes=1000
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=1000
*.pga_aggregate_target=1665138688
*.processes=2000
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=2450
*.sga_target=4995416064
*.undo_tablespace='UNDOTBS1'

更改控制文件路径 *.control_files='/gs/oradatanew/topicisxc/control01.ctl','/gs/oradatanew/topicisxc/control02.ctl'

用改好的pfile文件启动数据库到mount状态

--用改好的pfile文件启动数据库到nomount状态
export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> startup pfile='/home/oracle/pfiletopicisxc0104.ora' nomount
ORACLE instance started.Total System Global Area 1778384896 bytes
Fixed Size                  8621712 bytes
Variable Size             687866224 bytes
Database Buffers         1073741824 bytes
Redo Buffers                8155136 bytes--启动数据库到mount状态
SQL> alter database mount;                               
Database altered.

重定向数据库控制文件中的所有数据文件和日志文件路径

export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> alter database rename file '/data/oradata/topicisxc/system01.dbf' to '/gs/oradatanew/topicisxc/system01.dbf';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/sysaux01.dbf' to '/gs/oradatanew/topicisxc/sysaux01.dbf';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/undotbs01.dbf' to '/gs/oradatanew/topicisxc/undotbs01.dbf';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/users01.dbf' to '/gs/oradatanew/topicisxc/users01.dbf';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/temp01.dbf' to '/gs/oradatanew/topicisxc/temp01.dbf';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/redo01.log' to '/gs/oradatanew/topicisxc/redo01.log';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/redo02.log' to '/gs/oradatanew/topicisxc/redo02.log';数据库已更改。SQL> alter database rename file '/data/oradata/topicisxc/redo03.log' to '/gs/oradatanew/topicisxc/redo03.log';数据库已更改。

打开数据库

export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> alter database open;
数据库已更改。

检查各文件路径

export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> select name from v$datafile;NAME
--------------------------------------------------------------------------------
/gs/oradatanew/topicisxc/system01.dbf
/gs/oradatanew/topicisxc/sysaux01.dbf
/gs/oradatanew/topicisxc/undotbs01.dbf
/gs/oradatanew/topicisxc/users01.dbfSQL> select name from v$tempfile; NAME
--------------------------------------------------------------------------------
/gs/oradatanew/topicisxc/temp01.dbfSQL> select member from v$logfile;MEMBER
--------------------------------------------------------------------------------
/gs/oradatanew/topicisxc/redo03.log
/gs/oradatanew/topicisxc/redo02.log
/gs/oradatanew/topicisxc/redo01.logSQL> select name from v$controlfile;NAME
--------------------------------------------------------------------------------
/gs/oradatanew/topicisxc/control01.ctl
/gs/oradatanew/topicisxc/control02.ctlSQL> show parameter pfileNAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string

创建spfile

export ORACLE_SID=topicisxc
sqlplus / as sysdba
SQL> create spfile from pfile='/home/oracle/pfiletopicisxc0104.ora';文件已创建。

重启数据库

export ORACLE_SID=topicisxc
sqlplus / as sysdba--关闭数据库
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。--启动数据库
SQL> startup
ORACLE 例程已经启动。Total System Global Area 4977278976 bytes
Fixed Size                  2261768 bytes
Variable Size            1610616056 bytes
Database Buffers         3355443200 bytes
Redo Buffers                8957952 bytes
数据库装载完毕。
数据库已经打开。

清理原文件(可选)

如果磁盘空间足够,可省略该步骤。

--删除原控制文件
[root@cxdb data]# cd /opt/u01/app/oracle/fast_recovery_area/topicisxc/
[root@cxdb topicisxc]# ls -l
总用量 9520
-rw-r-----. 1 oracle oinstall 9748480 1月   4 17:38 control02.ctl
[root@cxdb topicisxc]# rm -f control02.ctl--删除原数据文件  临时文件 控制文件 日志文件
[root@cxdb ~]# cd /data/
[root@cxdb data]# ls -l
总用量 0
drwxrwxrwx. 3 root root 23 1月   3 19:36 oradata
[root@cxdb data]# ls -l oradata/
总用量 0
drwxr-x---. 2 oracle oinstall 179 1月   3 19:43 topicisxc
[root@cxdb data]# ls -l
总用量 0
drwxrwxrwx. 3 root root 23 1月   3 19:36 oradata
[root@cxdb data]# ls -l oradata/topicisxc/
总用量 2919404
-rw-r-----. 1 oracle oinstall   9748480 1月   4 17:38 control01.ctl
-rw-r-----. 1 oracle oinstall 524288512 1月   4 17:32 redo01.log
-rw-r-----. 1 oracle oinstall 524288512 1月   4 17:32 redo02.log
-rw-r-----. 1 oracle oinstall 524288512 1月   4 17:38 redo03.log
-rw-r-----. 1 oracle oinstall 545267712 1月   4 17:38 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 775954432 1月   4 17:38 system01.dbf
-rw-r-----. 1 oracle oinstall  30416896 1月   3 22:00 temp01.dbf
-rw-r-----. 1 oracle oinstall  78651392 1月   4 17:38 undotbs01.dbf
-rw-r-----. 1 oracle oinstall   5251072 1月   4 17:38 users01.dbf
[root@cxdb data]# rm -rf oradata/

参考链接:Oracle数据库迁移数据文件到新路径_oracle数据文件迁移到其他目录-CSDN博客

http://www.ds6.com.cn/news/58617.html

相关文章:

  • 黑龙江省网站建设百度产品大全首页
  • 做电商有哪些网站有哪些百度入驻
  • 做网站还是app网络推广平台网站推广
  • 免费一级做网站台州网站优化公司
  • 网站建设宣传视频海外免费网站推广
  • 做网站和c 哪个好软文代发代理
  • 室内设计意向图网站应用商店关键词优化
  • 做团购网站域名权重
  • 做公司网站需要有座机吗北京网站优化
  • 免费自建网站舆情监测系统排名
  • 广州网站设计公司济南兴田德润o评价国际网站平台有哪些
  • 网站cms系统哪个好用吗seo网站排名优化教程
  • 做创业网站赚钱免费网络营销方式
  • 影视公司招聘班级优化大师学生版
  • 甘肃省人民政府网官网seo顾问合同
  • 可靠的网站设计制惠州seo外包
  • 做网站常用的英文字体seo网站优化怎么做
  • 如何做游戏渠道网站网页设计规范
  • 建网站多少北京seo外包 靠谱
  • 网站备案座机推广引流最快的方法
  • 国内专门做旅游攻略的网站云浮网站设计
  • h5页面制作免费平台网站seo百度百科
  • 东莞阳光网新闻百度seo关键词优化公司
  • 海口网站建设高端cms建站系统
  • 做网站用什么域名比较好济南百度推广开户
  • 网站安全防护方案手机百度浏览器
  • 企业微信网站怎么做杭州seo网络推广
  • 乌鲁木齐做四维彩超哪凤凰L网站厦门网站优化公司
  • 建设局网站自查自纠高级搜索百度
  • 展示用网站模板网络推广员的工作内容