RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:9:30-18:00
你可能遇到了下面的问题
关闭右侧工具栏
学习sybase ase 12.5
  • 作者:xiaoxiao
  • 发表时间:2020-12-23 11:01
  • 来源:未知

1. 建设备,用户,库------------------------------------------------------------------------------- DDL for DatabaseDevice 'mydb001'-----------------------------------------------------------------------------print 'mydb001'

use mastergo

disk init  name  = 'mydb001',physname  = 'G:/ase1252/data/mydb001.dat',size  = '200M',cntrltype  = 0go

sp_deviceattr 'mydb001', dsync, truego

 

-----------------------------------------------------------------------------

-- DDL for DatabaseDevice 'mydb001_log'

-----------------------------------------------------------------------------

print 'mydb001_log'

 

use master

go

 

disk init  name  = 'mydb001_log',

physname  = 'G:/ase1252/data/mydb001_log.dat',

size  = '100M',

cntrltype  = 0

go

 

sp_deviceattr 'mydb001_log', dsync, true

go

 

 

 

-----------------------------------------------------------------------------

-- DDL for Login 'na'

-----------------------------------------------------------------------------

print 'na'

 

exec  sp_addlogin  'na', 'password', @defdb='mydb001', @deflanguage='us_english', @fullname='nax', @auth_mech = 'ASE'

 

exec sp_locklogin  'na', 'unlock'

 

 

 

go

 

 

-----------------------------------------------------------------------------

-- DDL for Database 'mydb001'

-----------------------------------------------------------------------------

print 'mydb001'

go

 

use master

go

 

create database mydb001 on mydb001 = 200

log on mydb001_log = 100

go

 

 

-----------------------------------------------------------------------------

-- Dependent DDL for Object(s)

-----------------------------------------------------------------------------

use mydb001

go

 

exec sp_changedbowner 'sa'

go

 

exec master.dbo.sp_dboption mydb001, 'select into/bulkcopy', true

go

 

exec master.dbo.sp_dboption mydb001, 'trunc log on chkpt', true

go

 

exec master.dbo.sp_dboption mydb001, 'abort tran on log full', true

go

 

checkpoint

go

 

 

2. 建表

------------------------------------------------------------------------------- DDL for Table'mydb001.dbo.aaa'-----------------------------------------------------------------------------print 'Creating Table mydb001.dbo.aaa'go