用裸设备扩展oracle表空间
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 用裸设备扩展oracle表空间 服务器:IBM P6小型机 操作系统: AIX5.3 DB:Oracle 10g 现有表空间users,提示表空间不足。 1.查询表空间已使用的裸设备文件名称 执行如下sql: select * from DBA_DATA
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入
用裸设备扩展oracle表空间
服务器:IBM P6小型机
操作系统: AIX5.3
DB:Oracle 10g
现有表空间users,提示表空间不足。
1.查询表空间已使用的裸设备文件名称
执行如下sql:
select * from DBA_DATA_FILES
where tablespace_name = 'USERS'
结果:
FILE_NAME FILE_ID TABLESPACE_NAME BYTES
/dev/rlvusers01 5 USERS 17179607040
/dev/rlvusers02 6 USERS 17179860992
/dev/rlvusers03 7 USERS 17179860992
/dev/rlvusers04 9 USERS 17179860992
2.查询裸设备所在的vg
[P6:51:oracle]/home/oracle>lsvg -l datavg
datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvusers01 raw 64 64 1 open/syncd N/A
lvusers02 raw 64 64 1 open/syncd N/A
lvusers03 raw 64 64 1 open/syncd N/A
lvusers04 raw 64 64 1 open/syncd N/A
3.查看裸设备lv的详细信息
[P6:51:oracle]/home/oracle>lslv lvusers04
LOGICAL VOLUME: lvusers04 VOLUME GROUP: datavg
LV IDENTIFIER: 00c4cf1400004c00000001216d90213b.24 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 256 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: no
INTRA-POLICY: middle UPPER BOUND: 128
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: off
EACH LP COPY ON A SEPARATE PV ?: no
Serialize IO ?: NO
DEVICESUBTYPE : DS_LVZ
注意LPS:64,VG:datavg,PP size:256M
所以lvusers04的大小 = 64*256M= 16G
4.查看vg空闲空间是否够
[P6:51:oracle]/dev>lsvg datavg
VOLUME GROUP: datavg VG IDENTIFIER: 00c4cf1400004c00000001216d90213b
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1209 (309504 megabytes)
MAX LVs: 512 FREE PPs: 495 (126720 megabytes)
LVs: 27 USED PPs: 714 (182784 megabytes)
OPEN LVs: 26 QUORUM: 1 (Disabled)
TOTAL PVs: 3 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 3 AUTO ON: no
Concurrent: Enhanced-Capable Auto-Concurrent: Disabled
VG Mode: Concurrent
Node ID: - Active Nodes:
MAX PPs per VG: 130048
MAX PPs per PV: 1016 MAX PVs: 128
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
注意Free PPs:126720M,约120G
5.新建裸设备LV(使用root登陆)
#mklv -y 'lvusers05' -t 'raw' datavg 64
6.更改裸设备所属owner
#chown oracle:dba /dev/rlvusers05
*这里尤其要注意一点,如果oracle使用了RAC的话,必须每个节点都执行上述语句。
***
而且经过测试发现,增加之后,必须更新hacmp(因为增加的lv只有在1节点上有,2节点并没有),所以要重启hacmp并更新hacmp信息。
重启后lv的owner可能会恢复成root,需要手动重置下。
***
7.在ORACLE扩展表空间
sql
ALTER tablespace users add DATAFILE '/dev/rlvusers05' SIZE 16000M AUTOEXTEND OFF;
注意 size是160000M,而不是直接16G,因为不能用满,得留点空间。
8.查看裸设备lv状态
[P6:51:oracle]/dev>lslv lvusers05
LOGICAL VOLUME: lvusers05 VOLUME GROUP: datavg
LV IDENTIFIER: 00c4cf1400004c00000001216d90213b.26 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 256 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 128
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
注意状态变成:opened/syncd
到此工作结束

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics



The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

After some users have updated and upgraded the win11 system, the computer has no sound. The problem of loving you is usually caused by no device, missing sound card driver, or unknown error. So how should we solve these problems? , this issue of win11 tutorial is here to answer everyone’s questions. Next, let’s take a look at the detailed steps. Solution to no sound after win11 upgrade: 1. No device 1. If we are using a desktop computer, it is probably because there is no device. 2. Because ordinary desktop computers do not come with built-in speakers, we need to plug in speakers or headphones to have sound. 2. The sound card driver is missing 1. After we update the Win11 system, the original sound card or audio device driver may not be available.

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).
