http://goo.gl/EmKxy0

Archive

Posts Tagged ‘Interview Ques’

Sybase dataserver binary output and dbcc command.

September 28th, 2011 No comments

When we execute dbcc sqltext without putting on traceflag 3604 and 3605
where the out put of sqltext goes? In errorlog?

No,For errorlog we have traceflag 3605.

Lets explore the RUN server file again:

/opt/sybase/ASE-15_0/bin/dataserver
-d/opt/sybase/devices/master.dat
-e/opt/sybase/ASE-15_0/install/PROD_ASE_DS1.log
-c/opt/sybase/ASE-15_0/PROD_ASE_DS1.cfg
-M/opt/sybase/ASE-15_0
-sPROD_ASE_DS1 > /dev/null

-e : denoting the errorlog file where all error message and informational messages resides.

AS we know, When we are running any binary file, the output of that binary displays on the screen.

What about the output of $SYBASE/$YSBASE_ASE/bin/dataserver binary,
generally we redirect it to null device (/dev/null) as above.

Now,I am redirecting the output to file like below as in /tmp/sybaselog.out file.

/opt/sybase/ASE-15_0/bin/dataserver
-d/opt/sybase/devices/master.dat
-e/opt/sybase/ASE-15_0/install/PROD_ASE_DS1.log
-c/opt/sybase/ASE-15_0/PROD_ASE_DS1.cfg
-M/opt/sybase/ASE-15_0
-sPROD_ASE_DS1 > /tmp/sybaselog.out

Run the dbcc sqltext command , the result would be display in dataserver output file, without any traceflag.

It means when we require any output on user screen and errorlog, need to enable the traceflag 3604 and 3605 respectively,
otherwise it will be display in sybase dataserver binary , out put file ,if we are redirecting it to file.

sybase@localhost ~]$ isql -Usa -SPROD_ASE_DS1
Password:
1> select @@spid
2> go

 ------
     14

(1 row affected)
1> select name from sysdatabases
2> go
 name
 ------------------------------------------------------------
 master
 model
 sybsecurity
 sybsystemdb
 sybsystemprocs
 tempdb

(6 rows affected)

1> dbcc sqltext(14)
2> go
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
1> dbcc sqltext(14)
2> go
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
1>

[sybase@localhost ~]$ tail -f /tmp/sybaselog.out
00:00:00000:00001:2011/09/28 08:51:15.11 server  ASE's default unicode sort order is 'binary'.
00:00:00000:00001:2011/09/28 08:51:15.11 server  ASE's default sort order is:
00:00:00000:00001:2011/09/28 08:51:15.11 server         'bin_iso_1' (ID = 50)
00:00:00000:00001:2011/09/28 08:51:15.11 server  on top of default character set:
00:00:00000:00001:2011/09/28 08:51:15.11 server         'iso_1' (ID = 1).
00:00:00000:00001:2011/09/28 08:51:15.11 server  Master device size: 500 megabytes, or 256000 virtual pages. (A virtual page is 2048 bytes.)
00:00:00000:00001:2011/09/28 08:51:15.11 kernel  Warning: Cannot set console to nonblocking mode, switching to blocking mode.
SQL Text: SELECT fid=right(space(80)+isnull(convert(varchar(80),fid),'NULL'),3), spid=right(space(80)+isnull(convert(varchar(80),spid),'NULL'),4), status=SUBSTRING(convert(varchar(80),status),1,10), loginame=SUBSTRING(convert(varchar(80),loginame),1,8), origname=SUBSTRING(convert(varchar(80),origname),1,8), hostname=SUBSTRING(convert(varchar(80),hostname),1,21), blk_spid=right(space(80)+isnull(convert(varchar(80),blk_spid),'NULL'),8), dbname=SUBSTRING(convert(varchar(80),dbname),1,6), tempdbname=SUBSTRIN
SQL Text: select @@spid

SQL Text: select name from sysdatabases

Please let me knwo if you have any more thoughts!!

Compiled Objects in ASE

September 22nd, 2011 No comments

Adaptive Server uses compiled objects to contain vital information about each database and to help you access and manipulate data.

  • A compiled object is any object that requires entries in the sysprocedures table, including:
  1. Check constraints
  2. Defaults
  3. Rules
  4. Stored procedures
  5. Extended stored procedures
  6. Triggers
  7. Views
  8. Functions
  9. Computed columns
  10. Partition conditions

Compiled objects are created from source text, which are SQL statements that describe and define the compiled object.

When a compiled object is created, Adaptive Server:

  • Parses the source text, catching any syntactic errors, to generate a parsed tree.
  • Normalizes the parsed tree to create a normalized tree, which represents the user statements in a binary tree format. This is the compiled object.
  • Stores the compiled object in the sysprocedures table.
  • Stores the source text in the syscomments table.

object id 98 and 99 in ASE:sysencryptkeys & ALLOCATION

September 21st, 2011 No comments

Yday came  across two object ids 98 & 99, after running the object_name function with these object id , I found two objects ALLOCATION and sysencrptkeys, but no details in sysobjects. I found these tables in all databases.

On Investigation I found that :

 

sysencryptkeys (object id 98) is a system table that has a role when ecrypted columns are used. More details:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36274.1502/html/tables/tables32.htm
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00968.1502/html/Encryption/title.htm

An ALLOCATION page (object id 99) is not a table, rather a space housekeeping page in ASE that manages page allocation. Space management in ASE is organised around allocation and OAM pages. Each device is divided up in multiples of 256 pages, meaning that every 256 pages, you will find an allocation page. This page keeps track which extents (8 pages) are allocated to an object and if they are, which object. More info:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00841.1502/html/phys_tune/X37428.htm
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00841.1502/html/phys_tune/phys_tune44.htm

98

sysencryptkeys

99

ALLOCATION


 

Sybase ASE 15.7 getting released in Sep’2011 Techwave!!!

July 17th, 2011 No comments

Source :  http://www.sybasesummit.com.au/sessions

This coming September, Sybase will release Adaptive Server Enterprise (ASE) 15.7 which provides a huge number of enhancements across a broad range of areas.

Developers will see significant new and improved Text & Image support, new Concurrency options, new DML support for a streamlined MERGE / UPSERT, among many other things. DBA’s will benefit from a focus on Operational Scalability with enhancements like Compression, support for Alter Table that defers changes to be “Just-in-Time”, On-line REORG REBUILD, and many other useful features. ASE 15.7 will also be first version certified to run SAP’s Business Suite ERP and CRM applications.

Some New Features : Read more…

Categories: ASE, News Tags: , , , ,

Sybase Replication Server: Warm Standby Setup using rs_int

May 19th, 2011 No comments

Guys,

Please find attached pdf for WS Setup using rs_init:

Sybase Replication Warm Standby Setup
In Next post we will be creating WS without rs_init, till then bbye.

Adding a Primary DB in Replication Server without rs_init

April 23rd, 2011 No comments

Task :  Adding a Primary Database to Replication Server without using rs_init.  So now we will me moving the data out to PROD_ASE.pdb2 database

1. Create the new database pdb2 as below                     <DS>

1> create database pdb2  on rep_db3_data=’5M’ log on rep_db3_log=’4M’

2> go

00:00:00000:00014:2011/04/23 04:07:02.01 kernel  Setting console to nonblocking mode.

00:00:00000:00014:2011/04/23 04:07:02.01 server  Timestamp for database ‘pdb2’ is (0x0000, 0x00001428).

CREATE DATABASE: allocating 2560 logical pages (5.0 megabytes) on disk

‘rep_db3_data’ (2560 logical pages requested).

CREATE DATABASE: allocating 1536 logical pages (3.0 megabytes) on disk

‘rep_db3_log’ (2048 logical pages requested).

Database ‘pdb2’ is now online.

Creating a table for moving the data   <DS>      

1> use pdb2

2> go

1> create table table2 ( col1 int primary key, col2 varchar(10))

2> go

2. Again create the maint user login and add the maint user in pdb2 ( I made it as alias, but we can also add it as simple user)          <DS>      

1> sp_addlogin pdb2_maint,pdb2_maint_ps,pdb2

2> go

Password correctly set.

Account unlocked.

New login created.

(return status = 0)

1> use pdb2

2> go

1> sp_addalias pdb2_maint,dbo

2> go

Alias user added.

(return status = 0)

3. Grant the replication role to pdb2_maint login.         <DS>  

1> grant role replication_role to pdb2_maint

2> go

4. Need to install the some system tables and stored procs in pdb2 for proper function as Primary database.    <DS>

Move int $SYBASE/$SYBASE_REP/scripts/

Run the script rs_install_primary.sql in pdb2 database

[sybase@localhost scripts]$ isql -Usa -SPROD_ASE -irs_install_primary.sql -w9999 -e -ors_install_primary.sql.out -Dpdb2

Password:

It will create sp and tables in pdb2 which is required for replication.

5. Configure the rep agent on the pdb2 ans its primary database       <DS>

1> use pdb2

2> go

1> sp_config_rep_agent pdb2,enable,”PROD_RS”,”PROD_RS_ra”,”PROD_RS_ra_ps”

2> go

Replication Agent enabled for database ‘pdb2’. The Replication Agent thread

needs to be started using sp_start_rep_agent.

(return status = 0)

PROD_RS_ra /PROD_RS_ra_ps is the replication user and password. If there is already a rep agent you can view

your user from rs_users tables, other wise you need to create a replication user to connect with Rep Server.

6. Now create the connection to this database with log transfer on as its primary database.      <RS>

1> create connection to “PROD_ASE”.”pdb2″

2> set error class rs_sqlserver_error_class

3> set function string class rs_sqlserver_function_class

4> set username “pdb2_maint”

5> set password  “pdb2_maint_ps”

6> with log transfer on

7> go

Connection to ‘PROD_ASE.pdb2’ is created.

7. After doing the admin who_is_down in RS, you will get rep agent down.   <RS>

1> admin who_is_down

2> go

Spid     Name                 State

Info

——– ——————– —————————————-

——————————————————————————–

REP AGENT            Down

PROD_ASE.pdb2

8. Start the rep agent in primary database as below :    <DS>

1> use pdb2

2> go

1> sp_start_rep_agent ‘pdb2’

2> go

Replication Agent thread is started for database ‘pdb2’.

(return status = 0)

9. You will not be having any thread down in replication environment:  <RS>

1> admin who_is_down

2> go

Spid     Name                 State

Info

——– ——————– —————————————-

——————————————————————————–

10. Now configuration Completed, the next step is testing:

Adding a Replicate DB in Replication Server without rs_init

April 23rd, 2011 No comments

Hi Guys,
Now the task is : We want to move the data from PROD_ASE.pdb to new database PROD_ASE.rdb2. We want to complete this setup without using rs_init.

Always remember, whenever we want to add a primary/replicate database, we need a connection. A connection always represents a replicate database (means connection must be having DSI thread).

We will use the same pdb , which we added in previous post, Now I am going to add rdb2 database in RSS. Basically it requires a connection and some set of tables in rdb which requires for replication.

1. Created rdb2 on data and log device.

create database rdb2  on rep_db3_data=’5M’ log on rep_db3_log=’4M’

create a table in database :

1> use rdb2
2> go
1>  create table table1 ( col1 int primary key, col2 varchar(10))
2> go

2. Add maint user login for rdb2 as rdb2_maint

1> sp_addlogin rdb2_maint,rdb2_maint_ps,rdb2
2> go
Password correctly set.
Account unlocked.
New login created.
(return status = 0)

3. Add the rdb2_main user in the database rdb2 as dbo alias

(To avoid any pemission issue, even we can add it as simple user ,

in that case for each and every table we need to grant the permission separately)

1> use rdb2
2> go
1> sp_addalias rdb2_maint,dbo
2> go
Alias user added.
(return status = 0)

4. Grant the replication Role to maint user

1> grant role replication_role to rdb2_maint
2> go

5. Install the replication table in rdb2 database by script rs_install_replicate.sql

[sybase@localhost scripts]$ isql -Usa -SPROD_ASE -Dpdb2 -w999 -irs_install_replicate.sql -ors_install_replicate.sql.out

This script resides in script folder of replication server.

After the installation of script you will have following tables in rdb2 DB

1> use rdb2
2> go
1> select name from sysobjects where name like ‘rs%’
2> go
name
———–
rs_get_lastcommit
rs_get_thread_seq
rs_initialize_threads
rs_lastcommit
rs_threads
rs_ticket_report
rs_update_lastcommit
rs_update_threads

(8 rows affected)

6. Now login into Replication Server andcreate the connection as :

1>
2> create connection to PROD_ASE.rdb2
set error class to rs_sqlserver_error_class
set function string class to rs_sqlserver_function_class
set username to rdb2_maint
set password to rdb2_maint_ps

3> 4> 5> 6> 7>

8> go
Connection to ‘PROD_ASE.rdb2’ is created.

Make sure there is no thread down

7. As we already created the replication def for pdb.table1 table, we will use here.

Now create the subscription for PROD_ASE.rdb2

1>
2> create subscription repdef_pdb_table1_sub
3> for repdef_pdb_table1
4> with replicate at PROD_ASE.rdb2
5> without materialization
6> go
Subscription ‘repdef_pdb_table1_sub’ is in the process of being created.
1> check subscription repdef_pdb_table1_sub
for repdef_pdb_table1
with replicate at PROD_ASE.rdb2

2> 3>
4> go
Subscription repdef_pdb_table1_sub is VALID at the replicate.
Subscription repdef_pdb_table1_sub is VALID at the primary.
1>

8. Test the replication now, set up is completed:

1> use pdb
2> go
1> insert table1 values(1890,’val’)
2> go
(1 row affected)
1> use rdb2
2> go
1> select * from table1
2> go
col1        col2
———– ——————–
1890 val

(1 row affected)
1> use rdb
2> go
1> select * from table1
2> go
col1        col2
———– ——————–
100 val1
101 val2
1890 val

(3 rows affected)

Sybase Replication Setup using rs_init on Linux -4

April 15th, 2011 No comments

5. Creating Rep Def , Sub and testing Replication:

a) creating table in the pdb and rdb with name table1

1> use pdb
2> go
1> create table table1 ( col1 int primary key, col2 varchar(10))
2> go

1> use rdb
2> go
1> create table table1 ( col1 int primary key, col2 varchar(10))
2> go

b) Marking the table1 for replication.
1> use pdb
2> go
1> sp_setreptable table1
2> go
The replication status for ‘table1’ is currently false, owner_off.
(return status = 0)
1> sp_setreptable table1,true
2> go
The replication status for ‘table1’ is set to true, owner_off.
(return status = 0)

c) Creating replication Definitation & Sub:

1> create replication definition repdef_pdb_table1
2> with primary at PROD_ASE.pdb
3> with all tables named table1
4> (col1 int, col2 varchar(10))
5> primary key (col1)
6> replicate minimal columns
7>
8> go
Replication definition ‘repdef_pdb_table1’ is created.

1> create subscription repdef_pdb_table1_sub
2> for repdef_pdb_table1
3> with replicate at PROD_ASE.rdb
4> without materialization
5> go
Subscription ‘repdef_pdb_table1_sub’ is in the process of being created.

1> check subscription repdef_pdb_table1_sub
2> for repdef_pdb_table1
3> with replicate at PROD_ASE.rdb
4> go
Subscription repdef_pdb_table1_sub is VALID at the replicate.
Subscription repdef_pdb_table1_sub is VALID at the primary.

Now setup is completed.
d) Testing the data movement :

1> use pdb
2> go
1> insert table1 values(100,’val1′)
2> go
(1 row affected)
1> use rdb
2> go
1> select * from table1
2> go
col1 col2
———– ——————–
100 val1

(1 row affected)
1> use pdb
2> go
1> insert table1 values(101,’val2′)
2> go
(1 row affected)
1> use rdb
2> go
1> select * from table1
2> go
col1 col2
———– ——————–
100 val1
101 val2

(2 rows affected)

Now its working fine and setup is complicated!!

In Next post , I will try to setup the replication without rs_int and will post here.
Till then Happy Sybase Learning! Bye

Sybase Replication Setup using rs_init on Linux -1

April 13th, 2011 No comments

Sybase Replication Server Installation Steps:

1. Download the package and untar it.

2. Run the setup executable to unload the package in Sybase Rep Server Installation dir.

3. Building the Replication Server

4. Adding Primary & Replicate Databases.

5. Creating rep def, sub and testing.

Step 1 &2 :

[sybase@localhost Desktop]$ tar -xvf rs15lin32.tgz
./
README.SAMreport
archives/
archives/dsparser.jar
archives/jndi.jar
archives/ldap.jar
archives/log4j.jar
archives/providerutil.jar
archives/sylapi.jar
archives/libsylapij.so
media.inf
samreport/
samreport/SAMreport_SYBASE.lic
samreport/install_unix.htm
samreport/j2re-1_4_1_03-linux-i586.bin
samreport/samreport-3_6-i86_r6.bin
setup
suite.jar
JVM/
JVM/bin/
JVM/bin/classic/
JVM/bin/classic/libcore.so
JVM/bin/classic/libjvm.so
JVM/bin/JavaPluginControlPanel
………..
JVM/lib/psfont.properties
JVM/lib/security.jar
JVM/lib/xerces.properties
JVM/lib/xml.jar
JVM/.systemPrefs/
JVM/.systemPrefs/.systemRootModFile
JVM/.systemPrefs/.system.lock

[sybase@localhost Desktop]$ ./setup -console
InstallShield Wizard

Initializing InstallShield Wizard…

Searching for Java(tm) Virtual Machine…
……..
Running InstallShield Wizard…

——————————————————————————-
Welcome to the InstallShield Wizard for Replication Server Software, Version
15.0

The InstallShield Wizard will install Replication Server Software, Version 15.0
on your computer.
To continue, choose Next.

Press 1 for Next, 3 to Cancel or 4 to Redisplay [1] 1

——————————————————————————-
1) Argentina 2) Australia
3) Belgium(English) 4) Belgium(French)
5) Brazil 6) Canada
7) Denmark 8) Europe,Middle East, and Africa – General
9) France(English) 10) France(French)
11) Germany(English) 12) Germany(German)
13) Hong Kong 14) India
15) Italy(English) 16) Italy(Italy)
17) Japan 18) Korea
19) Malaysia 20) Mexico
21) Netherlands 22) New Zealand
23) Norway 24) People’s Republic of China(PRC)
25) Philippines 26) Singapore
27) Spain(English) 28) Spain(Spanish)
29) Sweden 30) Switzerland(English)
31) Switzerland(German) 32) Taiwan
33) Thailand 34) United Kingdom
35) United States of America 36) Any Other Locations

Please enter the number of the location you are installing. (1-37) [1] 35

LICENSE AGREEMENT

United States and Canada

IMPORTANT NOTICE: Read this License Agreement (“Agreement”) carefully before
using the enclosed Program. You may Use the Program acquired in the United
States and Canada only, in accordance with the following terms and conditions.
IF YOU DO NOT AGREE TO BE BOUND BY THESE TERMS, YOU MAY NOT USE THE PROGRAM. By
installing or using the Program in any way, You acknowledge that You have read,
understand and agree to the terms of this Agreement. If You do not agree with
these terms, promptly return the Program and package (and all other product
contents, including Documentation) with Your receipt or other proof of purchase
to the entity from which You obtained this product within 30 days and request a
refund. THIS IS A LICENSE AND NOT A SALE.

click the “I agree” button if you wish to install the program.

Press ENTER to read the text [Type q to quit] q

If you cannot read the agreement for the related location, you may not have the
fonts installed on your system to view the agreement properly. If you cannot
read this agreement, go to www.sybase.com/softwarelicenses and read it there
before agreeing.

I agree to the terms of the Sybase license for the install location
specified.(Y/N) [N]Y

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

Please wait…

——————————————————————————-
Please enter the directory where you would like to install the products or
press ENTER to accept the default.

Destination Directory [/home/sybase/15.5] /home/sybase/REP

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

——————————————————————————-
Choose the setup type that best suits your needs.

[X] 1 – Typical
The program will be installed with the suggested configuration.
Recommended for most users.

[ ] 2 – Full
The program will be installed with all the products and features.

[ ] 3 – Custom
The program will be installed with the features you choose.
Recommended for advanced users.

To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

——————————————————————————-
Replication Server Software, Version 15.0 will be installed in the following
location:

/home/sybase/REP

with the following features:

Sybase Servers
Replication Server
Connectivity
Common Connectivity Components
Language Modules for Replication Server
Language Modules – Connectivity
Shared
Sybase Software Asset Management
SySAM Network License Server
SySAM Agent Plugin
SySAM Network License Utilities
Replication Monitoring Services
Replication Server Administration Tools

Press ENTER to read the text [Type q to quit]

Sybase Central
Replication Manager Plugin

for a total size:

318.8 MB

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

Installing Replication Server Software, Version 15.0. Please wait…

|———–|———–|———–|————|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||

Creating uninstaller…

——————————————————————————-
The InstallShield Wizard has successfully installed Replication Server
Software, Version 15.0. Choose Next to continue the wizard.

Press 1 for Next, 3 to Cancel or 4 to Redisplay [1] 1

——————————————————————————-
Will licenses be obtained from the License Server?

1. Yes
2. No

Enter one of the options above : [1] 2

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

Please remember to download and install the license file after this
installation.

[OK]

——————————————————————————-
Please configure the Sybase Software Asset Management (SySAM) email alert
mechanism. When configured, specified receipients will receive email
notifications about SySAM events that may need administrator attention.

Do you want to configure email alerts?

1. Yes
2. No

Enter one of the options above : [1] 2

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

——————————————————————————-
Would you like to start a sample Replication Server?

[ ] 1 – Yes
[ ] 2 – No

To select an item enter its number, or 0 when you are finished: [0] 2

[ ] 1 – Yes
[X] 2 – No

To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

——————————————————————————-
The installation was successful.

Please check regularly for updates at http://www.sybase.com/downloads.

If you have not done so, please go to https://sybase.subscribenet.com to
obtain the Sybase software licenses.

Press 3 to Finish or 4 to Redisplay [3] 3
[sybase@localhost Desktop]$

Installing the jconnect for Sybase ASE.

March 24th, 2011 No comments

1. Install the Java Runtime environment or Install the JDK from www.java.com

2. Set the PATH environment variable for Java compiler and interpreter as

PATH=.:$PATH:”/bin”
export PATH

3. Download the jconnect(Sybase Driver) from Sybase and untar/unzip the package from http://www.sybase.com/products/middleware/jconnectforjdbc

4. You need to define two env variable CLASSPATH & JDBC_HOME

i)Set the JDBC_HOME as
[sybase@localhost jConnect-6_0]$ JDBC_HOME=”/home/sybase/15.5/jConnect-6_0″
[sybase@localhost jConnect-6_0]$ export JDBC_HOME
[sybase@localhost jConnect-6_0]$ echo $JDBC_HOME
/home/sybase/15.5/jConnect-6_0

ii) Set the CLASSPATH as
[sybase@localhost jConnect-6_0]$CLASSPATH=”$JDBC_HOME/classes”:”/home/sybase/15.5/jConnect-6_0/classes/jconn3.jar “:.
[sybase@localhost jConnect-6_0]$ export CLASSPATH
[sybase@localhost jConnect-6_0]$ echo $CLASSPATH
.:/home/sybase/15.5/jConnect-6_0/classes/jconn3.jar:/home/sybase/15.5/jConnect-6_0/classes

5. Install the Jconnect stored procs and tables :

For jConnect to function properly, you must install stored procedures and tables on the Adaptive Server Enterprise or ASA.

Go the $JDBC_HOME/classes
java IsqlApp -U sa -P -S jdbc:sybase:Tds:localhost.localdomain:5000 -I $JDBC_HOME/sp/sql_server15.0.sql -c go

6. If installation is successful, you need to test the installation

For testing you can check using following Applet : run from $JDBC_HOME
java sample2.SybSample Version
If everything is fine, you can get the jconnect version in output window.

7. Testing Java connectivity with Sybase ASE
[sybase@localhost ~]$ cat JdbcTest.java
import java.sql.* ;
public class JdbcTest
{
public static void main( String args[] )
{
try
{
Class.forName( “com.sybase.jdbc3.jdbc.SybDriver” ) ;
Connection conn = DriverManager.getConnection( “jdbc:sybase:Tds:localhost.localdomain:5000”, “sa”, “”) ;
Statement stmt = conn.createStatement() ;
ResultSet rs = stmt.executeQuery( “SELECT * FROM master..sysdatabases” ) ;
while( rs.next() )
System.out.println( rs.getString(1) ) ;
rs.close() ;
stmt.close() ;
conn.close() ;
}
catch( Exception e )
{ System.out.println( e ) ; }
}
}

i)Compile the code
[sybase@localhost ~]$ javac JdbcTest.java

ii)Test your code
[sybase@localhost ~]$ java JdbcTest
master
model
tempdb
sybsystemdb
sybsystemprocs
pubs2
sybsecurity