一般情况下我们在安装Oracle软件以后,创建数据库之前就会为Oracle打上补丁,当然没打也没关系,接下里就会介绍Oracle在建库以后
一般情况下我们在安装Oracle软件以后,创建数据库之前就会为Oracle打上补丁,当然没打也没关系,接下里就会介绍Oracle在建库以后的升级过程,DB:Oracle 10G R2 10.2.0.1;OS:Red Hat Linux as 4。Oracle安装参考:
一. 升级前的准备
首先下载并上传补丁包到数据库服务器上,因为我试验使用的是Linux下32位的Oracle 10G R2 10.2.0.1,所以需要的补丁为p5337014_10203_LINUX.zip。补丁直接到Oracle官网上去下,注意对应的版本就可以了。
1. 解压补丁包,得到Disk1文件夹
2. 备份数据库及Oracle相关目录,必须是全备。推荐冷备,一旦升级出现问题恢复也比较快。
二. 升级Oracle软件
1. 安装补丁包,需要用到图形终端。VNC使用参考:
2. 根据一步一步执行,知道提示以root身份运行root.sh脚本
3. 以root身份运行root.sh脚本,,完成后Oracle软件升级完成。
三. 升级数据库
Oracle软件升级完成以后先不忙启动数据库,否则会报如下错误:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Error 704 happened during db open, shutting down database
USER: terminating instance due to error 704
Instance terminated by USER, pid = 7819
ORA-1092 signalled during: ALTER DATABASE OPEN...
升级数据库有两种方式:DBUA图形化方式及手工升级方式,推荐使用手工升级方式。DBUA图形化方式操作简单,只需按照提示一步一步往下做就可以了,需要注意如果要升级的数据库没有在列表中,需修改/etc/oratab添加相应的SID,升级过程作要勾选“升级完成后编译无效对象”选项。如果在升级之前没有备份,可以在使用DBUA的时候选择备份数据库,DBUA执行的是冷备,需要保留足够的空间。按照提示执行完成以后没有报错就可以finish了。
手工方式先使用echo $ORACLE_SID是否为需要升级的数据库,不是则使用export $ORACLE_SID=sid修改,然后以DBA身份登录SQLPLUS,执行如下操作:
SQL> startup upgrade
SQL> spool /u01/upgrade.log
SQL> @?/rdbms/admin/catupgrd.sql --需要等待较长时间
如果这一步顺利执行,那么数据升级工作已经完成一大半了,接下来重启数据库,编译无效对象。因为catupgrd.sql可能会造成一些数据对象无效,通过语句:select count(1) from dba_objects where status='INVALID'查询是否存在有无效的对象,有则运行utlrp.sql编译无效的对象。
SQL> shutdown immediate;
SQL> startup
SQL> @?/rdbms/admin/utlrp.sql --需要等待较长时间
编译完成以后查询一下表空间,用户,用户对象等信息,如果都没有问题,OK,我们的数据库升级算是成功了,接下来就备份一次数据库,然后打开应用。我们在查询对象的时候可能出现一些名字类似BIN$BD34RX+6TCJEK54334w==$0的对象,这些是保存在回收站里面的删除对象,可以忽略。

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use
