Liferay ist zum sechsten Mal in Folge ein Leader im Gartner Magic Quadrant. Hier mehr erfahren
« Zurück zu Configuring

Sybase Configuration

(Umgeleitet von Sybase configuration for Liferay)

Table of Contents [-]

    After installing Sybase, here are the steps to configuring the database for Liferay.

    • Turn on Sybase service

    • Login to database ( Sybase Central ) username="sa" password=""

    • Select server name
    • Open up databases folder
    • Right click on "master" database -> properties

    Within the "master" database tab click devices

    • Highlight the "master" database, and hit the properties button
    • Under "Space allocated" increase the size of you database -> hit apply and then OK

    • In the "master" database properties hit edit, and increase the "Total space allocation" to 100MB
    • Hit "OK" in the "master" database properties
    • Click the icon to add a database
    • Enter in the database name "lportal"

    • Hit next
    • Add the "master" database's log and data

    • Hit edit on log and increase the log size -> hit ok

    • Hit edit on data and increase the log size -> hit ok

    • Hit next until the database is added.

    Note: may need to select "override" to create the database

    • Right click on "lportal" database -> properties
    • Select options tab and click on "allow nulls by default" and "select into/bulkcopy/pllsort" -> hit ok

    In the command prompt type in the following to run the database create script

    isql -Usa -P -Dlportal -i D:\Projects\liferay\portal\trunk\sql\portal\portal-sybase.sql

    In your root.xml for tomcat, you'll want to change your database connection to use you Sybase database.

    <Resource name="jdbc/LiferayPool"
    	auth="Container"
            type="javax.sql.DataSource"
            driverClassName="net.sourceforge.jtds.jdbc.Driver"
    	url="jdbc:sybase:Tds:IP_Address_Of_Database:5000/lportal"
            username="USER"
            password="PASSWORD"
            maxActive="100"
            maxIdle="30"
            maxWait="10000"
    />
    • In your ext environment, set the following properties to use Sybase.

    In portal.properties or portal-ext.properties set:

    For 4.1.2 add:

    hibernate.dialect=org.hibernate.dialect.SybaseDialect
    custom.sql.function.isnull=ISNULL 
    

    For 4.2.1 add:

    hibernate.dialect=org.hibernate.dialect.Sybase11Dialect
    
    hibernate.jdbc.batch_size=0
    
    custom.sql.function.isnull=ISNULL(CONVERT(VARCHAR,?), '1') = '1'
    custom.sql.function.isnotnull=ISNULL(CONVERT(VARCHAR,?), '1') = '0'
    

    For 5.1

    jdbc.default.jndi.name=
    
    jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    jdbc.default.url=jdbc:jtds:sybase://[ip address]:5000/lportal
    jdbc.default.username=sa
    jdbc.default.password=
    
    hibernate.dialect=org.hibernate.dialect.SybaseDialect
    custom.sql.function.isnull=ISNULL 
    
    

    For 5.2

    jdbc.default.jndi.name=
    
    jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    jdbc.default.url=jdbc:jtds:sybase://[ip address]:5000/lportal
    jdbc.default.username=sa
    jdbc.default.password=
    
    
    
    • Copy your sybase drives to Tomcat.

    Example: Copy lib/development/jtds.jar to <TOMCAT_HOME>/common/lib/jtds.jar You may need to copy one or more jars into the <TOMCAT_HOME>/common/lib folder - jtds.jar, jconn3.jar , jconn2.jar

    0 Anhänge
    51876 Angesehen
    Durchschnitt (0 Stimmen)
    Die durchschnittliche Bewertung ist 0.0 von max. 5 Sternen.
    Kommentare
    Antworten im Thread Autor Datum
    Hi, I am using Sybase with Liferay and i was... Benjamin Lallement 18. August 2008 11:48
    Instructions have been followed but am still... Kevin Gower 8. Juli 2010 13:30
    The answer the problem is as follows. Install... Kevin Gower 14. Juli 2010 13:05
    Character set for Sybase must be "nocase" as... Kevin Gower 3. August 2010 00:35

    Hi,

    I am using Sybase with Liferay and i was stuck with the annoncement portlet because the part of the SQL query
    "com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFi­nder.countByHidden" :
    (AnnouncementsEntry.displayDate <= ? [$AND_OR_NULL_CHECK$])
    was crashing: "Syntax error during implicit conversion of VARCHAR value '1' to a DATETIME field."

    The solution is to modify the custom SQL function to:
    - custom.sql.function.isnull=ISNULL( CONVERT(VARCHAR,?) , '1') = '1'
    - custom.sql.function.isnotnull=ISNULL( CONVERT(VARCHAR,?) , '1') = '0'
    Gepostet am 18.08.08 11:48.
    Instructions have been followed but am still not able to login admin/admin.

    DB is created and User_ still has screen name "test" any tricks to get it going on ASE 15.02?
    Gepostet am 08.07.10 13:30 als Antwort auf Benjamin Lallement.
    The answer the problem is as follows.

    Install Sybase by creating liferay_data device and liferat_log device. 1GB and 300meg to start.

    Create the dataase and log

    Set DB to UTF8 before going any further. See Sybase manual on how to do this but you must do it. If you have a DB already and need to set it to UTF8 either bcp out everything then set it to UTF8 and bcp back in OR set it to UTF8 and then run dbcc, reindex, best down from Sybase Central on ALL tables

    Set your properties and root.xml as per above and up it will come.
    Gepostet am 14.07.10 13:05 als Antwort auf Kevin Gower.
    Character set for Sybase must be "nocase" as there is an issue with TMS (task portlet) row TasksEntryID. Use sp_configure to set for the appropriate character set ID
    Gepostet am 03.08.10 00:35 als Antwort auf Kevin Gower.