cancel
Showing results for 
Search instead for 
Did you mean: 

Community Edition 4.2 on MS SQL Server 2012

manifest0
Champ in-the-making
Champ in-the-making
Hi all,

For the past few weeks on and off I have been attempting to setup Alfresco against a MS SQL DB. I have succeeded in this thanks to <a herf = >this</a> amp file, patching a 4.0 WAR file. However, I'm looking at trying to get it working against v4.2 CE. The same amp file doesn't sufficiently patch the WAR file for 4.2, so I'm looking at converting the DB Create/Upgrade scripts from MySQL to MS SQL using a tool or if necessary, by hand.

So my question is: is converting the create/upgrade scripts between each version sufficient to run Alfresco, or are there other parts of the alfresco installation which frequently change version to version? Is this the best way to go about it? Is it even viable?
16 REPLIES 16

anavalente
Champ on-the-rise
Champ on-the-rise
Hello,

In order to have alfresco working with SQL Server 2012 I used the dbscripts of sql server included in a trial version of alfresco enterprise edition and just made some (no more than 5) alterations in a script file because one table was different but I think that was because I was using version 4.0 of alfresco CE.

Hello anavalente,

We are trying to adapta a current Enterprise 4.1.7 Enterprise Alfresco to run in a 4.2 Community version. We have already the database created (with the Enterprise edition) but can't manage to get our Community version to work with that SQL. It is connecting to the database, but then we find the communication problems. I guess that after you ran you scrpit file you also had to adapt several features.
For now we have changed the dialect to force it to be SQL dialect and copied the  contents of the "org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect" folder from the enterprise, but don't know how to continue (now we are getting ibatis errors) Do you have any clue?

Thanks in advance

Hello, I know it's a little outdated. can you please send me your script ??? I've been trying Alfresco 4.0.d for a few days with SQL Server 2014 but I can not do it. need your help

Hello, 

I am sorry for not answering all the questions asked.

I have a manual written in Portuguese written in 2014. I will translate the correct section and comment it here. However, I had the script files in my hard drive and it burned. 

1. Create an empty folder (C:/Alfresco for example), and inside that folder, create another folder called "alf_data" and another one called "keystore". Copy what is inside the keystore folder of the alfresco.war to this new folder with the same name.

2. In order to install Alfresco with SQL Server, copy the dbscripts with SQL Server to the folder that has the SQL scripts. (try installing the trial of the entreprise version, copy that folder and correct the scripts, comparing it to the mySQL scripts, it is easier that doing them all by hand - WEB-INF\classes\alfresco\ibatis\   and WEB-INF\classes\alfresco\dbscripts\)

3. Add to the folder “<tomcat_home>/conf/server.xml the connector to port 8443:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"

maxThreads="150" scheme="https" keystoreFile="<ALFRESCO_HOME>/alf_data/keystore/ssl.keystore" keystorePass="kT9X6oe68t" keystoreType="JCEKS"

secure="true" connectionTimeout="240000" truststoreFile="<ALFRESCO_HOME>/alf_data/keystore/ssl.truststore" truststorePass="kT9X6oe68t" truststoreType="JCEKS"

clientAuth="false" sslProtocol="TLS" />

4. 

Alter the connector od port  8080:

<Connector port="8080" protocol="HTTP/1.1" URIEncoding="UTF-8" connectionTimeout="20000" redirectPort="8443" maxHttpHeaderSize="32768"/>

Replace<ALFRESCO_HOME> by the correct one. 

5. Add a valve in context.xml:

<Valve className="org.apache.catalina.authenticator.SSLAuthenticator" securePagesWithPragma="false" />

 

6. Edit the file catalina.properties, in the same folder, puting “${catalina.base}/shared/classes after “shared.loader”.

Edit the file catalina.bat, adding in lines 302, 305, 309 e 312, after “CATALINA_OPS” the following:

-Xms1536m -Xmx1536m -XXSmiley TongueermSize=1024m -XX:MaxPermSize=1024m 

Place the .war files in  tomcat (webapps).

Edit the alfresco-global.properties file. (The database has to be empty with read and wirte permissions)

Run this in SQL Server:

ALTER DATABASE alfresco SET ALLOW_SNAPSHOT_ISOLATION ON; 

db.name=alfresco

db.username=alfresco

db.password=xxxxxxx

db.host=localhost

db.port=1433

db.driver=net.sourceforge.jtds.jdbc.Driver

db.url=jdbc:jtds:sqlserver://${db.host}:${db.port}/${db.name}

db.txn.isolation=4096 

Hibernate.dialect = org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

 

Place this file in  <TOMCAT_HOME>/shared/classes.

7. Look for the files  “contentModel.xml” and “share-form-config.xml” and correct the information. 

Example in my case:

dir.root=C:/Alfresco/alf_data

alfresco.context=alfresco

alfresco.host=127.0.0.1

alfresco.port=8080

alfresco.protocol=http

 

share.context=share

share.host=127.0.0.1

share.port=8080

share.protocol=http

 

 

### FTP Server Configuration ###

ftp.enabled=true

ftp.port=21

ftp.ipv6.enabled=false

### Initial admin password ###

alfresco_user_store.adminpassword=xxxxxxxxxx

 

### E-mail site invitation setting ###

notification.email.siteinvite=false

 

### File Protocol Root ###

protocols.rootPath=/${spaces.company_home.childname}/${spaces.sites.childname}

 

### License location ###

dir.license.external=C:/Alfresco

 

### BPM Engine ###

system.workflow.engine.jbpm.enabled=false

 

Hello,
I need to use "Alfresco" with "SqlServer". Could I get in contact with you? I need the scripts for "SQL Server"

Hello,

I cannot find the scripts. I did this in 2014. However, from what I recall,

I installed the trial version and then I searched for the scripts in the

ibatis folder.

After that, every time there was a database error in tomcat, I was able to

correct it, comparing the specific script to the one in MySQL.

Thank you,

Ana Valente

2018-06-16 23:33 GMT+01:00 alonsodiego <community@alfresco.com>:

Alfresco Community

<https://community.alfresco.com/?et=watches.email.thread>

Re: Community Edition 4.2 on MS SQL Server 2012

reply from Alonso Alonso

<https://community.alfresco.com/people/alonsodiego?et=watches.email.thread>

in Alfresco Content Services (ECM) - View the full discussion

<https://community.alfresco.com/message/833856-re-community-edition-42-on-ms-sql-server-2012?commentID=833856&et=watches.email.thread#comment-833856>

afaust
Legendary Innovator
Legendary Innovator

Using the scripts from the trial of the commercial version is almost guaranteed to constitute a breach of the license agreement / terms of conditions for the trial version. This should not be done or recommended unless you want to become liable to legal actions by Alfresco.