Appboard/old/configuration database/example sybase
Revision as of 19:04, 25 November 2013 by imported>David.moore
This section describes the tasks that you must perform to use SQL Anywhere with enPortal:
Downloading the Sybase JDBC Driver
After you have installed enPortal, you must download a JDBC driver that will enable enPortal to establish a connection to your Sybase database.
To install the JDBC driver:
- Access the Sybase JDBC driver files at the following location: http://www.sybase.com/products/informationmanagement/softwaredeveloperkit/jconnect
- Download the jConnect zip file to your local filesystem.
- Locate the file jconn3.jar within the jConnect zip file.
- Extract the file jconn3.jar and place it in the folder PORTAL_HOME/classes-custom/
Installing Sybase SQL Anywhere on Windows
To install Sybase SQL Anywhere on Windows systems:
- Copy or unzip the Sybase installation files to a temporary folder.
- Go the temporary folder where the installation files were unzipped and run setup.exe. The Welcome window opens. Click Next.
- After reading the license agreement terms, click Yes to proceed with the installation.
- On the Select Components window, select only the following components:
- Under the Databases node, select Adaptive Server Anywhere for Windows.
- Under the Synchronization node, select SQL Remote for Adaptive Server Anywhere.
- Click Next. The Choose SQL Anywhere 8 Location window opens.
- Specify the directory where SQLAnywhere 8 should be installed and click Next. The Choose Shared Components Location window opens.
- Specify the directory where shared components should be installed and click Next. The Select Program Folder window opens.
- Click Next unless you want to change the name of the program folder.
- On the Server License window, enter the appropriate details.
- The Start Copying Files window opens. Review your prior selections. Click Next if all items are correct or Back to change any information.
- Click Finish on the next window that opens. The installation process begins. You will need to reboot your computer after the installation process is complete and before you proceed to the next stage.
- Create a Sybase data archive file as outlined in the next section, Creating a Database.
- Place the data archive file in a directory under the main Sybase directory, for example: sybase home directory/SYBSsa8/
Creating a Database
To create a Sybase SQL database:
- Launch Sybase Central 4.0. In Windows, this is launched from the Start menu by selecting Programs→SQL Anywhere 8→Sybase Central.
- On the Sybase Central screen, select Tools→Adaptive Server Anywhere 8→Create Database.
- The Choose a Connection window opens. Select Connection created by a local engine and click Next.
- The Create an Adaptive Server Anywhere Database window opens. Click the Browse button to display the Choose File dialog box. Navigate to the directory where you would like to create the database (the typical location is Sybase\SQLAnywhere) and then type the name. It is recommended that you use portal as the database name. Click Open and the dialog box closes.
- On the main window, click Next. The Choose the Transaction Log Options window displays. Keep the default values and click Next.
- The Mirror the Transaction Log window opens. Accept the default values and click Next.
- The Java in the Database window is displayed. Ensure that both check boxes are checked. Click Next.
- The Choose the Database Attributes window opens. Check the Case sensitivity for all names and values and Create SYSCOLUMNS and SYSINDEXES views check boxes. Click Next.
- The Which Page Size do you Want the Database to use window appears. Keep the default values and click Next.
- The Which Collation Sequence do you Want the Database to use window appears. If internationalization is required, click the Use the following supplied collation radio button, and then select the UTF8 collation.
- Click Finish. A database is created in the directory specified, with the parameters set. You are returned to the main Sybase Central screen.
= Creating a Service Pointing to the Database
To create a Windows service that points to the Sybase SQL database:
- Launch Sybase Central 4.0. In Windows, this is launched from the Start menu by selecting Programs→SQL Anywhere 8→Sybase Central.
- In the left pane of the Sybase Central screen, expand the node Adaptive Server Anywhere 7 and then select Services.
- In the right pane, double-click Add Service. The Create New Service window opens. Click Next.
- The Choose Service Type window opens. Select Network Database Server from the list box and click Next.
- The Choose Name and Startup window opens. Type SQLAnywhere in the field and select Automatic. Click Next.
- The Choose Path Name window opens. Keep the default values and click Next.
- The Specify Parameters window opens. On the first line, enter: –n database where database is the value you specified in Creating a Database.
- On the same line, enter -x "tcpip(ServerPort=port_number)". This is optional and typically used when more than one database service is created.
- On the next line, enter the full path (including the filename) of the database file you specified in Creating a Database. Click Next.
- The Choose Account window opens. Select the Local system account option. Click Next.
- The Choose Options window opens. Ensure that Start service when created is unchecked. Click Next.
- The Ready to create new Service window opens. Click Finish. You are returned to the main Sybase Central screen
- On the Sybase Central screen, right-click SQLAnywhere to display the pop-up menu and then select Start to start the service.