Oracle FAQs and Tips
2005-04-19 15:05
369 查看
在已建好的table上添加primary key
1.建立索引
create index test_idx
on test(id);
2.添加約束
alter table test
add constraint test_pk primary key (id)
using index test_idx;
在SQLPLUS中登陸時出現以下錯誤
ERROR:
ORA-12638: Credential retrieval failed
解決方法:修改sqlnet.ora
如果SQLNET.AUTHENTICATION_SERVICES= (NTS)一行沒有被注釋,則注釋掉
#SQLNET.AUTHENTICATION_SERVICES= (NTS)
反之取消注釋
ALTER SYSTEM SET EVENTS='10231 trace name context forever,level 10' ;
内部事件,设置在全表扫描时跳过损坏的数据块.查看tablespace的空間使用情況
select a.tablespace_name,
trunc(sum(b.bytes/1024/1024),2) "FREE(M)",
trunc(sum(a.bytes/1024/1024)-sum(b.bytes/1024/1024),2) "USED(M)",
trunc(sum(a.bytes/1024/1024),2) "ALL(M)",
trunc(sum(b.bytes/1024/1024)/sum(a.bytes/1024/1024),2)*100||'%' "Free(%)"
from dba_data_files a
join dba_free_space b
on(a.file_id=b.file_id)
group by a.tablespace_name;
如何指定tnsname.ora的位置
設置環境變量TNS_ADMIN獲取當前SCN(9i以後)
select dbms_flashback.get_system_change_number from dual;
1.建立索引
create index test_idx
on test(id);
2.添加約束
alter table test
add constraint test_pk primary key (id)
using index test_idx;
在SQLPLUS中登陸時出現以下錯誤
ERROR:
ORA-12638: Credential retrieval failed
解決方法:修改sqlnet.ora
如果SQLNET.AUTHENTICATION_SERVICES= (NTS)一行沒有被注釋,則注釋掉
#SQLNET.AUTHENTICATION_SERVICES= (NTS)
反之取消注釋
ALTER SYSTEM SET EVENTS='10231 trace name context forever,level 10' ;
内部事件,设置在全表扫描时跳过损坏的数据块.查看tablespace的空間使用情況
select a.tablespace_name,
trunc(sum(b.bytes/1024/1024),2) "FREE(M)",
trunc(sum(a.bytes/1024/1024)-sum(b.bytes/1024/1024),2) "USED(M)",
trunc(sum(a.bytes/1024/1024),2) "ALL(M)",
trunc(sum(b.bytes/1024/1024)/sum(a.bytes/1024/1024),2)*100||'%' "Free(%)"
from dba_data_files a
join dba_free_space b
on(a.file_id=b.file_id)
group by a.tablespace_name;
如何指定tnsname.ora的位置
設置環境變量TNS_ADMIN獲取當前SCN(9i以後)
select dbms_flashback.get_system_change_number from dual;
相关文章推荐
- VCM tips: jar deployment path/install default user name and password/Oracle database schema clean/VPD file clean
- 27 FAQs on Oracle loading data and exporting data
- Ten Steps to Success - Tips and Advice for Oracle EBS Certification
- Oracle Application Hints and Tips
- Steps and Tips in Distributed Mode——Cola
- oracle drop table and purge
- DataGridView in Windows Forms – Tips, Tricks and Frequently Asked Questions(FAQ)
- Life of an Oracle I/O: tracing logical and physical I/O with systemtap
- SQL in ORACLE and SQL Server
- [翻]Why call it Apps and not Oracle ERP ?
- oracle里面如何写case语句及decode and sign 函数用法
- expert-oracle-database-architecture-oracle-database-programming-9i-10g-and-11g-techniques-and-soluti.pdf
- oracle 体系结构-instance and database
- PO: Tips and useful Query
- Authentication and Integration 第三篇:Oracle LDAP介绍
- Oracle data import and export impl/exp
- oracle between and 的简单条件查询
- Oracle性能诊断艺术-读书笔记(执行计划中显示 Starts, E-Rows, REM A-Rows and A-Time)等)
- Overview of Installing Oracle Database Software and Creating a Database
- Oracle-EBS-Linux-虚拟机-服务器配置问题(解决无监听AND客户端服务器字符集不匹配问题)