title: SQL Server 2016 - Invalid object name 'hibernate_sequence'
body: <p>I have an image backup that I restore to the MS SQL server 2016.
  I have an entity that declares its id like that:</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @XmlID
  @XmlElement
  @XmlJavaTypeAdapter(IntToStringXmlAdapter.class)
  private Integer id;
  </code></pre>
  
  <p>when I save the entity I receive:</p>
  
  <pre><code>Hibernate: select next_val as id_val from hibernate_sequence with (updlock, rowlock) 2018-02-28 22:05:41.935 
  ERROR 18152 --- [nio-8080-exec-6] o.hibernate.id.enhanced.TableStructure   : could not read a hi value com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'hibernate_sequence'. 
  
  ...... 
  2018-02-28 22:05:41.942  WARN 18152 --- [nio-8080-exec-6] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 208, SQLState: S0002 
  
  2018-02-28 22:05:41.942 ERROR 18152 --- [nio-8080-exec-6] o.h.engine.jdbc.spi.SqlExceptionHelper   : Invalid object name 'hibernate_sequence'.
  </code></pre>
  
  <p>I have created by hand the sequence to the SQL server and I make sure that it exist through the SSMS.</p>
  
  <pre><code>CREATE SEQUENCE hibernate_sequence
   AS INTEGER
   START WITH 1
   INCREMENT BY 1
   MINVALUE 1
   MAXVALUE 99
   NO CYCLE; 
  </code></pre>
  
  <p>Despite of this I continue to the receive the previous error.</p>
  
  <p>Any ideas what I am doing wrong?</p>
  
  <p>Thank you in advance</p>