Project

General

Profile

« Previous | Next » 

Revision 1827

Renamed the upgrade sql files to more understandable names, updated the
build file to include some new targets for running these files, and
updated the installation docs to clarify which upgrade scripts need to
be run and when.

View differences:

metacatinstall.html
303 303
  </p>
304 304
  <p class="header"><h2>SQL Scripts</h2></p>
305 305
  <p>
306
   You now need to set up the table structure in your database.  Change to the
306
   You now need to set up the table structure in your database.  You can do
307
   either do this using the ant build system, or by manually running the
308
   scripts using a sql utility.
309
  </p>
310
  <p>To run the scripts using ant, type "ant installdb".
311
  </p>
312
  <p>To run the scripts manually, change to the
307 313
   metacat/src directory.  Then run you RDBMS's SQL utility.  In Oracle it is
308 314
   SQLPlus.  This tutorial assumes an Oracle database so this example is for
309 315
   SQLPlus.  Login as the oracle user that was set up for use with Metacat.
310 316
   At the SQLPlus prompt type the following: <pre><b>@xmltables.sql;</b></pre>
311
   You should see a bunch of output showing the creation of the Metacat table
317
  </p>
318
  <p>Either way, 
319
   you should see a bunch of output showing the creation of the Metacat table
312 320
   space. The first time you run this script you will get several errors at the 
313 321
   beginning saying that you cannot drop a table/index/trigger because it 
314 322
   does not exist.  This is normal.  Any other errors besides this need to be
315 323
   resolved before continuing. The script file name for PostgreSQL is 
316
   xmltalbes_postgres.sql and for Microsoft SQL server is xmltables-sqlserver.sql.
324
   xmltalbes_postgres.sql and for Microsoft SQL server is 
325
   xmltables-sqlserver.sql.
317 326
  </p>
318 327
  <p>
319 328
   If the script has run correctly you should be able to type 
......
336 345
     UPDATED                      NUMBER(1)
337 346
   </pre>
338 347
  </p>
348
  <p class="header"><h2>Upgrading SQL Scripts</h2></p>
349
  <p>
350
    If you have an existing metacat installation, you should not run the install
351
    script because it will replace all of the older tables with new, empty 
352
    copies of the tables.  Thus you would lose your data!  Instead, you can 
353
    run some upgrade scripts that will change the table structure as needed for
354
    the new version.  If you are skipping versions, run each upgrade script
355
    for the intermediate versions as well.  Currently the upgrade scripts are:
356
   </p>
357
    <ul>
358
      <li>upgrade-db-to-1.2.sql</li>
359
      <li>upgrade-db-to-1.3.sql</li>
360
    </ul>
361
   <p>
362
    So, if you had an existing metacat 1.0 installation and you were upgrading 
363
    to 1.3, you would need to run both upgrade-db-to-1.2.sql and 
364
    upgrade-db-to-1.3.sql. Howver, if you were starting from a Metacat 1.2.x
365
    installation, you would only need to run the 1.3 upgrade script.
366
   </p>
367
  </p>
339 368
</td>
340 369
</tr>
341 370
</table>

Also available in: Unified diff