请教sysbase中 sp_extendsegment 和 alterbase 有什么不同
发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
请问sysbase中 sp_extendsegment 和 alterbase 有什么不同?
我知道sp_extendsegment 是将某个段扩到设备上,但是alterdabse不也有这个功能吗,而其在sp_extendsegment之前还需要先执行alterdatabase。
两者的用法到底是什么呢,有什么不同呢?请指教,谢谢。
------解决方案--------------------
alter database是将设备上的空间分配给数据库使用。
sp_extendsegement是对分配过来的数据设备空间进行分段规划。
只有先分来空间,才能进行下一步的规划!
------解决方案--------------------
参考标准:
Function
Extends the range of a segment to another database device.
Syntax
sp_extendsegment segname, dbname, devname
Parameters
segname - is the name of the existing segment previously defined with sp_addsegment.
dbname - is the name of the database on which to extend the segment. dbname must be the name of the current database.
devname - is the name of the database device to be added to the current database device range already included in segname.
Examples
1.sp_extendsegment indexes, pubs2, dev2
This command extends the range of the segment indexes for the database pubs2 on the database device dev2.
Comments
·After defining a segment, you can use it in the create table and create index commands to place the table or index on the segment. If you create a table or index on a particular segment, subsequent data for the table or index is located on that segment.
·To associate a segment with a database device, create or alter the database with a reference to that device. A database device can have more than one segment associated with it.
·A segment can be extended over several database devices.
·When you extend the logsegment segment, Adaptive Server recalculates its last-chance threshold.
Messages
·Can't run sp_extendsegment from within a transaction.
sp_extendsegment updates system tables, so it cannot be run from within a transaction.
·Device 'devname' is now exclusively used by 'segname'.
sp_extendsegment succeeded.
·'devname' is reserved exclusively as a log device.
You cannot create a segment on a database device that is dedicated to the database log.
·No such device exists -- run sp_helpdb to list the devices for the current database.
The named device does not exist in master.dbo.sysdevices.
·Segment extended.
sp_extendsegment succeeded. The segment named segname now includes space on the database device devname.
·'segname' is not a valid identifier.
Segment names must conform to the rules for identifiers. They must begin with a letter, an underscore character ( _ ), or a pound sign (#). After the first character, identifiers can include letters, underscores, pound signs, or dollar signs ($).
·The specified device is not used by the database.
Although the device named as the devname parameter exists in master.dbo.sysdevices, it is not used by the specified database. Segments can be extended only on database devices used by the database. Use alter database to extend a database on a device listed in the master.dbo.sysdevices table.
·There is no such segment as 'segname'.
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。
其他相似内容:
-
unix 下操作sybase 问题.各位大虾不吝赐教
在hp-ux下通过shell连接数据库.
通过一个查询语句如下:
select count(*) ct from t1
un...
-
询问关于sybase advantage的字体对齐问题。
Windows 下的 Sybase SQL Advantage
文件版本 11.5.1.3
在返回信息窗口,只有宋体字...
-
数据导入问题
linux 下将每天将最新生成的文件导入到sybase anywhere 11数据库
如何实现????
------解决方案--------------------
...
-
Sybase [ASE]版发贴提问的智慧和技巧
发贴时,标题包含数据库名称操作系统以及相应版本号,
e.g. Windows XP下ASE15.0.3安装出错
...
-
求sybase15for x86
那位大侠有给传一个
------解决方案--------------------
正传给你QQ.......
-
请问sysbase中 sp_extendsegment 和 alterbase 有什么不同?
我知道sp_extendsegment 是将某个段扩到设备上,但是alterdabse不也有这...
-
求帮忙将一个sybase里的数据导入sqlite和SqlServer
有一个很老的管理系统好像是用pb+sybase asa7 做的,目前仍在用,
现在要升级新的...
-
有没有电话面试时候数据库的面试题目可以参考的啊?
有没有电话面试时候数据库的面试题目可以参考的啊?
------解决方案---------...
-
sybase master服务启动时发生段错误怎么办?
下面是errlog:
Directory is not a suitable Sybase directory.
Building Adaptiv...
-
sybase的int型数字时间,如何转换?
sybase有一字段存储的是时间,但为INT型,如值为1265856544,即2010-02-11 10:49:04
在SYBASE的SQL中,...