cancel
Showing results for 
Search instead for 
Did you mean: 

How can i change default alfresco database schema name.

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

In usual alfresco installation or setup, db schema is named alfresco only. I want to change it to say alfresco2.How can i do it?Which configuration files i need to change for this?

TIA.
7 REPLIES 7

sukumarpant
Champ in-the-making
Champ in-the-making
if u are using version3.2 then u can change standard database in the alfresco-global.properties (tomcat/shared/classes)

if u are using a older version, u have to edit the custom-repositories.properties file found in extension folder.

also after having edited the file u have to create a database with that same name so that alfresco can connect with it.

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

I am using alfresco 3.1.1 over JBoss 4.3.2 GA.I tried the way u informed, its working. Smiley Happy

Thanks.

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi,

I have two different schemas created (and old one "Schema-1" & fresh one "Schema-2") on the same database. Now I want to upgrade Alfresco to a newer version and wants it to connect to Schema-2. My database is SQL Server 2005. I set the default schema to Schema-2 using "hibernate.default_schema" property in alfresco-global.properties (my database config is the same as i just created a new schema in the same database). But the upgrade failed with the error "There is already an object named 'alf_applied_patch' in the database."

It looks like Alfresco scripts does not use the Schema name and because of which the upgrade was actually performed on Schema-1 where I had installed an earlier version of Alfresco.

I am not sure why "hibernate.default_schema" did not have any effect. Does it holds good only for Oracle?

Regards,
Jerry

mrogers
Star Contributor
Star Contributor
Yes hibernate.default_schema is a "special" setting for Oracle.

On 3.3 and MySQL you just set the db.name in your alfresco-global.properties.

unknown-user
Champ on-the-rise
Champ on-the-rise
Thanks for the prompt reply…

How is it with SQL Server? Is db.name used as the schema name in queries? I thought it is used only for getting the connection.

I have db.url property configured in alfresco-global.properties to jdbc:jtds:sqlserver://<db_host_name>:<port>/alfresco and the "db.name" property is commented. So, if I un-comment db.name and give "Schema-2" as the value, will Alfresco create the objects in Schema-2?

Can you please clarify?

Thanks

mrogers
Star Contributor
Star Contributor
Yes.   Put your db.name in place of "alfresco". 

Here's more information in the jtds FAQ.
http://jtds.sourceforge.net/faq.html#urlFormat

unknown-user
Champ on-the-rise
Champ on-the-rise
Thanks for the information.

Let me make sure I understand it correctly. Here is my setup.

–Database (name = 'alfresco')
——-Schema-1 (the default schema (i.e. dbo)) - This schema has Alfresco 3.1.1 installed in it
——-Schema-2 (a new schema that I created) - Planning to install Alfresco 3.3.1 in this.

Please note that in my setup, there is only one "database" but two different "Schemas" in it. Is this setup correct? If so, how will I point Alfresco to "Schema-2"? If its 2 different "databases" altogether, I know I can configure it through db.name property or through the db.url properties, but how will I tell Alfresco to connect to a specific schema in a database?

Or, Am I supposed to create a totaly NEW database for the upgrade?

Thanks