- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
Sybase ASA9/ASA10的使用方法
录入:edatop.com 点击:
我们来看一个示例:
1.创建一个新的ASA数据库文件:
D:sharedASA902>asa-init eherodemo.db
Initializing Database...
D:sharedASA902win32dbinit.exe eherodemo.db
Adaptive Server Anywhere Initialization Utility Version 9.0.2.3302
Creating system tables
Collation sequence: 936ZHO
Creating system views
Setting permissions on system tables and views
Setting option values
Initializing UltraLite deployment option
Database "eherodemo.db" created successfully
2.以Server模式启动eherodemo.db
D:sharedASA902>asa-start eherodemo.db
Starting Database...
D:sharedASA902win32dbsrv9.exe eherodemo.db
ransaction log: eherodemo.log
Starting checkpoint of "eherodemo" (eherodemo.db) at Fri Jul 20 2007 14:20
Finished checkpoint of "eherodemo" (eherodemo.db) at Fri Jul 20 2007 14:20
Database "eherodemo" (eherodemo.db) started at Fri Jul 20 2007 14:20
Database server started at Fri Jul 20 2007 14:20
Trying to start SharedMemory link ...
SharedMemory link started successfully
Trying to start NamedPipes link ...
NamedPipes link started successfully
Trying to start TCPIP link ...
Starting on port 2638
TCPIP link started successfully
Trying to start SPX link ...
SPX communication link not started
Now accepting requests
3. 多带几个参数来启动
asa-start.bat -x tcpip(ServerPort=2638) -n testdemodb eherodemo.db
表示启来的数据库的servername是testdemodb,但数据库文件名是eherodemo.db,不带-n选项,则数据库名就是eherodemo
PersonalDB和Server DB的区别在于,前者只用于单机客户端访问,而后者可以为多个远程客户端提供并发访问。
针对ASA10, 它为ASA9提供了升级工具:
这里有一个脚本用于简单的将asa9数据库升级到asa10数据库,脚本内容(asa-unload.bat):
@echo off
setlocal
call "%~dp0asa-setenv.bat"
echo Unloading Database...
echo %SQLANY10%win32dbunload.exe %*
"%SQLANY10%win32dbunload.exe" %*
endlocal
下边是一个升级的运行结果:
d:sharedASA100>asa-unload.bat -c "dbf=d:sharedasa902eherotest.db;uid=dba;pw
d=sql" -n eherotest10.db
Unloading Database...
d:sharedASA100..ASA100win32dbunload.exe -c "dbf=d:sharedasa902eherotest
.db;uid=dba;pwd=sql" -n eherotest10.db
SQL Anywhere Unload Utility Version 10.0.0.2745
Connecting and initializing
Unloading user and group definitions
Unloading table definitions
Unloading index definitions
Unloading functions
Unloading view definitions
Unloading procedures
Unloading triggers
Unloading SQL Remote definitions
Unloading MobiLink definitions
使用起来非常方便。
最后,我们可以借用Openclient或者ASA安装时带有的一个jdbc连接工具来连接数据库,这叫jutils。大概有1.2M左右。附件放不下。
感觉兴趣的可以到邮箱iiihero AT hotmail.com中索取。
我将其打包放到附件里边。也非常好用。不仅可以连接ASA,也可以用来连接ASE。