<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: More than one Alfresco schema was found when querying the database metadata in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143251#M38057</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;thanks for your reply. Here is the db config from alfresco-global.properties, sensitive data are omitted:&lt;/P&gt;&lt;PRE&gt;db.driver=com.mysql.cj.jdbc.Driver
db.username=&amp;lt;db_username&amp;gt;
db.password=&amp;lt;db_password&amp;gt;
db.name=&amp;lt;db_name&amp;gt;
db.url=jdbc:mysql://&amp;lt;db_server_host&amp;gt;/&amp;lt;db_name&amp;gt;?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false
db.pool.max=275
db.pool.validate.query=SELECT 1
db.schema.update=true
hibernate.default_schema=&amp;lt;db_name&amp;gt;&lt;/PRE&gt;&lt;P&gt;Not sure if it helps, but Alfresco currently runs in read-only mode (server.allowWrite=false)&lt;/P&gt;&lt;P&gt;As for the schema details, the database is MySQL 5.6.20, it contains multiple schemas. User configured in alfresco-global.properties has access to two of them, one of them is &amp;lt;db_name&amp;gt; and it's the one I'm trying to connect to. The &amp;lt;db_name&amp;gt; already contains tables following tables filled with data:&lt;/P&gt;&lt;PRE&gt;+-----------------------------+
| Tables_in_&amp;lt;db_name&amp;gt;      |
+-----------------------------+
| act_evt_log                 |
| act_ge_bytearray            |
| act_ge_property             |
| act_hi_actinst              |
| act_hi_attachment           |
| act_hi_comment              |
| act_hi_detail               |
| act_hi_identitylink         |
| act_hi_procinst             |
| act_hi_taskinst             |
| act_hi_varinst              |
| act_id_group                |
| act_id_info                 |
| act_id_membership           |
| act_id_user                 |
| act_procdef_info            |
| act_re_deployment           |
| act_re_model                |
| act_re_procdef              |
| act_ru_event_subscr         |
| act_ru_execution            |
| act_ru_identitylink         |
| act_ru_job                  |
| act_ru_task                 |
| act_ru_variable             |
| alf_access_control_entry    |
| alf_access_control_list     |
| alf_ace_context             |
| alf_acl_change_set          |
| alf_acl_member              |
| alf_activity_feed           |
| alf_activity_feed_control   |
| alf_activity_post           |
| alf_applied_patch           |
| alf_audit_app               |
| alf_audit_entry             |
| alf_audit_model             |
| alf_auth_status             |
| alf_authority               |
| alf_authority_alias         |
| alf_child_assoc             |
| alf_content_data            |
| alf_content_url             |
| alf_content_url_encryption  |
| alf_encoding                |
| alf_locale                  |
| alf_lock                    |
| alf_lock_resource           |
| alf_mimetype                |
| alf_namespace               |
| alf_node                    |
| alf_node_aspects            |
| alf_node_assoc              |
| alf_node_properties         |
| alf_permission              |
| alf_prop_class              |
| alf_prop_date_value         |
| alf_prop_double_value       |
| alf_prop_link               |
| alf_prop_root               |
| alf_prop_serializable_value |
| alf_prop_string_value       |
| alf_prop_unique_ctx         |
| alf_prop_value              |
| alf_qname                   |
| alf_server                  |
| alf_store                   |
| alf_subscriptions           |
| alf_tenant                  |
| alf_transaction             |
| alf_usage_delta             |
+-----------------------------+&lt;/PRE&gt;&lt;P&gt;All of the tables have lower-case names. When I tried to run Alfresco against empty DB, it created tables with upper-case names. Not sure if that's is related to my issue or not.&lt;/P&gt;&lt;P&gt;Database user &amp;lt;db_username&amp;gt; has all privileges for &amp;lt;db_name&amp;gt;:&lt;/P&gt;&lt;PRE&gt;GRANT ALL PRIVILEGES ON `&amp;lt;db_name&amp;gt;`.* TO '&amp;lt;db_username&amp;gt;'@'%'   &lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2023 15:48:13 GMT</pubDate>
    <dc:creator>cajova_houba</dc:creator>
    <dc:date>2023-03-20T15:48:13Z</dc:date>
    <item>
      <title>More than one Alfresco schema was found when querying the database metadata</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143249#M38055</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm tryting to connect Alfresco Community 5.2.e to existing MySQL instance (the instance already has tables and data). However, Alfresco fails to start with following error:&lt;/P&gt;&lt;PRE&gt;org.alfresco.error.AlfrescoRuntimeException: 02150000 
More than one Alfresco schema was found when querying the database metadata.
   Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.&lt;/PRE&gt;&lt;P&gt;The mysql instance really contains multiple DBs, each of them used by other applications. However, name of the database Alfresco is supposed to connect to is given in alfresco-global.properties.&lt;/P&gt;&lt;P&gt;What I've tried so far:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;add hibernate.default_schema to tomcat/shared/classes/alfresco-global.properties&lt;/LI&gt;&lt;LI&gt;add hibernate.default_schema to tomcat/shared/classes/custom-hibernate-dialect.properties&lt;/LI&gt;&lt;LI&gt;add hibernate.default_schema to tomcat/webapps/alfresco/WEB-INF/classes/custom-hibernate-dialect.properties&lt;/LI&gt;&lt;LI&gt;connect to empty DB&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Attempts 1. to 3. resulted in same error. Attempt 4. worked fine, but I need to connect to existing DB with data.&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;has anyone any idea how to fix this?&lt;/LI&gt;&lt;LI&gt;why does Alfresco thinks there are multiple schemas, when being explicitly told to use one particular database in db.name and db.url properties?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any help is appreciated, thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 17:42:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143249#M38055</guid>
      <dc:creator>cajova_houba</dc:creator>
      <dc:date>2023-03-15T17:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: More than one Alfresco schema was found when querying the database metadata</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143250#M38056</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I faced the same issue while upgrading Alfresco 5.0 instance with MS SQL server&amp;nbsp; . Well , I was able to resolve this issue by turning on the snapshot isolation mode by below command .&lt;/P&gt;&lt;P&gt;ALTER DATABASE &amp;lt;DBNAME&amp;gt; SET ALLOW_SNAPSHOT_ISOLATION ON;&lt;/P&gt;&lt;P&gt;Please check your MYSQL DB config as per the below Url :&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/content-services/5.2/config/databases/#configuring-the-mysql-database" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/5.2/config/databases/#configuring-the-mysql-database&lt;/A&gt;&lt;/P&gt;&lt;P&gt;( Ensure user must have specified permissions and might be there is some Tables name uppercase issue as per the below Link :&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/content-services/5.2/config/databases/#configuring-the-mysql-database" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/5.2/config/databases/#configuring-the-mysql-database&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Meanwhile please help in sharing the mysql DB config in global.properties file and your schema Details please .&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 05:21:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143250#M38056</guid>
      <dc:creator>ash_saxena10</dc:creator>
      <dc:date>2023-03-17T05:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: More than one Alfresco schema was found when querying the database metadata</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143251#M38057</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;thanks for your reply. Here is the db config from alfresco-global.properties, sensitive data are omitted:&lt;/P&gt;&lt;PRE&gt;db.driver=com.mysql.cj.jdbc.Driver
db.username=&amp;lt;db_username&amp;gt;
db.password=&amp;lt;db_password&amp;gt;
db.name=&amp;lt;db_name&amp;gt;
db.url=jdbc:mysql://&amp;lt;db_server_host&amp;gt;/&amp;lt;db_name&amp;gt;?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false
db.pool.max=275
db.pool.validate.query=SELECT 1
db.schema.update=true
hibernate.default_schema=&amp;lt;db_name&amp;gt;&lt;/PRE&gt;&lt;P&gt;Not sure if it helps, but Alfresco currently runs in read-only mode (server.allowWrite=false)&lt;/P&gt;&lt;P&gt;As for the schema details, the database is MySQL 5.6.20, it contains multiple schemas. User configured in alfresco-global.properties has access to two of them, one of them is &amp;lt;db_name&amp;gt; and it's the one I'm trying to connect to. The &amp;lt;db_name&amp;gt; already contains tables following tables filled with data:&lt;/P&gt;&lt;PRE&gt;+-----------------------------+
| Tables_in_&amp;lt;db_name&amp;gt;      |
+-----------------------------+
| act_evt_log                 |
| act_ge_bytearray            |
| act_ge_property             |
| act_hi_actinst              |
| act_hi_attachment           |
| act_hi_comment              |
| act_hi_detail               |
| act_hi_identitylink         |
| act_hi_procinst             |
| act_hi_taskinst             |
| act_hi_varinst              |
| act_id_group                |
| act_id_info                 |
| act_id_membership           |
| act_id_user                 |
| act_procdef_info            |
| act_re_deployment           |
| act_re_model                |
| act_re_procdef              |
| act_ru_event_subscr         |
| act_ru_execution            |
| act_ru_identitylink         |
| act_ru_job                  |
| act_ru_task                 |
| act_ru_variable             |
| alf_access_control_entry    |
| alf_access_control_list     |
| alf_ace_context             |
| alf_acl_change_set          |
| alf_acl_member              |
| alf_activity_feed           |
| alf_activity_feed_control   |
| alf_activity_post           |
| alf_applied_patch           |
| alf_audit_app               |
| alf_audit_entry             |
| alf_audit_model             |
| alf_auth_status             |
| alf_authority               |
| alf_authority_alias         |
| alf_child_assoc             |
| alf_content_data            |
| alf_content_url             |
| alf_content_url_encryption  |
| alf_encoding                |
| alf_locale                  |
| alf_lock                    |
| alf_lock_resource           |
| alf_mimetype                |
| alf_namespace               |
| alf_node                    |
| alf_node_aspects            |
| alf_node_assoc              |
| alf_node_properties         |
| alf_permission              |
| alf_prop_class              |
| alf_prop_date_value         |
| alf_prop_double_value       |
| alf_prop_link               |
| alf_prop_root               |
| alf_prop_serializable_value |
| alf_prop_string_value       |
| alf_prop_unique_ctx         |
| alf_prop_value              |
| alf_qname                   |
| alf_server                  |
| alf_store                   |
| alf_subscriptions           |
| alf_tenant                  |
| alf_transaction             |
| alf_usage_delta             |
+-----------------------------+&lt;/PRE&gt;&lt;P&gt;All of the tables have lower-case names. When I tried to run Alfresco against empty DB, it created tables with upper-case names. Not sure if that's is related to my issue or not.&lt;/P&gt;&lt;P&gt;Database user &amp;lt;db_username&amp;gt; has all privileges for &amp;lt;db_name&amp;gt;:&lt;/P&gt;&lt;PRE&gt;GRANT ALL PRIVILEGES ON `&amp;lt;db_name&amp;gt;`.* TO '&amp;lt;db_username&amp;gt;'@'%'   &lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 15:48:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143251#M38057</guid>
      <dc:creator>cajova_houba</dc:creator>
      <dc:date>2023-03-20T15:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: More than one Alfresco schema was found when querying the database metadata</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143252#M38058</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Below are my observations that you may check :&lt;/P&gt;&lt;P&gt;a.) Alfresco 5.2.e version trying to connect with compatible MYSQL database , more important correct version of mysql connector needs to be placed at alfresco/tomcat/lib location . Refer below link :&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/content-services/5.2/support/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/content-services/5.2/support/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;b.) If your schema is at lower version and you are upgrading the schema to 5.2.e then you have to remove that read-only property and set the repository to write mode .&lt;/P&gt;&lt;P&gt;Hope this resolves your problem , if not post your findings .&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 07:59:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143252#M38058</guid>
      <dc:creator>ash_saxena10</dc:creator>
      <dc:date>2023-03-21T07:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: More than one Alfresco schema was found when querying the database metadata</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143253#M38059</link>
      <description>&lt;P&gt;The problem was fixed by downgrading the mysql connector from " mysql-connector-j-8.0.32" to "mysql-connector-java-5.1.39". Thank you so much for your assistance!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 11:22:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/more-than-one-alfresco-schema-was-found-when-querying-the/m-p/143253#M38059</guid>
      <dc:creator>cajova_houba</dc:creator>
      <dc:date>2023-03-22T11:22:02Z</dc:date>
    </item>
  </channel>
</rss>

