How does ASE get the maximum available device number?

xiaoxiao2021-03-06  39

A: See the script of the following equipment.

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

- DDL for DatabaseDevice 'Temp01'

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

Print 'Temp01'

Use master

Go

Declare @vdevno int

Select @vdevno = max (Convert (Tinyint, Substring (CONVERT (Binary (4), D.LOW), V.LOW, 1))) 1 from master.dbo.sysdevices d, master.dbo.spt_values ​​v Where v .type = 'e' and v.number = 3

Disk init name = 'temp01', physname = 'E: / ASE1250 / data / temp01', vdevno = @vdevno, size = 51200, vStart = 67108864, cntrltype = 0

Go

转载请注明原文地址:https://www.9cbs.com/read-76330.html

New Post(0)