title: Rename can't find sequence in Oracle SQL
body: <p>I would like to rename a sequence in my Oracle SQL database (let's call it <code>OLD_SEQUENCE</code>). Per the <a href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9019.htm" rel="nofollow">RENAME</a> documentation, I can use that command to rename a sequence:</p>
  
  <blockquote>
    <p>Use the <code>RENAME</code> statement to rename a table, view, sequence, or private synonym.</p>
  </blockquote>
  
  <p>So using this documentation, I tried to create the following command:</p>
  
  <pre><code>RENAME old_sequence TO new_sequence
  </code></pre>
  
  <p>but unfortunately, that produced the following SQL error:</p>
  
  <pre><code>Error executing SQL RENAME old_sequence TO new_sequence: 
  ORA-04043: object old_sequence does not exist
  </code></pre>
  
  <p>I confirmed that this is exactly how the sequence appears in the database, so I tried adding the owner</p>
  
  <pre><code>RENAME owner.old_sequence TO new_sequence
  </code></pre>
  
  <p>but that didn't work either</p>
  
  <pre><code>Error executing SQL RENAME owner.old_sequence TO new_sequence: 
  ORA-01765: specifying owner's name of the table is not allowed
  </code></pre>
  
  <p>I find it strange that the error here was that it thought it was a table rather than a sequence.</p>
  
  <p>I get the same result when I apply the owner name to both: </p>
  
  <pre><code>RENAME owner.old_sequence TO owner.new_sequence
  </code></pre>
  
  <p>So how can I solve this issue where rename can't find the sequence in Oracle SQL?</p>