第一次打开oracle,第一次使用Oracle

本文详细介绍了如何使用DBCA创建和删除Oracle数据库,并通过PL/SQL Developer进行用户管理、表空间创建及权限分配。此外,还提供了C#连接Oracle数据库的字符串范例,以及一系列用于创建表空间和用户的SQL脚本。
摘要由CSDN通过智能技术生成

1.使用DBCA创建或删除数据库

2.启动PlSqlDev(PL/SQL

Developer)程序,用system帐号登陆到第1步创建的数据库,并创建回滚表空间,用户空间,临时表空间,用户及权限等.

3.若启动PlSqlDev后无法连接到DBCA创建的数据库,请使用Net Manager程序配置一下IP及端口.

4.用第2步中创建的用户重新登陆PlSqlDev后创建表,即可.

5.Oracle的C#连接串是:Data

Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.17.208)

(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=数据库名称)));Persist Security

Info=True;User Id=用户名; Password=密码

6.在第2步中创建回滚表空间,用户空间,临时表空间,用户及权限等用到的脚本如下:

--创建回滚表空间

create tablespace NppsisRbs

datafile 'D:\Oracle11g\OracleData\NPPSIS\NppsisRbs.dbf' size 256M

reuse

autoextend on next 512K

minimum extent 1024K

default storage (initial 1024K next 512K minextents 8 maxextents

4096);

--创建用户表空间

create tablespace NppsisUsers

datafile

'D:\Oracle11g\OracleData\NPPSIS\NppsisUsers01.dbf' size 1024M

reuse

autoextend on next 128M

minimum extent 512M

default storage (initial 512M next 128M

minextents 8 maxextents 4096);

--创建临时表空间

create temporary tablespace Nppsis_temp

tempfile 'D:\Oracle11g\OracleData\NPPSIS\Nppsis_temp01.dbf'

size 8m

autoextend on

next 8m maxsize 64m

extent management local;

--创建工具表空间

create tablespace NppsisTools

datafile 'D:\Oracle11g\OracleData\NPPSIS\NppsisTools01.dbf' size

32M reuse

autoextend on next 320K

minimum extent 32K

default storage (initial 32K next 32K minextents 1

maxextents 4096 pctincrease 0);

--创建用户并指定相应的表空间

create user Nppsis

identified by tsnppsisadmin

default tablespace NppsisUsers

temporary tablespace Nppsis_temp

profile DEFAULT

password expire;

-- Grant/Revoke role privileges

grant dba to NPPSIS with admin option;

-- Grant/Revoke system privileges

grant alter any procedure to NPPSIS with admin option;

grant alter any sequence to NPPSIS with admin option;

grant alter any table to NPPSIS with admin option;

grant alter any trigger to NPPSIS with admin option;

grant create any procedure to NPPSIS with admin option;

grant create any sequence to NPPSIS with admin option;

grant create any table to NPPSIS with admin option;

grant create any trigger to NPPSIS with admin option;

grant create any view to NPPSIS with admin option;

grant unlimited tablespace to NPPSIS with admin option;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值