windows下 ase 15.0.1使用小記

msdnchina發表於2011-07-16

sybase的具體資訊如下:

C:Documents and SettingsAdministrator>sqlsrvr -v
Adaptive Server Enterprise/15.0.1/EBF 13823/P/NT (IX86)/Windows 2000/ase1501/237
9/32-bit/OPT/Mon Aug 14 22:12:39 2006

Confidential property of Sybase, Inc.
Copyright 1987, 2006
Sybase, Inc. All rights reserved.
Unpublished rights reserved under U.S. copyright laws.

This software contains confidential and trade secret information of Sybase,
Inc. Use, duplication or disclosure of the software and documentation by
the U.S. Government is subject to restrictions set forth in a license
agreement between the Government and Sybase, Inc. or other written
agreement specifying the Government's rights to use the software and any
applicable FAR provisions, for example, FAR 52.227-19.
Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA

C:Documents and SettingsAdministrator>



今天在windows下 ase 15.0.1 上建立應用的資料庫,一開始建資料庫的應用程式(浪潮ps軟體-帳套管理)居然報錯:

---------------------------
提示資訊
---------------------------
由於There is not enough procedure cache to run this procedure, trigger, or SQL batch. Retry later, or ask your SA to reconfigure ASE with more procedure cache.資料庫系統重新聯結失敗,不能繼續安裝, 請退出重試!
---------------------------
確定
---------------------------


google了下,應該是'procedure cache size'過小的原因。那就改吧:

sp_configure 'max memory' ,399360

sp_configure 'procedure cache size',70000

--注意:改這兩個引數貌似是動態生效的,比較的爽。。。

由於建資料庫的應用程式(浪潮ps軟體-帳套管理)已經將cwbase1建立在sybase資料庫中了,需要先刪除。


sp_helpdevice


sp_dropdevice cwbase1_dump

sp_dropdevice cwdata1

sp_dropdevice cwlog1
sp_dropdevice cwmaster
sp_dropdevice tempdbd01


Device is being used by a database. You can't drop it.

---sp_dropdatabase cwbase1 並沒有這個儲存過程。呵呵

sp_helpdb

drop database cwbase1

sp_dropdevice cwdata1

sp_dropdevice cwlog1
sp_dropdevice cwmaster
sp_dropdevice tempdbd01


--device 是比database 更底層的概念,若是database 沒有drop的話,device是不能刪除的。


select * from sysusers


load database cwbase1 from 'c:02110710140750.BAK'
dump database cwbase1 to 'c:aaa.BAK'

Server Message: Number 7205, Severity 17
Server 'VM2003', Line 1:
Can't open a connection to site 'SYB_BACKUP'. See the error log file in the ASE boot directory.
Server Message: Number 7205, Severity 18
Server 'VM2003', Line 1:
Can't open a connection to site 'SYB_BACKUP'. See the error log file in the ASE boot directory.


00:00000:00001:2011/07/16 21:33:18.53 kernel Connectivity Library (Directory Control Layer) Error: Error returned by service provider.
00:00000:00001:2011/07/16 21:33:18.53 kernel Connectivity Library (Directory Control Layer) Error: (InterfacesDriver): Requested server name not found.
00:00000:00001:2011/07/16 21:33:18.53 server Error: 7220, Severity: 11, State: 1
00:00000:00001:2011/07/16 21:33:18.53 server Site 'SYB_BACKUP' not found in interfaces file.
00:00000:00001:2011/07/16 21:33:18.53 server Error: 7235, Severity: 17, State: 0
00:00000:00001:2011/07/16 21:33:18.53 server No other query entry found for the remote server SYB_BACKUP - site SYB_BACKUP. Aborting this site handler, as no remote server responded. Please make sure the remote server is accepting connections.


sp_helpserver


剛解決這個問題,原因是在sysservers表中的srvnetname與interface中的服務名不同造成的
將sysservers表中的SYB_BACKUP對應的srvnetname改成interface中的伺服器名即可
(interface 是指dsedit)
--類注:以上資訊是從網上搜的,其實與其改sysservers表中的SYB_BACKUP列的值,不如改dsedit中的值。


select * from sysservers

load database cwbase1 from 'c:02110710140750.BAK'

Server Message: Number 3216, Severity 10
Server 'VM2003', Line 1:
Backup Server session id is: 8. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Server Message: Number 602801, Severity 1
Server 'VM2003_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 6.28.1.1: Dumpfile name 'cwbase2111910C6B8' section number 1 mounted on disk file 'c:02110710140750.BAK'
Server Message: Number 3105, Severity 16
Server 'VM2003', Line 1:
Data on dump will not fit into current database. Need 900 Mbyte database.

device 與 database 是什麼關係?

sp_helpdevice

load database cwbase1 from 'c:02110710140750.BAK'

Data on dump will not fit into current database. Need 900 Mbyte database.

sp_helpdb

cwbase1 700.0 MB sa 5 Jul 16, 2011 select into/bulkcopy/pllsort, trunc log on chkpt
cwmaster 60.0 MB sa 4 Jul 16, 2011 mixed log and data
master 13.0 MB sa 1 Jul 16, 2011 mixed log and data
model 3.0 MB sa 3 Jul 16, 2011 mixed log and data
sybsystemdb 4.0 MB sa 31513 Jul 16, 2011 trunc log on chkpt, mixed log and data
sybsystemprocs 132.0 MB sa 31514 Jul 16, 2011 trunc log on chkpt, mixed log and data
tempdb 100.0 MB sa 2 Jul 16, 2011 select into/bulkcopy/pllsort, trunc log on chkpt, mixed log and data

load database cwbase1 from 'c:02110710140750.BAK'

online database cwbase1

--注意:'c:02110710140750.BAK'備份檔案是ase12.5.1版本的,所以,在online database cwbase1時,會進行版本的升級。

[@more@]

SYBASE

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/161195/viewspace-1052575/,如需轉載,請註明出處,否則將追究法律責任。

相關文章