Oracle 11g升级后遇到问题及解决,Oracle 11gR2单机测试数据软件及库升级,操作系统Linux6.3
实验环境,Oracle 11gR2单机测试数据软件及库升级,操作系统Linux6.3
oracle版本 11.2.0.1 升级包11.2.0.3
数据库软件及库升级成功后,测试expdp导出全库实验,总是提示如下错误:
[oracle@linuxtest ~]$ expdp oracle/oracle@orcl directory=DATA_PUMP_DIR dumpfile=daochu.dmp logfile=daochu.log full=yes
Export: Release 11.2.0.3.0 - Production on Mon Oct 28 09:47:18 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
UDE-12154: operation generated ORACLE error 12154
ORA-12154: TNS:could not resolve the connect identifier specified
1.根据提示尝试的解决办法:
sqlplus / as sysdba 连接数据库,GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,DBA,CONNECT,RESOURCE,CREATE SESSION TO oracle(用户名字) 这里我选择了新建的oracle用户。
然后检查lisenter.ora及tnsnames.ora文件,,发现都正常,但我还是用netca命令重建了监听,再测试expdp发现还是一样的问题。
2.最终解决办法:
su - oracle 用户下查看监听文件发现如下问题:
[oracle@linuxtest admin]$ cat tnsnames.ora
cat: tnsnames.ora: Permission denied
提示权限不够,之前是在root用户下查看的,所以没留意到这个问题。所以猜测问题出在oracle home目录的权限问题。
实验开始的时候我在升级数据库软件时oracle提示oracle_home目录不能与之前的重复即必须新建目录,后来我选择了在原oracle_home目录下创建11.2.3的子目录,同时11.2.0的子目录依然存在,依照提示chown -R oracle:oinstall /oracle/*给oracle_home目录重新赋予权限,再次到oracle用户下查看监听文件,发现可以读取。
尝试expdp 导出全库,发现导出可以正常运行了。
推荐阅读:
Linux上Oracle 11g安装步骤图文详解
Linux操作系统中Oracle 11g数据库安装过程图文详解
CentOS 5.6 上安装 Oracle 11g R2 单实例数据库详解
Oracle VM虚拟机中安装Oracle Clusterware 11g步骤
VM虚拟机下在Linux上安装Oracle 11G单实例数据库

MySQL processes data replication through three modes: asynchronous, semi-synchronous and group replication. 1) Asynchronous replication performance is high but data may be lost. 2) Semi-synchronous replication improves data security but increases latency. 3) Group replication supports multi-master replication and failover, suitable for high availability requirements.

The EXPLAIN statement can be used to analyze and improve SQL query performance. 1. Execute the EXPLAIN statement to view the query plan. 2. Analyze the output results, pay attention to access type, index usage and JOIN order. 3. Create or adjust indexes based on the analysis results, optimize JOIN operations, and avoid full table scanning to improve query efficiency.

Using mysqldump for logical backup and MySQLEnterpriseBackup for hot backup are effective ways to back up MySQL databases. 1. Use mysqldump to back up the database: mysqldump-uroot-pmydatabase>mydatabase_backup.sql. 2. Use MySQLEnterpriseBackup for hot backup: mysqlbackup--user=root-password=password--backup-dir=/path/to/backupbackup. When recovering, use the corresponding life

The main reasons for slow MySQL query include missing or improper use of indexes, query complexity, excessive data volume and insufficient hardware resources. Optimization suggestions include: 1. Create appropriate indexes; 2. Optimize query statements; 3. Use table partitioning technology; 4. Appropriately upgrade hardware.

MySQL view is a virtual table based on SQL query results and does not store data. 1) Views simplify complex queries, 2) Enhance data security, and 3) Maintain data consistency. Views are stored queries in databases that can be used like tables, but data is generated dynamically.

MySQLdiffersfromotherSQLdialectsinsyntaxforLIMIT,auto-increment,stringcomparison,subqueries,andperformanceanalysis.1)MySQLusesLIMIT,whileSQLServerusesTOPandOracleusesROWNUM.2)MySQL'sAUTO_INCREMENTcontrastswithPostgreSQL'sSERIALandOracle'ssequenceandt

MySQL partitioning improves performance and simplifies maintenance. 1) Divide large tables into small pieces by specific criteria (such as date ranges), 2) physically divide data into independent files, 3) MySQL can focus on related partitions when querying, 4) Query optimizer can skip unrelated partitions, 5) Choosing the right partition strategy and maintaining it regularly is key.

How to grant and revoke permissions in MySQL? 1. Use the GRANT statement to grant permissions, such as GRANTALLPRIVILEGESONdatabase_name.TO'username'@'host'; 2. Use the REVOKE statement to revoke permissions, such as REVOKEALLPRIVILEGESONdatabase_name.FROM'username'@'host' to ensure timely communication of permission changes.


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

WebStorm Mac version
Useful JavaScript development tools

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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
