Skip to content

ORC database sign-in

ORC is the backend service of the student application. Its data lives in a MySQL database called mesaenrollment, on Amazon RDS, the database service of AWS. sfe reads that database with plain SELECT statements and never changes it. This sign-in is optional, and it is off until we have the access.

Video, about one minute, with narration and captions.

The video shows sfe's own checks for this sign-in, from a real run. The browser part of a sign-in, where we type our password and approve it, is ours alone, so the video describes it and does not record it.

What it is used for in sfe

Command What it does
sfe orc ping Checks the connection and says which account we are. It only reads
sfe orc tables Lists the tables, and can filter with --contains
sfe orc describe <table> Lists the columns of a table
sfe orc query "<sql>" Runs one read statement

The data can hold students' records. We read only what we need, and we never copy a student's name, email or id into a ticket, a chat or this wiki.

What must be signed in

What Detail
The access A read-only database account. We ask for it with a ServiceNow request, described on the Confluence page "ORC DB Access Request". The production account can only run SELECT
The tool The MySQL client, mysql. sfe doctor tools checks that it is installed. If it is missing, brew install mysql-client installs it
Turn it on sfe env enable orc, then sfe setup orc. It stays off until we do
The command sfe orc login --env dev (and --env stage or --env prod). It must run in a terminal with a person at it. It asks for the RDS endpoint (the address of the database server), our username and our password
What we type The password, at the prompt. We type it ourselves, never an agent. It goes into the macOS Keychain. The host and the username are saved in ~/.sfe/config.json, and the password never is

Environments

sfe name What it is
dev The ORC dev database. This is the default of the dev and qa lanes
stage The ORC stage database. It is optional, and its endpoint is asked for during the setup
prod The ORC production database, SELECT only. sfe marks it [PRODUCTION]. This is the default of the prod lane

For one command we add -e dev, or --env dev.

What a successful sign-in looks like

sfe status has an orc row whose login column says our username and connects:

orc  yes  prod  ORC prod database (SELECT only) [PRODUCTION]  <our username> connects

sfe doctor orc shows a green tick for each environment, ORC database dev: host, user and Keychain password, with the same connects. sfe orc ping --env dev checks the connection itself. Both only read. While the access is off, sfe doctor orc shows a grey circle that says off (sfe env enable orc, then sfe setup orc), and that is fine.

On a Mac where it is signed in, sfe doctor orc looks like this:

sfe doctor orc: dev, stage and prod each with a host, a user and a Keychain password, and each connects

And sfe help orc login, which only reads:

The help of sfe orc login, with its options

Steps

  1. We ask for the access with the ServiceNow request, and wait until it is approved.
  2. We run sfe env enable orc, and then sfe setup orc.
  3. We run sfe orc login --env dev. We type the endpoint (the team gives it to us), our username and our password at the prompts.
  4. We run sfe orc ping --env dev. It should say which account we are.
  5. We repeat step 3 for stage and prod when we need them.

Troubleshooting

What we see Likely cause What to do
off (sfe env enable orc, then sfe setup orc) The ORC database is not switched on Run sfe env enable orc and then sfe setup orc, once we have the access
no host yet: ask the team for it The endpoint for that environment is not saved Ask the team for the RDS endpoint, then run sfe orc login --env <name> --host <endpoint>
no saved password: run sfe orc login --env dev No password is in the Keychain for that environment Run the login line ourselves
the saved password may be wrong The password was changed, or typed wrongly Run sfe orc login --env <name> again and type the new password
sfe orc login needs a terminal with a person at it The command ran inside an agent or a script Run it ourselves in a terminal
A write statement is refused sfe reads this database only, and the production account is SELECT only Nothing to fix. We do not work around it

Next


Last reviewed: 2026-12-02