Linux同平台数据库整体物理迁移,需求:A机器不再使用,要将A机器的Oracle迁移到B机器。
Linux同平台数据库整体物理迁移
需求:A机器不再使用,要将A机器的Oracle迁移到B机器。
之前写过类似需求的文章:
本文这次旨在更多用到自动化通用的整合脚本去实现同平台的数据库整体迁移。
1.A机器操作
2.B机器操作
A机器操作
0.系统版本:
[root@DB-A tmp]# uname -a
Linux DB-A 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@DB-A tmp]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Kernel \r on an \m
1.A数据库当前信息
select status from v$instance union all
select open_mode from v$database union all
select * from v$version where rownum = 1;
2.确认参数文件、控制文件的位置
show parameter pfile
show parameter control_files
这里需要根据当前的spfile创建pfile文件,后面要用到。
create pfile from spfile;
3.数据文件、临时文件、重做日志文件的位置
set linesize 140 pagesize 100
select name from v$datafile union all
select name from v$tempfile union all
select member from v$logfile;
4.干净关闭数据库:
shutdown immediate;
5.确定ORACLE软件目录并打包传到B机器
echo $ORACLE_BASE
/ora/app/oracle
tar -zcvf /tmp/oracle.tar.gz /ora/app/oracle
将打包的Oracle软件目录以及所有的参数文件,控制文件,数据文件,临时文件,重做日志文件都拷贝到B机器。
B机器操作
0.系统版本:
[root@DB-B irnop]# uname -a
Linux DB-B 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@DB-B irnop]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
1.安装依赖包和调整系统参数
略。可参考:
2.解压ORACLE_HOME到B机器上规划的软件安装目录:/u01/app/oracle
tar zxvf oracle.tar.gz
解压后的oracle目录直接mv到/u01/app下
3.修改参数文件pfile并启动数据库到nomount
根据B机器实际情况修改数据库占用内存的值,,并确认参数文件中写的路径都是存在的。
startup nomount pfile='$ORACLE_HOME/dbs/initirnop.ora'
SQL> startup nomount pfile='$ORACLE_HOME/dbs/initirnop.ora'
ORACLE instance started.
Total System Global Area 2.3717E+10 bytes
Fixed Size 2239176 bytes
Variable Size1.3153E+10 bytes
Database Buffers 1.0536E+10 bytes
Redo Buffers 25612288 bytes
4.启动到mount
SQL> alter database mount;
Database altered.
5.数据文件,临时文件,日志文件的rename重定向
set linesize 140 pagesize 100
select 'alter database rename file '''||name||''' to ''/xxx'||name||''';' from v$datafile union all
select 'alter database rename file '''||name||''' to ''/xxx'||name||''';' from v$tempfile union all
select 'alter database rename file '''||member||''' to ''/xxx'||member||''';' from v$logfile;
根据实际情况将old_name替换成new_name
old_name: /xxx/oradata
new_name: /new/oradata
然后执行重定向SQL,检查当前路径是否修改正确:
select name from v$datafile union all
select name from v$tempfile union all
select member from v$logfile;
修改系统的目录权限:
chown -R oracle:oinstall /new/oradata
6.打开数据库:
SQL> alter database open;
本文永久更新链接地址:

mysqlviewshavelimitations:1)supportallsqloperations、制限、dataManipulationswithjoinsorubqueries.2)それらは、特にパフォーマンス、特にパルフェクソルラージャターセット

reperusermanmanagementInmysqliscialforenhancingsecurationsinginuring databaseaperation.1)usecreateusertoaddusers、指定connectionsourcewith@'localhost'or@'% '。

mysqldoes notimposeahardlimitontriggers、しかしpracticalfactorsdeTerminetheireffectiveuse:1)serverconufigurationStriggermanagement; 2)complentiggersincreaseSystemload;

はい、それはssafetostoreblobdatainmysql、butonsiderheSeCactors:1)Storagespace:blobscanconsumesificantspace.2)パフォーマンス:パフォーマンス:大規模なドゥエットブロブスメイズ階下3)backupandrecized recized recized recize

PHP Webインターフェイスを介してMySQLユーザーを追加すると、MySQLI拡張機能を使用できます。手順は次のとおりです。1。MySQLデータベースに接続し、MySQLI拡張機能を使用します。 2。ユーザーを作成し、CreateUserステートメントを使用し、パスワード()関数を使用してパスワードを暗号化します。 3. SQLインジェクションを防ぎ、MySQLI_REAL_ESCAPE_STRING()関数を使用してユーザー入力を処理します。 4.新しいユーザーに権限を割り当て、助成金ステートメントを使用します。

mysql'sblobissuitable forstoringbinarydatawithinarationaldatabase、whileenosqloptionslikemongodb、redis、andcassandraofferferulesions forunstructureddata.blobissimplerbutcanslowdowdowd withwithdata

toaddauserinmysql、使用:createuser'username '@' host'identifidedby'password '; here'showtodoitsely:1)chosehostcarefilytoconを選択しますTrolaccess.2)setResourcelimitslikemax_queries_per_hour.3)usestrong、uniquasswords.4)endforcessl/tlsconnectionswith

toavoidcommonMonmistakeswithStringDatatypesinmysql、undultingStringTypenuste、choosetherightType、andManageEncodingandCollationsEttingtingive.1)Usecharforfixed-LengthStrings、Varcharforaible Length、AndText/Blobforlardata.2)setCurrectCherts


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

Safe Exam Browser
Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

SublimeText3 英語版
推奨: Win バージョン、コードプロンプトをサポート!

PhpStorm Mac バージョン
最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール
