Skip to content

Commit

Permalink
adds console command to LOAD SCRIPT - documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrank committed Mar 28, 2017
1 parent e9f6cd9 commit 7467525
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions console/Console-Command-Load-Script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
search:
keywords: ['console', 'command', 'load', 'record', 'LOAD SCRIPT']
---

# Console - `LOAD SCRIPT` (from 2.2.18)

Loads a sql script from the given path and executes it.

**Syntax**

```sql
LOAD SCRIPT <script path>
```

**Example**

- Load a script from an absolute path:

<pre>
orientdb> <code class="lang-sql userinput">LOAD SCRIPT /path/to/scripts/data.osql</code>

</pre>


- Launch the console in batch mode and load script to a remote database:

<pre>
$ <code class="lang-sh userinput">$ORIENTDB_HOME/bin/console.sh "CONNECT REMOTE:localhost/demo;LOAD SCRIPT /path/to/scripts/data.osql"</code>
</pre>

>For more information on other commands, see [Console Commands](Console-Commands.md).
1 change: 1 addition & 0 deletions console/Console-Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ OrientDB implements a number of SQL statements and commands that are available t
|[`LIST DATABASES`](Console-Command-List-Databases.md)|List the available databases|
|[`LIST CONNECTIONS`](Console-Command-List-Connections.md)|List the available connections|
|[`LOAD RECORD`](Console-Command-Load-Record.md)|Loads a record in memory and set it as the current one|
|[`LOAD SCRIPT`](Console-Command-Load-Script.md)|Loads and executes a sql script|
|[`PROFILER`](Console-Command-Profiler.md)|Controls the [Profiler](../tuning/Profiler.md)|
|[`PROPERTIES`](Console-Command-Properties.md)|Returns all the configured properties|
|`pwd`|Display current path|
Expand Down

0 comments on commit 7467525

Please sign in to comment.