title: Prevent Hibernate schema changes
body: <p>I am new to Hibernate and am having some issue with its configuration.  I am trying to setup a read-only connection to a preexisting Oracle database.  I do not want Hibernate to execute any DML/DDL and alter the database schema, yet every time I try deploying my project, this is the message I see:</p>
  
  <pre><code>INFO: updating schema
  SEVERE: Unsuccessful: create table WILLOEM.SAMPLE_INFO (SAMPLE_ID varchar2(255) not null, CELL_LINE varchar2(255), STUDY_ID varchar2(255), primary key (SAMPLE_ID))
  SEVERE: ORA-00955: name is already used by an existing object
  </code></pre>
  
  <p>No damage is being done here, since the table creation failed, but I don't want to create a situation where data can be lost.  How can I configure Hibernate to act in a read-only manner?  Can I prevent statement execution completely, without adding a new Oracle user that lacks the privileges?</p>
  
  <p>Here is my current Hibernate configuration:</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName"&gt;&lt;value&gt;oracle.jdbc.OracleDriver&lt;/value&gt;&lt;/property&gt;
      &lt;property name="url"&gt;&lt;value&gt;jdbc:oracle:thin:@source.db.somewhere.com:1524:WILLOEM&lt;/value&gt;&lt;/property&gt;
      &lt;property name="username"&gt;&lt;value&gt;username&lt;/value&gt;&lt;/property&gt;
      &lt;property name="password"&gt;&lt;value&gt;password&lt;/value&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
      &lt;property name="dataSource"&gt;&lt;ref local="dataSource"/&gt;&lt;/property&gt;
      &lt;property name="packagesToScan" value="com.willoem.project.hibernate" /&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.OracleDialect&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory"&gt;&lt;ref local="sessionFactory"/&gt;&lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>