DB基本操作(oracle)

建立用户

drop user lztest4 cascade;

create user lztest4 identified by lztest123;

alter user lztest4 default tablespace COMMON_CABLE;

grant connect ,resource,dba to lztest4;

drop user lztest3 cascade;

create user lztest3 identified by lztest123;

alter user lztest3 default tablespace COMMON_CABLE;

grant connect ,resource,dba to lztest3;

建立用户

drop user lztest8 cascade;

create user lztest8 identified by lztest123;

alter user lztest8 default tablespace COMMON_CABLE;

grant connect ,resource,dba to lztest8;

drop tablespace common_cable INCLUDING CONTENTS AND DATAFILES;

建立表空间

create tablespace COMMON_CABLE

datafile ‘E:/COMMON_CABLE.dbf‘

size 1500M

autoextend on next 5M maxsize 3000M;

导出数据库

exp lztest/[email protected] file=lztest.dmp grants=y;

exp lztest7/[email protected] file=lztest7.dmp grants=y;

exp lztest6/[email protected] file=lztest6.dmp grants=y;

exp lztest5/[email protected] file=lztest5.dmp grants=y;

exp lztest6/[email protected] file=f:\lztest6.dmp grants=y;

imp lztest3/[email protected] file=f:\lztest6.dmp tablespaces=common_cable full=y;

导入数据库

不需要到文件的目录,使用默认的目录

imp lztest1/[email protected] file=f:/li/lztest.dmp full=y;

imp lztest4/[email protected] file=f:\bak.dmp tablespaces=common_cable full=y;

imp lztest8/[email protected] file=f:\bak.dmp tablespaces=common_cable full=y;

imp lztest21/[email protected] file=f:\lztesty.dmp tablespaces=common_cable full=y;

imp lztest21/[email protected] file=f:\lztesty.dmp tablespaces=common_cable full=y;

Microsoft Windows [版本 6.1.7600]

版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>

imp lzcable/[email protected] file=f:/lztestBAK.dmp tablespaces=common_cable full=y

imp lztest8/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest7/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest6/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest9/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest5/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest4/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest5/[email protected] file=f:/bak.dmp tablespaces=common_cable full=y

imp lztest8/[email protected] file=lztest7.dmp tablespaces=common_cable full=y

imp lztest6/[email protected] file=lztest6.dmp tablespaces=common_cable full=y

exp lztest/[email protected] file=f:\lztest6.dmp grants=y;

exp lztestorcl/[email protected] file=f:\lztest6.dmp grants=y;

exp lztest/[email protected] file=f:\lztest6.dmp grants=y;

exp lztestorcl/[email protected] file=f:\lztest6.dmp grants=y;

exp lztz/[email protected] file=f:\lztz.160314.2.dmp grants=y;

exp lztest50/[email protected] file=f:\lztest50.dmp grants=y;

imp lztest1/[email protected] file=f:/li/lztest.dmp full=y;

imp lztest50/[email protected] file=e:/lztest12345.dmp full=y;

exp lztest50/[email protected] file=E:\lztest50.dmp grants=y;

imp lztest51/[email protected] file=E:\lztest50.dmp  full=y;

imp lztz51/[email protected] file=E:\lztz50.dmp  full=y;

imp lztz52/[email protected] file=E:\lztz50.dmp  full=y;

imp lztest53/[email protected] file=E:\lztest50.dmp  full=y;

imp lztest55/[email protected] file=E:\lztest50.dmp  full=y;

imp lztest55/[email protected] file=F:\lztest123456.dmp  full=y;

imp lztest88/[email protected] file=F:\lztest320.dmp  full=y;

imp gas_lztz/[email protected] file=D:\lztz54.dmp  full=y;

create user lztest88 identified by lztest123;

grant connect ,resource,dba to lztest88;

alter user lztest88 default tablespace COMMON_CABLE;

exp lztz50/[email protected] file=/home/oracle/lztz320.dmp grants=y;

exp lztz50/[email protected] file=f:\lztz321.dmp grants=y;

exp lztz50/[email protected] file=/home/oracle/lztz321.dmp grants=y;

时间: 2024-08-05 15:34:48

DB基本操作(oracle)的相关文章

一个简单的NoSQL内存数据库—Berkeley DB基本操作的例子

一个简单的NoSQL内存数据库—Berkeley DB基本操作的例子 最近,由于云计算的发展,数据库技术也从结构式数据库发展到NoSQL数据库,存储模式从结构化的关系存储到现在如火如荼的key/value存储.其中Berkeley DB就是上述过程中的一个比较有代表性的内存数据库产品,数据库的操作是通过程序来实现的,而不是SQL语句.特别是当今数据不断动态增加的过程中,试图 通过数据切割来达到扩充的思路已经行不通了,因为事先不知道客户数据格式,因此服务提供商不可能进行数据切割.而无模式的key/

DB笔记(Oracle)

DB笔记(Oracle) 一.Oracle的安装,服务的启动,数据库的建立,用户的建立(略过). 二.Select语句: (一).单行函数: 1.      表达式和null计算,结果为null,即,不作显示(也就是数据失踪了!).所以一般用函数NVL(列名,替换值),如NVL(sal,0). 2.      字符串拼接:||    例如:select  ID||'---'||uname  from emp; 3.      排序 和过滤(order by 和 where): a)       

[Oracle] - Create DB on Oracle 12c for an Application

<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">Let's say we are going to develop a application for a bank, or any other enterprise, this application need a DB. And we decide to choose Oracle

Oracle数据库基本操作 —— Oracle数据库体系结构介绍、DDL、DCL、DML

一.Oracle数据库介绍 1.基本介绍 Oracle数据库系统是美国ORACLE公司(甲骨文)提供的以分布式数据库为核心的一组软件产品,是目前最流行的客户/服务器(CLIENT/SERVER)或B/S体系结构的数据库之一. 2.Oracle数据库的体系结构 ①数据库:database Oracle数据库是数据的物理存储.这包括(数据文件ORA或DBF.控制文件.联机日志.参数文件).Oracle数据的概念和其他数据库不一样,这里的数据库是一个操作系统只有一个库.可以看做是Oracle就只有一个

centos 6 oracle 11G DB install

因业务迁移,需重新部署oracle DB,此文仅作部署记录,部署文档主要参考官方文档http://docs.oracle.com/cd/E11882_01/install.112/e47689/toc.htm 概要: 主机:OpenStack 云主机 系统:Completing a Minimal Linux centos 6.8 x86_64 DB:Oracle Database 11g Release 2(11.2) 内存:2Gb 硬盘:/dev/vda 20Gb /dev/vdb 30Gb

Oracle GoldenGate (以下简称ogg)在异种os上同种db之间的数据同步。

ogg能实现的功能: 可以细化到单表同步,符合特定where条件的rows同步,指定column的同步. ogg 的竞争对手:ibm cdc:dell shareplex:dsg:dds等等 环境描述: 源头:windows 2003x64bit, oracle db 11.2.0.3 x64bit 目的端:suse linux ,oracle db 11.2.0.3 预先准备: 1.Microsoft Visual C ++ 2005 SP1 Redistributable Package 注

Oracle静默安装

测试CentOS 6.5_x64下静默安装Oracle 11g R2数据库 [一.下载地址] http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html Oracle 11g 联机文档: http://www.oracle.com/pls/db112/homepage [二.系统要求] 内存:1G(官方最低要求1G) 硬盘:40G(企业版安装所需4.29G和1.7G数据文件) 检查的命令 内

静默安装Oracle及创建数据库11G R2

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 oracle.install.option=INSTALL_DB_SWONLY DECLINE_SECURITY_UPDATES=true UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oracle/oraInventory SELECTED_LANGUA

Oracle 11g Articles

发现一个比较有意思的网站,http://www.oracle-base.com/articles/11g/articles-11g.php Oracle 11g Articles Oracle Database 11g: New Features For Administrators OCP Exam Articles Oracle Database 11g Release 1: Miscellaneous Articles Oracle Database 11g Release 2: Misc