http://goo.gl/EmKxy0

Archive

Archive for the ‘Installation’ Category

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

ASE Installation on Linux : Using Fedora Vmware Machine on Windows

March 5th, 2011 1 comment

1. Download the free vmware player from the vmware website: www.vmware.com/download/player/

2. Install the vmplayer which you have downloaded above.

3. Download the virtual appliance for Fedora 10 OS. http://www.vmware.com/appliances/directory/59370

4. Unzip your vitual appliance.

5. After unzip, you need to start Fedora.10.vmx file. It will start your guest OS.

For Sybase Installation:

6. Crete the sybase user and adduser in sybase group.

7. For installation of ASE on Linux requires 64MB shared memory. So modify the /etc/sysctl.conf  with kernal.shmmax euqls to more than 64 MB.

8. Run  sysctl -p /etc/sysctl.conf  to take place the kernel level setting.

9. Now login with sybase account, down load or copy the ASE software from Sybase website and start as below.

10. Please see the below slide show for further installation:

[slideshow]