ORACLE:主键索引更换表空间
在 Oracle 中,对于已经建好的主键,是自动创建索引的,并且索引是创建到当前的表空间中的,如果要将索引更换到其它表空间,可以使用如下的方法,超简单:
alter index index_aaa rebuild tablespace newtablespace;
newtablespace 是新指定的表空间。
相关文档:
update customers a
set city_name=(select b.city_name from tmp_cust_city b where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id
)
-- update 超过2个值
update customers a
set (city_name,customer_type)=(select b.city_name,b.customer_ ......
本文通过对Oracle数据库锁机制的研究,首先介绍了Oracle数据库锁的种类,并描述了实际应用中遇到的与锁相关的异常情况,特别对经常遇到
的由于等待锁而使事务被挂起的问题进行了定位及解决,并对死锁这一比较严重的现象,提出了相应的解决方法和具体的分析过程。
数据库是一个多用户使用的共享资源。当多个用户并发地存取 ......
Oracle数据库有两类备份方法。第一类为物理备份,该方法实现数据库的完整恢复,但数据库必须运行在归挡模式下(业务数据库在非归挡模式下运行),且需要极大的外部存储设备,例如磁带库;第二类备份方式为逻辑备份,业务数据库采用此种方式,此方法不需要数据库运行在归挡模式下,不但备份简单,而且可以不需要外部存储设备 ......
Oracle数据库中,有些情况下,对数据记录需要记录日志,或保存操作历史等情况.在此我们可以借助“数据库Trigger”进行。下面以一例进行说明:
CREATE OR REPLACE TRIGGER aits_auth_group_auth_trga_diu
AFTER update OR DELETE OR INSERT on aits_authority_group_auth
for each row
......
select v.spid spid,v.appid appid,v.version version,v.newversion newversion,v.status status,v.createtime createtime from adc_spversionchangeapply v inner join adc_application a on a.id=v.appid
where a.create_by = 'a' and v.appid = '12000000005' and (v ......