Allen's profileLi's spacePhotosBlog Tools Help

Blog


    June 24

    Oracle 管理常用语句

    --创建表空间
    create tablespace 表空间名
    datafile '数据库文件存放跟径/文件名'
    size 500M
    default storage
    (initial 200m
    next 50m
    minextents 20
    maxextents 500)
    online;

    --高级创建用户 (指定默认表空间 和 临时表空间 指定连接状态)
    CREATE USER 用户名 PROFILE DEFAULT IDENTIFIED BY 密码 DEFAULT
    TABLESPACE 表空间名 TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

    --为用户授权
    grant connect,resource,dba to 用户名;

    --删除用户
    drop user 用户名 cascade;
    commit;

    --删除表空间
    drop tablespace 表空间名;

    --查询当前数据名
    select name from v$database;

    --查询当前数据库实例名
    select instance_name from v$instance;

    --查询数据库服务名
    select value from v$parameter where name = 'service_name';

    --查看sequences
    select * from user_sequences;

    --查看触发器
    Select   Description,Trigger_Body   From   User_Triggers

    --修改表空间文件自增长
    alter database datafile '数据库文件存放跟径/文件名' autoextend on next 10m;

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://lislog.spaces.live.com/blog/cns!29F76575168CBBB9!255.trak
    Weblogs that reference this entry
    • None