Databases: PostgreSQL, MySQL, SQL Server, Oracle Database and MongoDB
How to connect your own databases for read-only questions. Each person signs in with their own database login, so the database's own grants decide what they see.
Status: Available. Built on each database's documented behaviour, and validated with your database during onboarding.
| Source | Kind | Covers |
|---|---|---|
| SQL database | database |
PostgreSQL (including Amazon RDS, Aurora, Azure and Cloud SQL), MySQL and MariaDB, SQL Server and Azure SQL, and Oracle Database 12.1 or later (including Oracle Autonomous Database and Amazon RDS for Oracle). The admin picks the engine. |
| MongoDB | mongodb |
MongoDB, including MongoDB Atlas. |
Everything here is read-only: propose_change refuses changes to database sources.
At a glance
| Connects through | Sign-in | Network | Status | First test question | |
|---|---|---|---|---|---|
| SQL databases | The database's own network protocol, always over TLS | Personal sign-in | Allow SourceLace's IP addresses on the database's port | Available | "Which tables can I read in database:sales?" |
| MongoDB | MongoDB's own network protocol, always over TLS | Personal sign-in | Allow SourceLace's IP addresses on the database's port | Available | "Which collections can I read in mongodb:sales?" |
Add each source with the usual steps. The network answers are explained in What your network needs. If the first test question fails, the error message tells you what to fix: look it up under When something goes wrong below.
How sign-in works
Databases have no "Sign in with..." page, so each person types their own database username and password into a sign-in form served by SourceLace. There is no shared SourceLace login to your database.
- The sign-in link works once, for 10 minutes, and stops after three wrong passwords.
- SourceLace keeps the password encrypted with your organization's own key, uses it only for that person's requests, and never logs it, shows it, or puts it in the audit trail.
- If the password changes later, SourceLace asks the person to connect again.
1. For your database administrator
Your database administrator does this once per database, before your SourceLace admin adds the source. It takes about 30 minutes. Every database needs the same four things, and the sections below give the exact steps for each one:
- One read-only login per person. SourceLace never uses a shared login: each person signs in with their own, so the database's grants decide what they see. Narrow the grants as far as you like (some schemas, tables or collections).
- TLS on. Every connection is encrypted, and SourceLace checks the database's certificate.
- A public address that lets only SourceLace in: a host name reachable from the internet, with a firewall that allows SourceLace's outbound IP addresses on the database's port and nothing else. Ask support@sourcelace.com for the current list of addresses.
- The values your SourceLace admin enters, which the steps below tell you where to find: the engine, the host name, the port, the database name (for Oracle, the service name), and, if the certificate was signed by a private certificate authority, that CA's certificate.
Then check that it worked.
What your admin does in PostgreSQL
Who: a PostgreSQL superuser, or a role with CREATEROLE that owns the tables (or may grant on them). On Amazon RDS and Aurora, the master user; on Azure Database for PostgreSQL, the server admin; on Google Cloud SQL, a user with cloudsqlsuperuser.
-
Create a group role that may read the tables people should see (once), connected to the
salesdatabase:CREATE ROLE sourcelace_readers NOLOGIN; GRANT CONNECT ON DATABASE sales TO sourcelace_readers; GRANT USAGE ON SCHEMA public TO sourcelace_readers; GRANT SELECT ON ALL TABLES IN SCHEMA public TO sourcelace_readers; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO sourcelace_readers;Repeat the
USAGEandSELECTlines for each other schema people should read. -
Create a login for each person, in the group, and make their sessions read-only:
CREATE ROLE ann_lee LOGIN PASSWORD 'a long password' IN ROLE sourcelace_readers; ALTER ROLE ann_lee SET default_transaction_read_only = on;Give each person their username and password yourself. Existing logins work as they are.
-
Turn TLS on and require it.
- Your own server: set
ssl = oninpostgresql.confwith a certificate for the server's host name, and inpg_hba.confadd ahostsslline (nothost) for each SourceLace IP address, such ashostssl sales +sourcelace_readers <SourceLace address>/32 scram-sha-256. Then reload:SELECT pg_reload_conf();. - Amazon RDS and Aurora: TLS is on. To require it, set
rds.force_sslto1in the DB parameter group (the default from PostgreSQL 15). - Azure Database for PostgreSQL and Google Cloud SQL: TLS is on and required by default (in Cloud SQL, Connections → Security → Allow only SSL connections).
- Your own server: set
-
Let SourceLace in: see Let SourceLace in. The port is usually 5432.
-
Copy back these values: engine
postgres, the host name (on RDS, the Endpoint under Connectivity & security), the port, the database name, and the CA certificate if it is private (see TLS).
Check it yourself: from a computer that is allowed in, run psql "host=db.corvanta.com dbname=sales user=ann_lee sslmode=verify-full sslrootcert=ca.pem" and then \dt: it lists the tables. PostgreSQL's own guide: PostgreSQL documentation (CREATE ROLE, The pg_hba.conf File, Secure TCP/IP Connections with SSL).
What your admin does in MySQL and MariaDB
Who: a user with CREATE USER, CREATE ROLE and GRANT OPTION, such as root. On Amazon RDS and Aurora, the master user; on Azure Database for MySQL, the server admin. Roles need MySQL 8.0 or MariaDB 10.1 or later.
-
Create a role that may read (once):
CREATE ROLE 'sourcelace_reader'; GRANT SELECT, SHOW VIEW ON sales.* TO 'sourcelace_reader'; -
Create a user for each person, who must use TLS, with the role on by default:
CREATE USER 'ann_lee'@'%' IDENTIFIED BY 'a long password' REQUIRE SSL; GRANT 'sourcelace_reader' TO 'ann_lee'@'%'; SET DEFAULT ROLE 'sourcelace_reader' TO 'ann_lee'@'%';On MariaDB the last line is
SET DEFAULT ROLE sourcelace_reader FOR 'ann_lee'@'%';. The'%'means any host: the firewall (step 4) is what limits who may connect. If you write a host instead, it must match the address SourceLace connects from, or sign-in fails with error 1045. -
Require TLS.
- Your own server:
SET PERSIST require_secure_transport = ON;with a certificate for the server's host name (ssl_cert,ssl_key). - Amazon RDS and Aurora: set
require_secure_transportto1in the DB parameter group. - Azure Database for MySQL: on by default (server parameter
require_secure_transport).
- Your own server:
-
Let SourceLace in: see Let SourceLace in. The port is usually 3306.
-
Copy back: engine
mysql(also for MariaDB), the host name, the port, the database name, and the CA certificate if it is private.
Check it yourself: mysql --host=db.corvanta.com --user=ann_lee -p --ssl-mode=VERIFY_IDENTITY --ssl-ca=ca.pem sales -e "SHOW TABLES" lists the tables. The vendors' guides: MySQL documentation (CREATE USER, Using Encrypted Connections) and MariaDB documentation.
What your admin does in SQL Server and Azure SQL
Who: a member of sysadmin or securityadmin (to create logins) who is also db_owner of the database. On Azure SQL Database, the server admin or the Microsoft Entra admin; in the Azure portal, the role SQL Server Contributor (or Contributor) on the server to change its firewall.
Before you start (your own SQL Server only): SQL Server authentication must be on, because SourceLace signs in with a username and password. In SQL Server Management Studio, right-click the server → Properties → Security, choose SQL Server and Windows Authentication mode, click OK, and restart the SQL Server service. Without it, every sign-in fails with error 18456.
-
Create a login and a read-only user for each person:
CREATE LOGIN ann_lee WITH PASSWORD = 'a long password'; USE Sales; CREATE USER ann_lee FOR LOGIN ann_lee; ALTER ROLE db_datareader ADD MEMBER ann_lee;On Azure SQL Database, connect to the database itself (not
master) and create a contained user instead:CREATE USER ann_lee WITH PASSWORD = 'a long password';thenALTER ROLE db_datareader ADD MEMBER ann_lee;. Microsoft Entra sign-in to the database is not supported yet.db_datareaderreads every table; to narrow it,GRANT SELECT ON SCHEMA::sales TO ann_leeinstead. -
Turn on encryption with a certificate SourceLace can check (your own SQL Server). In SQL Server Configuration Manager → SQL Server Network Configuration, right-click Protocols for <instance> → Properties. On Certificate, choose a certificate issued for the server's host name (such as
db.corvanta.com) by a public or company CA; on Flags, set Force Encryption to Yes. Restart the SQL Server service. The self-signed certificate SQL Server makes for itself cannot be checked, so sign-in would fail with a certificate error. Azure SQL Database always encrypts, with a certificate SourceLace trusts: nothing to do. -
Let SourceLace in: see Let SourceLace in. On your own server, also check Protocols for <instance> → TCP/IP is Enabled and listens on port 1433.
-
Copy back: engine
sqlserver(also for Azure SQL), the host name (on Azure, the Server name on the database's Overview, such ascorvanta.database.windows.net), the port, the database name, and the CA certificate if your company's CA signed the certificate.
Check it yourself: sqlcmd -S db.corvanta.com -d Sales -U ann_lee -N -Q "SELECT TOP 5 name FROM sys.tables" lists tables. Microsoft's guides: SQL Server documentation (Create a login, Configure SQL Server Database Engine for encrypting connections) and Azure SQL documentation.
What your admin does in Oracle Database
Who: a DBA with CREATE USER, CREATE ROLE and GRANT ANY ROLE, and the owner of the tables (or GRANT ANY OBJECT PRIVILEGE) to grant SELECT. On Oracle Autonomous Database, the ADMIN user, and in the Oracle Cloud console a user who may manage the database (to change its network settings). On Amazon RDS for Oracle, the master user.
Oracle signs people in as database users, and a user's name is also its schema.
-
Create a role that may read (once):
CREATE ROLE sourcelace_reader; GRANT SELECT ON sales.orders TO sourcelace_reader; GRANT SELECT ON sales.customers TO sourcelace_reader; -- (or, on Oracle 23ai, every table of a schema at once: GRANT SELECT ANY TABLE ON SCHEMA sales TO sourcelace_reader;) -
Create a user for each person:
CREATE USER ann_lee IDENTIFIED BY "a long password"; GRANT CREATE SESSION TO ann_lee; GRANT sourcelace_reader TO ann_lee;Existing named users work as they are: SourceLace reads with whatever they can already see. Grant
SELECT(orREAD), notEXECUTE: a function that changes data inside its own transaction (PRAGMA AUTONOMOUS_TRANSACTION) could get round Oracle's read-only transaction, so only the database's grants stop that. -
Turn TLS on.
- Your own database: add a
TCPSendpoint tolistener.ora(often on port 2484), with a wallet holding a server certificate for the host name, and restart the listener (lsnrctl stopthenlsnrctl start). Oracle's Database Security Guide ("Configuring Transport Layer Security Encryption") has the steps. - Oracle Autonomous Database: in the Oracle Cloud console, open the database, and under Network, set Mutual TLS (mTLS) authentication to Not required (TLS without a wallet), and add SourceLace's IP addresses to the Access control list. The port is 1522.
- Amazon RDS for Oracle: add the SSL option to the instance's option group (port 2484).
- Your own database: add a
-
Let SourceLace in: see Let SourceLace in.
-
Copy back: engine
oracle, the host name, the TLS port, and the service name (not the SID):SELECT sys_context('USERENV', 'SERVICE_NAME') FROM dualshows it, such asSALESPDBorsales.corvanta.com. On Autonomous Database, the host and service name are in Database connection, in a TLS connection string. Add the CA certificate if it is private.
No Oracle Client software is needed, and Oracle Database 12.1 or later works. Check it yourself: sign in as the person in SQL Developer (or SQLcl) over TCPS and run SELECT table_name FROM all_tables WHERE owner = 'SALES'. Oracle's guide: Oracle Database documentation.
What your admin does in MongoDB and MongoDB Atlas
Who: on MongoDB Atlas, a user with the Project Owner role on the project (to add database users and IP access list entries). On your own MongoDB, a user with userAdmin on the database (or userAdminAnyDatabase).
MongoDB Atlas checklist. Most first connections that fail miss one of these:
- DNS seed list is Yes (Atlas addresses only work that way; SourceLace refuses to save an Atlas address without it).
- Users are defined in is
admin, or empty: Atlas keeps every database user inadmin, and SourceLace uses it for Atlas addresses. - Atlas Network Access lists SourceLace's outbound IP addresses.
- People sign in with a database user from Atlas Database Access that has
readon the database, not with the email and password they use for the Atlas website.
On MongoDB Atlas:
- Add a database user for each person. In the project, open Security → Database Access (in newer Atlas, Database & Network Access → Database Users) and click Add New Database User. Choose Password, enter the person's username and a password, and under Database User Privileges choose Specific Privileges → Add Built In Role → read, with the database name, such as
sales. Click Add User. - Allow SourceLace's addresses. Open Security → Network Access → IP Access List and click Add IP Address. Add each SourceLace address on its own, ending in
/32, with the comment "SourceLace". Never choose Allow Access from Anywhere (the whole internet). - Copy back. On the cluster, click Connect → Drivers. The connection string looks like
mongodb+srv://cluster0.abcde.mongodb.net/. Your SourceLace admin enters the hostcluster0.abcde.mongodb.net, DNS seed list Yes (srv:true), Users are defined inadminor empty (Atlas always keeps its database users inadmin), and the database name. Atlas certificates are trusted already: no CA certificate. - For agents that start when data changes, the agent owner also needs the
changeStreamaction: in Database Access → Custom Roles → Add New Custom Role, add the actionsfindandchangeStreamon the database (or collection), and give the role to that user.
On your own MongoDB:
-
Make sure sign-in is on:
security.authorization: enabledinmongod.conf. -
Create a user for each person, in the database they read:
use sales db.createUser({ user: "ann_lee", pwd: passwordPrompt(), roles: [{ role: "read", db: "sales" }] })A user created this way is defined in
sales, which is SourceLace's default. If you create users inadmininstead, your SourceLace admin sets Users are defined in toadmin. -
Require TLS:
net.tls.mode: requireTLSwithnet.tls.certificateKeyFileholding a certificate for the server's host name. Restartmongod. -
Let SourceLace in: see Let SourceLace in. The port is usually 27017.
-
Copy back: the host name, the port, the database name, where users are defined, and the CA certificate if it is private.
Check it yourself: mongosh "mongodb+srv://cluster0.abcde.mongodb.net/sales" --username ann_lee --authenticationDatabase admin, then show collections. MongoDB's guides: MongoDB documentation and MongoDB Atlas documentation.
Let SourceLace in
SourceLace connects from its own servers to your database, so the database must:
- Have an address reachable from the internet, such as
db.corvanta.comor an RDS endpoint. SourceLace's cloud refuses private addresses (10.x, 172.16–31.x, 192.168.x, localhost), so that no organization can point it at another's internal systems. A database on a private network can be reached only by AI agents on a SourceLace Runner inside that network (Enterprise plan only, on request). - Allow SourceLace's outbound IP addresses on the database's port, and nothing else from the internet. Ask support@sourcelace.com for the current list. Where to do it:
- Amazon RDS and Aurora: in the RDS console, open the database. Under Connectivity & security, Publicly accessible must be Yes (change it with Modify). Click the VPC security group, then Inbound rules → Edit inbound rules → Add rule: type PostgreSQL, MySQL/Aurora, MSSQL or Oracle-RDS, source Custom, one rule per SourceLace address with
/32. Save. Needs an AWS user who may modify the database and its security groups. Guide: Amazon RDS documentation. - Azure SQL Database, Azure Database for PostgreSQL or MySQL: in the Azure portal, open the server, then Networking (for Azure SQL, Security → Networking). Set Public network access to Selected networks, add a firewall rule per SourceLace address (start and end the same address), and save. Leave Allow Azure services and resources to access this server off: it lets in all of Azure, not only SourceLace.
- Google Cloud SQL: in the Google Cloud console, open the instance, then Connections → Networking. Tick Public IP, and under Authorized networks click Add a network for each SourceLace address with
/32. Save. Needs the Cloud SQL Admin role. Guide: Cloud SQL documentation. - MongoDB Atlas: Security → Network Access → IP Access List (see above).
- Your own data center: in the firewall in front of the database, allow inbound TCP from each SourceLace address to the database's port only.
- Amazon RDS and Aurora: in the RDS console, open the database. Under Connectivity & security, Publicly accessible must be Yes (change it with Modify). Click the VPC security group, then Inbound rules → Edit inbound rules → Add rule: type PostgreSQL, MySQL/Aurora, MSSQL or Oracle-RDS, source Custom, one rule per SourceLace address with
- Listen on the port your SourceLace admin enters (usually 5432, 3306, 1433, 1521 or 27017; an Oracle TLS listener is often on 2484, and Oracle Autonomous Database on 1522).
TLS (encryption)
Every connection is encrypted, and SourceLace checks the database's certificate and that it was issued for the host name your admin entered. Make sure:
- TLS is on in the database (the steps for each database are above). Managed services have it on already.
- The certificate is valid for the host name people connect to. If you use a different name (a CNAME), add it to the certificate.
- If the certificate was signed by a private certificate authority (Amazon RDS, some Azure servers, or your company's own CA), give your SourceLace admin that CA's certificate (a PEM file starting
-----BEGIN CERTIFICATE-----). For Amazon RDS this is the regional certificate bundle from the Amazon RDS documentation ("Using SSL/TLS to encrypt a connection to a DB instance").
Check that it worked
- Your database administrator signs in once with one person's login, from a computer that is allowed in, with the command under Check it yourself for your database. It lists tables or collections.
- Your SourceLace admin adds the source (below), and that person clicks Connect on My connections, signs in on SourceLace's form, and asks the first test question from At a glance. They see the tables or collections their login can read.
- If it fails, the message says which part: "could not be reached" is the address or firewall, "could not be reached securely" is TLS, and "did not accept that username and password" is the login. Look it up under When something goes wrong.
2. For your SourceLace admin
Add the source on Connections → Add a source.
SQL database options
Kind: SQL database (database).
| Option | Type | Default | Example | What it is |
|---|---|---|---|---|
engine |
One of postgres, mysql, sqlserver, oracle |
(required) | postgres |
The kind of database. MariaDB uses mysql; Azure SQL uses sqlserver; Oracle Database uses oracle. |
host |
Host name | (required) | db.corvanta.com |
The server's name only: no https://, no port. |
port |
Number | 5432, 3306, 1433 or 1521, by engine | 5433 |
The port. For Oracle, the port of the database's TLS listener (often 2484; Oracle Autonomous Database: 1522, which SourceLace asks for). |
database |
Text | (required) | sales |
The database to read. For Oracle, the service name, such as SALESPDB (not the SID). |
ca_cert |
PEM certificate | (none) | -----BEGIN CERTIFICATE----- ... |
The certificate of a private CA (see TLS above). It may be pasted on one line. |
totals_at_source |
on or off |
on |
off |
MySQL, SQL Server and PostgreSQL only. on: SourceLace may ask the database to work out totals; off: it reads the rows and adds them up itself (same answer, slower on big tables). Use off if the database or a column ignores capitals (a case-insensitive setting). See Totals worked out by your system. |
text_compare |
strict or native |
strict |
native |
MySQL and SQL Server only. strict (empty): "West", "WEST" and "west" are different. native: text columns whose rule SourceLace knows are compared and grouped the way the database does, so totals match the database's own reports. See Compare text the way your database does. |
tls |
verify or off |
verify |
verify |
off is accepted only for a database on the same computer as SourceLace, so in practice always verify. |
MongoDB options
Kind: MongoDB (mongodb).
| Option | Type | Default | Example | What it is |
|---|---|---|---|---|
host |
Host name | (required) | mongo.corvanta.com or cluster0.abcde.mongodb.net |
The server's name, or the Atlas cluster address. |
port |
Number | 27017 |
27018 |
The port (not used with srv). |
database |
Text | (required) | sales |
The database to read. |
auth_source |
Text | admin for an Atlas address (….mongodb.net), otherwise the database option |
admin |
The database where users are defined. Always admin on MongoDB Atlas. |
srv |
Yes (true) or No |
No | Yes | DNS seed list: Yes for a mongodb+srv:// address, as MongoDB Atlas uses. An Atlas cluster address cannot be saved without it. |
ca_cert, tls |
As for SQL databases. |
Then each person clicks Connect and signs in on SourceLace's form with their own username and password.
Agents can also start when a document in a collection changes: see Start when a MongoDB document changes. That needs a replica set or a sharded cluster (MongoDB Atlas always is one), and the find and changeStream actions for the agent owner's login.
3. What people can do, and how it stays read-only
- SQL databases take
sql: oneSELECT(orWITH ... SELECT) in the engine's own dialect, on tables namedschema.tableassearch_schemalists them (SELECT TOP 10 ...on SQL Server,FETCH FIRST 10 ROWS ONLYon Oracle,LIMIT 10elsewhere). On Oracle, a table name without a schema is looked up in the person's own schema, and names written without quotes are matched in upper case, as Oracle stores them.get_recordworks on tables with a single-column primary key. - MongoDB takes
mongodb: one JSON object, either a find, such as{"collection": "orders", "filter": {"status": "open"}, "sort": {"placed": -1}, "limit": 50}, or an aggregation pipeline, such as{"collection": "orders", "aggregate": [{"$match": {"status": "open"}}, {"$group": {"_id": "$region", "orders": {"$sum": 1}}}]}. Ids and dates use MongoDB Extended JSON, such as{"$oid": "..."}and{"$date": "2026-10-01T00:00:00Z"}.
Checked before anything is sent:
- SQL: a single statement starting with
SELECTorWITH; nothing that writes (INSERT,UPDATE,DELETE,MERGE,CREATE,DROP,ALTER,TRUNCATE,GRANT,SELECT ... INTO,COPY,EXEC,CALLand so on), nothing that locks rows (FOR UPDATE,FOR SHARE), no system procedures (xp_...,sp_...), and no functions that reach outside the query or change state (such aspg_sleep,pg_read_file,dblink,nextval,LOAD_FILE,OPENROWSET,WAITFOR). On Oracle, also no PL/SQL packages (DBMS_...,UTL_...such asUTL_HTTP,OWA_...,HTP), no URI types (such asHTTPURITYPE), nothing in theSYSschema, no database links (orders@other_db) and no functions defined inside the query (WITH FUNCTION). - MongoDB: only read stages (
$match,$project,$group,$sort,$limit,$skip,$unwind,$lookup,$facetand similar).$outand$merge(which write) are refused, and so are$where,$functionand$accumulator(which run code) anywhere in the query.system.collections are off limits.
Enforced on the database too:
| Database | Read-only | Time limit |
|---|---|---|
| PostgreSQL | A READ ONLY transaction, always rolled back |
statement_timeout |
| MySQL and MariaDB | START TRANSACTION READ ONLY, rolled back |
max_execution_time (MariaDB: max_statement_time) |
| SQL Server | A transaction that is always rolled back, with ApplicationIntent=ReadOnly. SQL Server has no read-only transaction, so the login's db_datareader role matters most. |
Query timeout |
| Oracle Database | SET TRANSACTION READ ONLY first, then the query, then always a rollback |
call_timeout on the connection |
| MongoDB | MongoDB has no read-only session, so the read role and the checks above do this work. Reads prefer a secondary. |
maxTimeMS |
Each query may run for 60 seconds by default, or less if your admin set a shorter query time, and keeps up to 2,000 rows as an ordinary result, 50 shown at a time (a larger answer, up to 250,000 rows, is kept whole in SourceLace's short-lived encrypted engine). Results are held for at most 30 minutes and never written to a database (see How long things are kept). Each request opens its own connection and closes it straight after. Schema comes from the database's own catalog (for Oracle, ALL_TABLES, ALL_VIEWS, ALL_TAB_COLUMNS and ALL_CONSTRAINTS, leaving out the schemas Oracle itself maintains), which lists only what the person can read; for MongoDB, describe_object samples 20 documents and reports field names and types only.
When something goes wrong
| What you see | What it means | What to do |
|---|---|---|
| "Set the option 'host': the database server's name, such as db.corvanta.com." (or 'database') | The option is empty. | Fill it in from what your database administrator copied back. |
| "Set the option 'engine' to one of: ..." | The engine is missing or misspelled. | Choose the database engine. MariaDB is mysql; Azure SQL is sqlserver. |
| "'...' is not a host name. Give only the name, such as db.corvanta.com." | The host has https://, a port or a path. |
Keep only the name, such as db.corvanta.com. The port goes in port. |
| "'...' is not a port number." or "'...' is not a database name." | The option has something other than a number or a plain name. | Use the number (such as 5432) or the name (such as sales). |
| "The option 'tls' is 'verify' (the default) or 'off'." or "TLS can only be turned off for a database on the same computer as SourceLace..." | tls has another value, or off for a database elsewhere. |
Remove the tls option: every connection is encrypted. |
| "The option 'ca_cert' must be a PEM certificate (-----BEGIN CERTIFICATE-----...)." or "... is not a valid PEM certificate." | The CA certificate is incomplete or not a certificate. | Paste the whole CA certificate, including the BEGIN and END lines. |
| "... is a private network address, and this SourceLace server only connects to databases on the internet..." | The host name leads to a private address (10.x, 172.16–31.x, 192.168.x). | Use the database's public address, with SourceLace's IP addresses allowed (see Let SourceLace in). |
| "... is a cloud metadata address, which SourceLace never connects to." or "... leads to ..., which SourceLace never connects to." | The host name leads to an address SourceLace never connects to. | Use the database's real public host name. |
| "... could not be reached. Check the host and port, and that the database allows connections from SourceLace's IP addresses." | SourceLace could not open a connection: usually the firewall does not allow SourceLace's addresses, or the host or port is wrong. On MySQL, also when the server does not offer TLS. | Check host and port, and that each SourceLace address is allowed (security group inbound rule, Azure firewall rule, Cloud SQL authorized network, Atlas IP access list). On RDS, check Publicly accessible is Yes. |
| "... could not be reached (the name ... could not be found)." | The host name does not exist. | Check host for typing mistakes, and copy it again from the database's console. |
| "... could not be reached (the database does not offer TLS)." | PostgreSQL answered, but with TLS off. | Turn TLS on (ssl = on) and restart PostgreSQL. |
| "... could not be reached (the database does not know that service name)." | Oracle's listener does not know the database value (Oracle error ORA-12514 or ORA-12505). |
Use the service name, not the SID (see the Oracle steps). |
| "cluster0.xxxx.mongodb.net is a MongoDB Atlas address: an admin sets this source's DNS seed list to Yes (Atlas addresses only work that way), and Users are defined in to admin." (before October 2026: "... could not be reached (the name cluster0.xxxx.mongodb.net could not be found).") | A MongoDB Atlas address with DNS seed list off. Atlas cluster names only have DNS seed list (SRV) records, so the name alone is not found. SourceLace now says so when the source is saved. | Set DNS seed list to Yes. |
| "MongoDB Atlas did not accept that username and password. Use a database user from Atlas Database Access that has read on this database, not your Atlas website login." (before October 2026: "... refused the query: bad auth : Authentication failed.") | Atlas refused the sign-in (Atlas error 8000): the person typed the email they use for the Atlas website instead of a database user, or the password is wrong. (Before October 2026 it was also shown when Users are defined in was empty; SourceLace now uses admin for Atlas addresses.) |
Sign in with a database user from Atlas Database Access that has read on the database. Your Atlas Project Owner can reset its password there. |
| "MongoDB Atlas keeps every database user in admin: set Users are defined in to admin." | Users are defined in names another database for an Atlas address. | Set it to admin, or leave it empty. |
| "... could not be reached (the name ... has no MongoDB servers listed)." | DNS seed list is on, but the host is not a mongodb+srv address. |
For Atlas, copy the host from Connect → Drivers. For your own MongoDB, turn DNS seed list off. |
| "... does not let SourceLace's IP address in: your database administrator adds a hostssl line for SourceLace's addresses to pg_hba.conf and reloads the configuration." | No pg_hba.conf line lets this login in from that address (PostgreSQL error 28000). The password was never checked. |
Follow the PostgreSQL steps above, step 3: one hostssl line per address, then reload. |
| "... could not be reached: Azure SQL's firewall does not allow SourceLace's IP address. In the Azure portal, open the server, Networking, and add a firewall rule for each SourceLace address." | Azure SQL's server firewall refused SourceLace (Azure error 40615). | Add a firewall rule per SourceLace address (see Let SourceLace in). |
| "... could not be reached securely: Amazon RDS certificates are signed by Amazon's own certificate authority. An admin sets the source's CA certificate to the regional bundle from the Amazon RDS documentation." | An Amazon RDS or Aurora database with no CA certificate on the source. | Paste the regional bundle for the database's region into CA certificate. |
| "... could not be reached securely: the server uses SQL Server's own self-signed certificate, which cannot be checked. Your database administrator installs a certificate for ... (SQL Server Configuration Manager, Protocols, Certificate)." | SQL Server encrypts with the certificate it makes for itself, which nobody can check. | Install a certificate for the server's host name (SQL Server step 2). |
| "Oracle Autonomous Database listens for TLS on port 1522: set Port to 1522." | An Autonomous Database address (….oraclecloud.com) with Port empty. |
Set Port to 1522. |
| "... could not be reached securely: its TLS certificate could not be checked. An admin can set the source's ca_cert option..." | The database's certificate was signed by a private CA, or was issued for another host name, or (SQL Server) is the self-signed one. | Set ca_cert to the CA's certificate, or connect with the host name on the certificate. On SQL Server, install a certificate for the host name (see the SQL Server steps). |
| "The database did not accept that username and password. Use your own database login." | The database refused the sign-in. Usually a wrong username or password; also a locked account, an expired password, SQL Server authentication switched off, a MySQL user whose host part does not match, or (MongoDB) the wrong Users are defined in. | Check the username and password. Your database administrator checks the database's own log for the reason (codes below). On Atlas, set Users are defined in to admin. |
| "The database refused that username and password too many times. Ask for a new sign-in link to try again." | Three wrong passwords ended the sign-in link. | Click Connect again for a new link, and check the login with your database administrator first. |
| "This sign-in link has expired or was already used. Ask for a new one." | Sign-in links work once, for 10 minutes. | Click Connect again. |
| "... no longer accepts your database username or password." | It worked before: the password changed, expired or the account was locked or removed. | Connect again with the current password. If it still fails, your database administrator unlocks the account or resets the password. |
| "... refused the query: permission denied for table ..." (PostgreSQL), "... SELECT command denied to user ..." (MySQL), "... The SELECT permission was denied on the object ..." (SQL Server), "... ORA-00942: table or view does not exist" or "... ORA-01031: insufficient privileges" (Oracle), "... not authorized on ... to execute command ..." (MongoDB) | The person's login has no grant on that table or collection. | If they should read it, your database administrator grants it (GRANT SELECT, or the read role in MongoDB). |
| "... refused the query: ..." (another reason) | The database's own reason follows, such as an unknown column. | The AI usually fixes the query itself. |
| "SourceLace: the database could not run this statement. Check the names and the comparison values, and ask again." | On a source with data protection rules, row rules or access by group, the database could not run the question. Its own reason is not shown, because it could quote protected data. | The AI usually asks again another way. If it keeps happening, check the names and values in the question, and that the sign-in may read the tables. |
| "... did not finish the query in time. Narrow it down and try again." | The query ran past its 30-second limit. | Add filters or a smaller limit. |
| "... did not answer in time. Try again shortly." | The database did not answer at all within the time limit. | Try again. If it keeps happening, your database administrator checks the server's load. |
| "There is no table or view ... that you can read. Call search_schema to find it." or "'...' is not a table name. Use schema.table..." | The name is wrong, or the login cannot see it. | Check the name (schema.table); the login may lack a grant. |
| "There is no row in ... with ... that you can read." or "There is no document in ... with _id ... that you can read." | No record has that id, or the person cannot read it. | Check the id, or search with query. |
| "... has no single-column primary key. Use query with a WHERE clause instead." | get_record needs a single-column key. |
Use query instead of get_record. |
| "'...' is not a collection you can read. Call search_schema to list them." | The collection name is wrong, or the login's read role does not cover it. |
Check the name and the login's role. |
| "... sources are not available on SourceLace yet..." | This database engine is not available yet. | Contact support. |
Codes in the database's own log
The messages above do not show the database's own error code. When a sign-in or query fails, your database administrator finds the reason in the database's log by these codes:
| Database | Code | What it means | What to do |
|---|---|---|---|
| PostgreSQL | 28P01 |
Wrong password. | Reset the password, or the person types the current one. |
| PostgreSQL | 28000 (no pg_hba.conf entry) |
No hostssl line lets this user in from SourceLace's address. |
Add the hostssl line and reload (PostgreSQL step 3). |
| PostgreSQL | 42501 |
No grant on the table. | GRANT SELECT (PostgreSQL step 1). |
| MySQL, MariaDB | 1045 |
Wrong password, or no user whose host part matches SourceLace's address. | Reset the password, or use '%' as the host (MySQL step 2). |
| MySQL | 1862 |
The password expired. | ALTER USER ... IDENTIFIED BY '...' with a new password. |
| MySQL, MariaDB | 1142, 1044 |
No grant on the table or database. | GRANT SELECT to the role (MySQL step 1). |
| SQL Server | 18456 |
Login failed. The log's State says why: 2 or 5 no such login, 8 wrong password, 38 or 40 no access to the database, 58 SQL Server authentication is off. | Create the login or user (step 1), reset the password, or turn on SQL Server authentication (Before you start). |
| SQL Server | 18486 |
The login is locked after too many wrong passwords. | ALTER LOGIN ann_lee WITH PASSWORD = '...' UNLOCK. |
| SQL Server | 18487, 18488 |
The password expired, or must be changed. | Set a new password with ALTER LOGIN. |
| SQL Server | 229 |
No permission on the object. | Add the user to db_datareader, or GRANT SELECT. |
| Oracle | ORA-01017 |
Wrong username or password. | Reset the password; check the user name's case. |
| Oracle | ORA-28000 |
The account is locked. | ALTER USER ann_lee ACCOUNT UNLOCK. |
| Oracle | ORA-28001 |
The password expired. | ALTER USER ann_lee IDENTIFIED BY "...". |
| Oracle | ORA-12514, ORA-12505 |
The listener does not know the service name. | Use the service name, not the SID (Oracle step 5). |
| MongoDB Atlas | 8000 ("bad auth : Authentication failed") |
Wrong password, or not a database user (such as the Atlas website login). | Check the user in Database Access, and reset its password there if needed. |
| MongoDB | 18 (AuthenticationFailed) |
Wrong password, or the user is defined in another database. | Reset the password, or set Users are defined in (admin on Atlas). |
| MongoDB | 13 (Unauthorized) |
The user has no read role on that database. |
Add the read role (Atlas step 1, or db.grantRolesToUser). |