zoukankan      html  css  js  c++  java
  • suse系统 sybase 12.5建库

    在linux系统已经安装sybase 12.5之后,可以在命令行

    执行 isql -Usa -P密码 -i  脚本文件(如下)

    以下是脚本内容:(创建为yxmdb的库和user001,密码是123456的数据库用户)

    declare @vdevno int
    select @vdevno=1+max(low/power(2,24)) from master..sysdevices

    disk init name= "YXMDevice",
    physname="/home/sybase/data/YXMDevice", vdevno=@vdevno,size=2048000 

    select @vdevno=@vdevno+1
    disk init name= "YXMLogDevice",
    physname="/home/sybase/data/YXMLogDevice", vdevno=@vdevno,size=1024000

    print 'Disk init YXMDevice 2000M OK'
    print 'Disk init YXMLogDevice 1000M OK'
    go

    sp_dboption "model","select into/bulkcopy",true
    go

    sp_dboption "model","trunc log on chkpt",true
    go

    sp_dboption "model","allow nulls by default",true
    go

    sp_dboption "tempdb","select into/bulkcopy",true
    go

    sp_dboption "tempdb","trunc log on chkpt",true
    go

    sp_dboption "tempdb","allow nulls by default",true
    go

    use model
    go
    checkpoint
    go

    use tempdb
    go
    checkpoint
    go

    use master
    go

    print 'Create database yxmdb ...'
    go

    /*
     * data 4000M
     * log 2000M
     */
    create database yxmdb on YXMDevice=4000 log on YXMLogDevice=2000
    go

    print 'Create database yxmdb OK!'
    go

    sp_addlogin "user001","123456","yxmdb"
    go
    sp_adduser user001
    go

    use yxmdb
    go

    sp_changedbowner user001
    go

    use yxmdb
    go
    checkpoint
    go

    print 'Create user user001 OK!'
    go

  • 相关阅读:
    Timer Pattern
    la négation
    expression de la fréquence
    .NET 索引器
    JQuery.Gantt(甘特图) 开发指南
    .NET 预处理器指令
    .NET 数据类型之匿名类型(var)
    .NET base与this
    .NET using关键字
    .NET 基础语句
  • 原文地址:https://www.cnblogs.com/yangxuming/p/6663628.html
Copyright © 2011-2022 走看看