OmniSQL

OmniSQL Support

Guides for every feature, and how to reach us.

Contact Support

Email us and include your device, iOS version and the OmniSQL version shown in Settings.

Email Support
Add A Connection

Steps

  1. Open Connections and tap Add Connection.
  2. Enter a name, the server address and the port. The usual port is 1433.
  3. Enter the database name, or leave it empty to use the login's default database.
  4. Choose the sign-in method and enter the username and password.
  5. Tap Test Connection, then Save.

Where The Password Is Kept

The password is stored in the iPhone Keychain on this device only. With Require Face ID on, the Keychain releases it only after Face ID or the device passcode.

Approve A Server Certificate

When This Appears

Many SQL Servers use a certificate they issued to themselves. The first time you connect, OmniSQL shows that certificate's fingerprint and asks you to approve it.

Steps

  1. Compare the fingerprint with the one from your server administrator.
  2. Tap Approve if they match.
  3. From then on, OmniSQL connects only if the server presents that same certificate.

If The Certificate Changes

The connection is stopped and nothing is sent. Check with your administrator before approving a new certificate.

Run A Query

Steps

  1. Open a connection, then open Query.
  2. Type the statement. Names from your database are offered as you type.
  3. Tap Run Query.
  4. Tap the plus button to keep several queries open at once. Touch and hold a query to close it.

Rows Per Query

Settings controls how many rows one run keeps. A Row Limit Reached label means the server had more rows than were kept.

Library: Saved, History And Files

Saved Queries

  1. In Query, tap Library.
  2. Enter a name and tap Save Query to keep the current query.
  3. Tap a saved query to open it in a new query. Touch and hold one to delete it.

History

Every statement you run is listed with its time, rows and duration. The last 200 are kept on this device. Tap Clear History to remove them.

Files

  1. Choose Files, enter a name and tap Save File to keep the current query as a .sql file.
  2. Tap Import File to bring in a .sql file from the Files app.
  3. Saved files also appear in the Files app under OmniSQL.
Statement Templates And Suggestions

Templates

  1. In Query, tap Statement Templates.
  2. Choose a template, then choose the table it is for.
  3. Tap Open In Query. The statement is written with that table's real columns.

Statements For One Table

In Schema, open a table to find Select Top 100, Insert Statement, Update Statement, Delete Statement and View Create Statement. Insert, Update and Delete open in Query already filled in. An Update or Delete is written to match no rows until you set its WHERE values.

Suggestions

While you type, tables, views and columns whose names start with what you typed are offered above the keyboard. Tap one to place it in the query.

Try Changes Before Saving Them

Steps

  1. Type one INSERT, UPDATE, DELETE or MERGE statement in Query.
  2. Tap Try Changes.
  3. Read the rows affected and, for an UPDATE or DELETE on one table, the values before and after.
  4. Tap Apply to run it for real, or Discard.

What Try Changes Does

The statement runs inside a transaction that is always undone, so nothing is kept. Statements that could end that transaction or run other code, such as EXEC, are not tried.

Sort And Edit In The Grid

Sort

Tap a column name to sort by it. Tap again to reverse, and once more to return to the order the server sent.

Edit

  1. Open a table from Schema with Select Top 100 and run it.
  2. Tap a row, then tap the value to change.
  3. Type the new value and press Done. Leave it empty for NULL.
  4. Read the statement under the grid, then tap Save or Discard.
Find Anywhere

Steps

  1. In Schema, tap Find Anywhere.
  2. Type a value and choose Contains, Starts With or Exact.
  3. Tap Find. Each table is read once.
  4. Tap a match to open its rows in Query.

Large Databases

Every table is read in full, which takes time on large tables. Tap Stop at any point; matches found so far stay listed.

ER Diagram

Steps

  1. In Schema, tap ER Diagram.
  2. Drag a table to move it. Tap Auto Layout to arrange them again.
  3. Tap a table to see what it is related to.
  4. Tap View Columns to list every column of that table and its type.
  5. Tap Export Diagram to save it as a picture.
New Table And Drop

New Table

  1. In Schema, tap New Table.
  2. Name the table and add its columns. Mark the key column with Key.
  3. Read the statement, then tap Create Table.

Drop

  1. Open the table or view in Schema and tap Drop.
  2. Type its name to confirm, then tap Drop. This cannot be undone.
Switch Database

Steps

  1. In Schema, tap the database name.
  2. Tap the database to use. Schema reloads for it.
  3. Turn on Show System Databases to list master, model, msdb and tempdb.
Server Health

Steps

  1. Open a connection, then tap Server Health on its details.
  2. Overview shows sessions, blocking, database sizes and overdue backups.
  3. Tap Export Report for CSV, Excel or PDF.

Overdue Backups

A database is overdue when its last full backup is older than the Overdue After choice on the Backups list.

Jobs

See Job Status

  1. Open a connection, then tap Jobs on its details.
  2. Each job shows its last run and whether it succeeded, failed, is running or is disabled.
  3. Tap a job for its message, next run and Run Now.

Create A Job

  1. Tap New Job.
  2. Enter a name, the statement and the database it runs in.
  3. Choose Once, Daily, Weekly or Monthly and the time, in the server's own time.
  4. Tap Create Job.

Report

  1. Tap View Report on a job.
  2. Choose 30 Days, 6 Months or 1 Year.
  3. Tap Export Report for CSV, Excel or PDF with the chart.

Requirements

Jobs need SQL Server Agent, which is not part of the Express edition, and a login allowed to read the msdb database.

Chart A Result

Steps

  1. Run a query that returns a name column and a number column.
  2. In Results, choose Chart.
  3. Pick the Label and Value columns. The chart shows the four largest values and each one's share.
Export Results

Steps

  1. In Results, tap Export.
  2. Choose CSV, Excel, PDF, JSON or SQL Insert.
  3. Choose what to include: column headers, the chart and the query text.
  4. Tap Export, then choose where to send or save the file.

What Each Format Holds

Excel and PDF can include the chart and the query text. CSV, JSON and SQL Insert hold the rows only. Copy places the rows on the clipboard instead of making a file.

Edit Or Delete A Row

Steps

  1. Open Schema, choose a table and tap Select Top 100.
  2. Tap Run Query, then tap the row you want in Results.
  3. Tap Edit Row and change the values. The exact statement is shown before anything is saved.
  4. Tap Save Changes or Delete Row.

Safeguards

Edit Row is offered for tables that have a primary key. A change is kept only if it affects exactly one row; otherwise it is undone. Leave a field empty to set it to NULL.

Browse The Schema

Steps

  1. Open a connection, then open Schema.
  2. Choose Tables, Views, Procedures or Functions.
  3. Tap an object to see its columns or parameters.
  4. Use Search to find a table or a column by name. Tap Refresh after the database changes.
Read-Only Mode And Confirmations

Read-Only Mode

With Read-Only Mode on, only statements that read data are sent. Anything that could change data is stopped on this device, and Edit Row is not offered.

Confirm Before Changing Data

With this on, OmniSQL asks before running a statement that can change data and before saving or deleting a row.

App Lock

Steps

  1. Open Settings and tap App Lock.
  2. Turn on Lock OmniSQL. Your device checks you once to confirm.
  3. Choose how long the app may be out of view before it locks again.
  4. When the app is locked, tap the unlock button, or use your device passcode.

What It Uses

App Lock uses Face ID or Touch ID, whichever your device has, with the device passcode as a fallback. A device with no passcode cannot use App Lock.

What It Covers

The lock screen covers the whole app, and the app's contents are hidden in the app switcher while App Lock is on.

Face ID And Saved Sign-Ins

On New Connections

The switch in Settings sets whether a new connection starts with this protection on.

On One Connection

Each connection has its own switch. With it on, the saved password is released only after Face ID, Touch ID or the device passcode.

Sample Database

Steps

  1. On Connections, tap Sample Database.
  2. Tap Open Query. No server, network or sign-in is needed.
  3. Use Query, Results, Charts, Export, Schema, Edit Row, Try Changes and Find Anywhere as you would on a server.
  4. Tap Reset Sample Data to put everything back as it was.

Where It Lives

The sample is kept in memory on your device. Changes last until you reset it, open another connection or close the app.

What Is Different

The sample is not a SQL Server. Server Health and Jobs do not apply to it, and statements that rely on features only SQL Server has will not run there.

Hide It

Turn off Show Sample Database in Settings to remove it from Connections.

Legal And Open Source Licenses

Steps

  1. Open Settings and tap Legal.
  2. Tap Privacy Policy, Terms Of Use or Open Source Licenses.
  3. In Open Source Licenses, search for a component and tap it to read its license.

No Guides Found