![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Oracle
DataPeak
不会做饭的程序员不是好的摄影师
展开
-
Oracle随笔
enterprise版本需要登录验证。原创 2023-10-09 22:07:47 · 109 阅读 · 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 · 361 阅读 · 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 · 759 阅读 · 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 · 926 阅读 · 0 评论 -
PL/SQL格式化字节
create or replace function format_bytes(pi_bytes in number) return varchar2is 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 · 244 阅读 · 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_spacefrom (se...原创 2020-05-04 11:15:25 · 201 阅读 · 0 评论 -
PowerShell连接查询Oracle数据库
PowerShell连接查询Oracle数据库$USER = 'USER'$PASSWD = 'PASSWD'$SERVER = 'SERVER'$DB = 'DB'# create connection objectAdd-Type -AssemblyName 'System.Data.OracleClient'$CONNECTION_STR = "User Id=$USE...原创 2018-06-11 14:37:35 · 3927 阅读 · 2 评论 -
Oracle PL/SQL Nutshell
Oracle PL/SQL Nutshell 持续更新中。。。Basic Syntax & VariablesBasic StructurePL/SQL can be executed from SQL PlusCalled PL/SQL blocksAnonymous blocks as they do not have a nameProcedure...原创 2018-07-19 23:31:30 · 286 阅读 · 0 评论