• Oracle常用命令


    select instance_name from v$instance;


    create tablespace POSPDATA datafile '/u01/oradata/POSP/posp1.dbf' size 3G autoextend on online

    alter tablespace POSPDATA add datafile '/u01/oradata/POSP/posp5.dbf' size 1G autoextend on; online

    create user posp identified by posp default tablespace posp;

    create directory expdp AS '/dmp';
    impdp system/oracle dumpfile=posp_expdp_20170718.dmp exclude=STATISTICS ignore=y logfile=exp.log schemas=POSP parallel=4 JOB_NAME=full_job


    alter tablespace posp rename to POSPDATA

    ---查看数据库字符集
    select userenv('language') from dual;

    drop user posp cascade;

    create user posp identified by posp default tablespace POSPDATA;
    grant dba to posp;
    alter user posp unlock;
    grant connect to posp;
    --查看dump文件字符集
    cat posp_expdp_20170718.dmp|od -x|head -1|awk '{print $2 $3}'|cut -c 3-6
    0154
    select nls_charset_name(to_number('0154','xxxx')) from dual;

    select 'drop table ' || owner_name ||'.'||job_name||'.' from dba_datapump_jobs where state='NOT RUNNING'

    select t.tablespace_name,round(sum(bytes/(1024*1024))) t_size
    from dba_tables t,dba_data_files d
    where t.tablespace_name=d.tablespace_name
    group by t.tablespace_name;

    select
    from
    where

  • 相关阅读:
    【2-26】string/math/datetime类的定义及其应用
    聚合函数,数学函数,字符串函数,时间日期函数
    数据库备份,还原,分离与附加
    SQL数据库增删改查
    form表单验证和事件、正则表达式
    悬浮动态分层导航
    图片轮播
    marquee标签
    Window.document对象
    Window.document对象
  • 原文地址:https://www.cnblogs.com/karmapeng/p/7490618.html
Copyright © 2020-2023  润新知