OracleStudy之案例--OracleSqlplus错误系统环境:操作系统:AIX5.3数据库:Oracle10gR2案例分析:1、查看空间信息[oracle@aix220~]$df-mFilesystemMB&nbs..
Oracle Study之案例--Oracle Sqlplus错误
系统环境:
操作系统:AIX5.3
数据库: Oracle 10gR2
案例分析:
1、查看空间信息 [oracle@aix220 ~]$df -m Filesystem MB blocks Free %Used Iused %Iused Mounted on /dev/hd4 17408.00 1238.15 93% 37699 12% / /dev/hd2 8192.00 6310.39 23% 46534 4% /usr /dev/hd9var 2048.00 1725.55 16% 1704 1% /var /dev/hd3 2048.00 1902.58 8% 420 1% /tmp /dev/fwdump 3072.00 3071.21 1% 4 1% /var/adm/ras/platform /dev/hd1 2048.00 1821.98 12% 74 1% /home /proc - - - - - /proc /dev/hd10opt 2048.00 1374.77 33% 8934 3% /opt /dev/lv00 1024.00 991.80 4% 18 1% /var/adm/csd /dev/arch 10240.00 8347.63 19% /dev/lv02 15360.00 10097.80 35% 123693 4% /u01 2、查看文件权限 [oracle@aix220 ~]$ls -ld /u01/app/oracle/admin/master/ drwxr-x--- 8 oracle dba 512 Feb 17 16:40 /u01/app/oracle/admin/master/ [oracle@aix220 ~]$ls -ld /u01/app/oracle/admin/master/adump/ drwxr-x--- 2 oracle dba 1536 Feb 17 19:48 /u01/app/oracle/admin/master/adump/ 3、查看文件系统信息 [oracle@aix220 dbs]$cat /etc/filesystems /u01: dev = /dev/lv02 vfs = jfs log = /dev/loglv00 mount = true options = rw account = false [root@aix220 /]#lsvg -l oraclevg oraclevg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv00 jfslog 1 1 1 closed/syncd N/A lv02 jfs 120 120 1 closed/syncd /u01 [root@aix220 /]#df -m Filesystem MB blocks Free %Used Iused %Iused Mounted on /dev/hd4 17408.00 1238.18 93% 37700 12% / /dev/hd2 8192.00 6310.39 23% 46534 4% /usr /dev/hd9var 2048.00 1725.56 16% 1704 1% /var /dev/hd3 2048.00 1902.58 8% 420 1% /tmp /dev/fwdump 3072.00 3071.21 1% 4 1% /var/adm/ras/platform /dev/hd1 2048.00 1821.98 12% 74 1% /home /proc - - - - - /proc /dev/hd10opt 2048.00 1374.77 33% 8934 3% /opt /dev/lv00 1024.00 991.80 4% 18 1% /var/adm/csd /dev/arch 10240.00 8347.63 19% 52 1% /arch /dev/lv01 5120.00 4959.25 4% 16 1% /flash /dev/lv03 25600.00 24796.43 4% 17 1% /home/oracle/arch_master rhel152:/backup/cuug15/storage30 14111.05 13052.23 8% 31 1% /backup mount文件系统失败: [root@aix220 /]#mount /u01 Replaying log for /dev/lv02. mount: /dev/lv02 on /u01: Unformatted or incompatible media The superblock on /dev/lv02 is dirty. Run a full fsck to fix. 修复文件系统: [root@aix220 /]#fsck -y /dev/lv02 ...... ** Phase 5 - Check Inode Map ** Phase 6 - Check Block Map Bad Block Map (SALVAGED) ** Phase 6b - Salvage Block Map Superblock is marked dirty (FIXED) 123665 files 10749336 blocks 20707944 free ***** Filesystem was modified ***** mount文件系统成功: [root@aix220 /]#mount /u01 [root@aix220 /]#df -m Filesystem MB blocks Free %Used Iused %Iused Mounted on /dev/hd4 17408.00 1238.16 93% 37699 12% / /dev/hd2 8192.00 6310.39 23% 46534 4% /usr /dev/hd9var 2048.00 1725.55 16% 1704 1% /var /dev/hd3 2048.00 1902.58 8% 420 1% /tmp /dev/fwdump 3072.00 3071.21 1% 4 1% /var/adm/ras/platform /dev/hd1 2048.00 1821.98 12% 74 1% /home /proc - - - - - /proc /dev/hd10opt 2048.00 1374.77 33% 8934 3% /opt /dev/lv00 1024.00 991.80 4% 18 1% /var/adm/csd /dev/lv02 15360.00 10111.30 35% 123674 4% /u01 执行sqlplus命令成功: [root@aix220 /]#su - oracle [oracle@aix220 ~]$sqlplus '/as sysdba' SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 17 19:46:03 2015 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL>
Stored procedures are precompiled SQL statements in MySQL for improving performance and simplifying complex operations. 1. Improve performance: After the first compilation, subsequent calls do not need to be recompiled. 2. Improve security: Restrict data table access through permission control. 3. Simplify complex operations: combine multiple SQL statements to simplify application layer logic.

The working principle of MySQL query cache is to store the results of SELECT query, and when the same query is executed again, the cached results are directly returned. 1) Query cache improves database reading performance and finds cached results through hash values. 2) Simple configuration, set query_cache_type and query_cache_size in MySQL configuration file. 3) Use the SQL_NO_CACHE keyword to disable the cache of specific queries. 4) In high-frequency update environments, query cache may cause performance bottlenecks and needs to be optimized for use through monitoring and adjustment of parameters.

The reasons why MySQL is widely used in various projects include: 1. High performance and scalability, supporting multiple storage engines; 2. Easy to use and maintain, simple configuration and rich tools; 3. Rich ecosystem, attracting a large number of community and third-party tool support; 4. Cross-platform support, suitable for multiple operating systems.

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi


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

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)
