Project

General

Profile

1 4690 daigle
<!--
2
  *   '$RCSfile$'
3
  *     Purpose: web page describing how to manually run database scripts
4
  *   Copyright: 2008 Regents of the University of California and the
5
  *               National Center for Ecological Analysis and Synthesis
6
  *     Authors: Michael Daigle
7
  *
8
  *    '$Author: daigle $'
9
  *    '$Date: 2008-11-19 16:48:24 -0800 (Wed, 19 Nov 2008) $'
10
  *    '$Revision: 4597 $'
11
  *
12
  *
13
  -->
14
15
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.0//EN">
16
<html>
17
18
<head>
19
  <title>How to Manually Run Database Scripts</title>
20
  <link rel="stylesheet" type="text/css" href="./common.css">
21
  <link rel="stylesheet" type="text/css" href="./default.css">
22
</head>
23
24
<body>
25
26
<table class="tabledefault" width="100%">
27
<tr><td rowspan="2"><img src="./images/KNBLogo.gif"></td>
28
<td colspan="7">
29
<div class="title">How to Manually Run Database Scripts</div>
30
</td>
31
</tr>
32
<tr>
33
  <td><a href="/" class="toollink"> KNB Home </a></td>
34
  <td><a href="/data.html" class="toollink"> Data </a></td>
35
  <td><a href="/people.html" class="toollink"> People </a></td>
36
  <td><a href="/informatics" class="toollink"> Informatics </a></td>
37
  <td><a href="/biodiversity" class="toollink"> Biocomplexity </a></td>
38
  <td><a href="/education" class="toollink"> Education </a></td>
39
  <td><a href="/software" class="toollink"> Software </a></td>
40
</tr>
41
</table>
42
<hr>
43
44
<div class="header1">Table of Contents</div>
45
<div class="toc">
46
  <div class="toc1"><a href="#Overview">Overview</a></div>
47
  <div class="toc1"><a href="#Postgres">PostgreSQL</a></div>
48
    <div class="toc2"><a href="#Linux">Linux</a></div>
49
</div>
50
51
<a name="Overview"></a><div class="header1">Overview</div>
52
   <p>Sometimes it will be necessary to run a database script
53
    manually.  The following sections describe how.</p>
54
55
<a name="Postgres"></a><div class="header1">PostgreSQL</div>
56
  <a name="Linux"></a><div class="header2">Linux</div>
57
    <p>At the command line, you can run:</p>
58 4694 daigle
      <div class="code">psql -U metacat -W -h localhost metacat &lt; &lt;script-name&gt;</div>
59 4690 daigle
    <p>where &lt;script-name&gt; is the name of the script you want
60 4694 daigle
    to run.  This assumes that your database and username are metacat.
61
    You should adjust accordingly for different user or database names.</p>
62 4690 daigle
63
64
  </body>
65
</html>