怎样用PB程序代码在SQL_server中建立数据库?急!!!

HelenIsxingfang 2003-12-27 03:31:37
怎样利用PB程序代码在SQL_server2000中建立数据库?急!!!
...全文
41 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
banalman 2003-12-28
  • 打赏
  • 举报
回复
用动态sql语句。
Sting ls_temp;
ls_temp="CREATE DATABASE mytest"
EXECUTE IMMEDIATE ls_temp;
yk80 2003-12-27
  • 打赏
  • 举报
回复
我给你提个建议,直接在存储过程中写就好了。
CoolSoftBird 2003-12-27
  • 打赏
  • 举报
回复
你要建库只能在 SQLSERVER中, 不能在pb程序中,,,
我以前也试过,
lijiashu1981 2003-12-27
  • 打赏
  • 举报
回复
DISK INIT 和 CREATE DATABASE
sp_diskdefault


Examples

A. Create a Single Database on a Single Device

This example creates a 12-MB database called testing on DEVICE1.

CREATE DATABASE testing
ON DEVICE1 = 12

B. Create a Single Database on Two Devices ¾ Separate Data and Log

This example creates a single database (sales) with the data portion on DEVICE3 and the log portion on DEVICE4.

CREATE DATABASE sales
ON DEVICE3 = 125
LOG ON DEVICE4 = 60


C. Create a Database FOR LOAD

This example creates a single database (personnel) with the data portion spanning three devices (DEVICE5, DEVICE6, and DEVICE7) and the log portion on DEVICE8. The total database size is 200 MB composed of 150 MB for data and 50 MB for log.

CREATE DATABASE personnel
ON DEVICE5 = 50, DEVICE6 = 50, DEVICE7 = 50
LOG ON DEVICE8 = 50
FOR LOAD
go


Examples

Define Database Devices

This example creates a 12 MB (6144 2K pages) device called DEVICE1. This device is created in the same directory as the default SQL Server 6.0 MASTER device.

DISK INIT
NAME = 'DEVICE1',
PHYSNAME = 'c:\sql60\data\device1.dat',
VDEVNO = 1,
SIZE = 6144


This example creates a 16 MB (8192 2K pages) device called DEVICE2. This device is created on a different logical drive from DEVICE1. The SQLDATA directory must exist prior to the execution of this statement.

DISK INIT
NAME = 'DEVICE2',
PHYSNAME = 'd:\sqldata\device2.dat',
VDEVNO = 2,
SIZE = 8192


This example creates a 125 MB (64,000 2K pages) device called DEVICE3. This device is created on a third logical drive. The SQLDATA directory must exist prior to the execution of this statement.

DISK INIT
NAME = 'DEVICE3',
PHYSNAME = 'e:\sqldata\device3.dat',
VDEVNO = 3,
SIZE = 64000




754

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧