1、创建新用户,权限为DBA2、存储过程:http://blog.csdn.net/x125858805/article/details/7581806
原创 2013-11-01 10:48:38
476阅读
Oracle - 常用SQL语句
原创 2013-12-09 22:44:41
750阅读
--oracle的字典select * from dictionary--创建表空间oracle创建表空间create tablesapce  testSpacedatafile 'E:oracleSpace\test.dbf'size 100Mstidentified by t123456...
转载 2023-09-14 09:32:33
132阅读
1.查看表空间:SELECTtotal.tablespace_name,Round(total.MB,2)ASTotal_MB,Round(total.MB-free.MB,2)ASUsed_MB,Round((1-free.MB/total.MB)*100,2)||'%'ASUsed_PctFROM(SELECTtablespace_name,Sum(bytes)/1024/10
原创 2018-10-26 21:43:43
807阅读
1、查看表空间的使用状况。 SELECT   upper(f.tablespace_name)   表空间名,                  d.Tot_grootte_Mb&
转载 精选 2015-09-23 08:26:27
636阅读
oracle常用set语句,转自:http://www.cnblogs.com/tomatoes-/p/6108916.html
转载 2017-10-31 16:29:03
990阅读
正在看的ORACLE教程是:oracle常用sql语句。SQL*Plus system/manager 2、显示当前连接用户 SQL> show user 3、查看系统拥有哪些用户 SQL> select * from all_users; 4、新建用户并授权 SQL> create user a identified by a;(默认建在SYSTEM表空间下) SQL>
转载 精选 2012-08-28 19:57:28
434阅读
drop table test2;create table test( id integer not null, name varchar2(100));---可为空alter table test modify (id null);---不可为空alter table test modify (id not null);---添加表中的列 alter table + add子句alter table test add (ceilphone varchar2(20));---修改表中的列 alter table + modify子句,如果是不可为空,要先update,再修改alter ...
转载 2012-03-19 14:25:00
100阅读
2评论
  察看数据库的大小,和空间使用情况 select b.file_id  文件ID,    b.tablespace_name  表空间,    b.file_name     物理文件名,    b.bytes       总字节数,    (b.bytes-sum(nvl(a.bytes,0)))   已使用,    
--1、查询系统表空间信息SELECT * FROM SYS.DBA_TABLESPACES;--2、查询表空间所在路径信息select * from dba_data_files;--3、查询用户所属表空间select u.username as 用户名,u.default_tablespace as 所属表空间 from dba_users u;--4、创建表空间create tablespa
原创 2014-11-12 10:43:05
820阅读
SELECT * from user_views where view_name='v$session';SELECT * FROM ALL_USERS where username like 'S%';select * from v$database;select username,profile from dba_users;;select * from dba_profiles where
原创 2016-11-19 15:07:21
649阅读
1.删除用户下的所有内容:drop   user   xxx   cascade;2.删除表空间:drop tablespace AA including contents;3.查看当前用户默认表空间:select * from user_users  4.查看、修改表空间大小:select * from dba_data_files where
转载 2023-05-10 14:35:42
91阅读
1、说明:创建数据库Create DATABASE database-name2、说明:删除数据库drop database dbname3、说明:
原创 2021-07-12 15:52:08
294阅读
oracle练习1.如何查询一个角色包括的权限   a.一个角色包含的系统权限   select * from dba_sys_privs where  grantee='DBA';   b.一个角色包含的对象权限2.oracle究竟有多少种角色  (查询oracle中所有的角色,一般是dba)  
1、查看表空间的名称及大小select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_sizefrom dba_tablespaces t, dba_data_files dwhere t.tablespace_name = d.tablespace_namegroup by t.tablespace_name;2、查看表空间物理文件的
转载 2007-05-12 16:59:54
1143阅读
1评论
Oracle维护常用SQL语句   1、查看表空间的名称及大小    select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size  from dba_tablespaces t, dba_data_files d  where t.tablespace_name = d.tablespace_name  grou
转载 2008-03-31 16:43:04
661阅读
1.decode 函数(小版本的case when)select  decode(pd.discount_id,null,'','购买'||pd.product_count||'个,'||pd.product_discount_rate||'折优惠') as discount from b2b_product d right join b2b_product_hot ph on
原创 2014-07-12 16:07:33
620阅读
一、oracle 常用相关sql 语句   1. 连接数据库       su - oracle -c " sqlsplus 用户/密码     注:首次登陆用  sqlplus / as sysdba      &nb
原创 2016-06-27 19:51:35
575阅读
select log_mode,open_mode ,database_role from v$database; --查看dataguard主备库状态 select status from v$instance; --查看数据库状态 alter database recover 
原创 2017-12-29 10:37:42
1065阅读
1点赞
--建表 create table adolph(id number(10,0), name varchar2(20), salary number(10,0)); --建约束 alter table adolph add constraint adolph_id_pk primary key(id
转载 2022-08-31 15:11:39
132阅读
  • 1
  • 2
  • 3
  • 4
  • 5