
Oracle
DataPeak
不会做饭的程序员不是好的摄影师
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Oracle随笔
enterprise版本需要登录验证。原创 2023-10-09 22:07:47 · 164 阅读 · 0 评论 -
Oracle disable/enable foreign key constraint
alter table table_name disable/enable constraint constraint_name; declare select 'ALTER TABLE ' || owner || '.' || table_name || ' disable constraint ' || constraint_name as stmt from dba_constraints where constraint_type = 'R' ; begin for r原创 2022-02-15 16:39:53 · 427 阅读 · 0 评论 -
Oracle获取表定义(DDL)
SELECT to_char(DBMS_METADATA.GET_DDL(OBJECT_TYPE, object_name)) FROM all_OBJECTS where OBJECT_TYPE = 'TABLE' and owner = 'owner' and object_name = 'table_name';原创 2022-02-15 16:18:19 · 870 阅读 · 0 评论 -
解决ORA-01652: unable to extend temp segment in tablespace
原因: tablespace空间不够了,需要为tablespace创建新的数据文件 alter tablespace tablespace_name add datafile '/path/to/new/datafile' size 10m autoextend on maxsize unlimited;原创 2022-02-15 16:10:09 · 1103 阅读 · 0 评论 -
PL/SQL格式化字节
create or replace function format_bytes(pi_bytes in number) return varchar2 is c_unit constant number := 1024; l_size number; l_unit_ind integer; begin l_size := pi_bytes; l_unit_ind := 0; ...原创 2020-05-04 11:03:49 · 296 阅读 · 0 评论 -
Oracle query table space statistics
select df.tablespace_name ,format_bytes(df.total_space) as total_space ,format_bytes(df.total_space - fs.free_space) as used_space ,format_bytes(fs.free_space) as free_space from (se...原创 2020-05-04 11:15:25 · 235 阅读 · 0 评论 -
PowerShell连接查询Oracle数据库
PowerShell连接查询Oracle数据库 $USER = 'USER' $PASSWD = 'PASSWD' $SERVER = 'SERVER' $DB = 'DB' # create connection object Add-Type -AssemblyName 'System.Data.OracleClient' $CONNECTION_STR = "User Id=$USE...原创 2018-06-11 14:37:35 · 4093 阅读 · 2 评论 -
Oracle PL/SQL Nutshell
Oracle PL/SQL Nutshell 持续更新中。。。 Basic Syntax & Variables Basic Structure PL/SQL can be executed from SQL Plus Called PL/SQL blocks Anonymous blocks as they do not have a name Procedure...原创 2018-07-19 23:31:30 · 333 阅读 · 0 评论