Adaptive Server Anywhere


An overview of ASA illustrated with several examples. Advanced techniques for database administration.

This section is currently under construction


// shortcut for ASA engine start, Win2000
//  ... add -b option for large import operations

"C:\Program Files\Sybase\Adaptive Server Anywhere 6.0\win32\dbeng6.exe" -n MYDB -x tcpip(ServerPort=5501)  -c 16m -gd ALL -gp 4096 d:\data\mydb.db

// server start, Linux

dbsrv8 -cs -gn 3 -gm 5 -ti 0 -gr 60 -m -n dbserver1 -x TCPIP(serverport=5501) \
  -c 128m -gd ALL -gp 4096 /data/asa/ds_base.db -n mydatabase


// compiling SQL, Win2000

cd C:\Program Files\Sybase\Adaptive Server Anywhere 6.0\win32

dbisql -c "uid=dba;pwd=sql" c:\sql\test25.sql



// unload a table, format 1

UNLOAD TABLE employee
TO  'employee.dat'
DELIMITED BY '\x09'
QUOTES OFF
go


// unload a table, format 2

select * from table output to 'c:\sybase\data'
delimited by '|'
go


// load a table, from double piped delimited data

input into web_orders    
from d:\\data\\acs\\web_orders.dat 
delimited by '||' 
go


//  BCP format

load table holt_updates
from 'd:\\temp5\\emp_orders.dat'
delimited by '||'
format bcp


// List tables & proxy tables

select name, sysstat2,
        case
                when sysstat2 & 3072 = 3072 then 'proxy - existing'
                when sysstat2 & 1024 = 1024 then 'proxy - new'
                else "local"
        end as 'storage location'
from sysobjects where type = 'U'



// drop a foreign key constraint

alter table DBA.employee delete foreign key fk_employee1





Please visit our other site ...
Planet99 Guide to Bars, Restaurants, and More!

Technical References Page

email ... js99@rocket99.com

Copyright 1998-2006 © Citisoft, Inc. All Rights Reserved.