Skip to main content
Skip table of contents

Admin: Google Spanner Configuration

Obtaining a Spanner Instance ID

  1. In a web browser, log into the Google Cloud console at https://console.cloud.google.com.

  2. In the dashboard navigation menu, click Spanner.

  3. Once the Spanner page is displayed, click the Spanner instance and take note of the Instance ID (you will use this to configure the Spanner plugin in Server Workbench).

    image-20250917-183139.png

Obtaining a Google Project ID

  1. While in the Google Cloud console, click the project selector at the right side of the Google Cloud Platform interface.

    image-20250917-183155.png
  2. Once the project selector is displayed, take note of the currently-selected project ID (you will use this to configure the Spanner plugin in Server Workbench).

    image-20250917-183207.png

Download and Install the Google Cloud SDK

  1. In a browser, navigate to the Google Cloud SDK download page at https://cloud.google.com/sdk/downloads .

  2. Locate the download link for Windows 64-bit (x86_64). The Spanner plugin was developed and tested using the SDK that can be download here: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk182.0.0-windows-x86_64.zip.

  3. Once downloaded, install the Google Cloud SDK. Follow the steps provided as the installation progresses.

Configure the Google Application Default Credentials

  1. Log in to https://console.cloud.google.com.

  2. Go to the API Console Credentials page by navigating to APIs & services > Credentials.

  3. From the project drop-down, select your project.

  4. On the Credentials page, select the Create credentials drop-down, then select Service account key.

  5. From the Service account drop-down, select App engine app default service account.

  6. At Key type, select the JSON key option, then select Create. The file will automatically be downloaded to your computer.

  7. Place the *.json file you have just downloaded within your preferred directory location. The directory must be secured, but accessible to your web server code.

  8. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the downloaded JSON file.

Creating the Environment variable for your Google Credentials

  1. Navigate to Windows Control Panel > System > Advanced System Settings > Advanced Tab > Environment Variables.

  2. In System Variables, add a new variable using the following details:

    • Name:                  GOOGLE_APPLICATION_CREDENTIALS

    • Variable value:   C:\[PATH TO PRIVATE KEY FILE]\gcp-xxxxxxx-privatekey.json
      Note: the variable value must be set according to the actual directory location of the private key file. 

  3. Having completed the above, use the following connection string format when provisioning a new client utilizing Spanner in Server Workbench:

    • Instance ID:     <GOOGLE_PROJECT_ID>/<GOOGLE_SPANNER_INSTANCEID>

    • Database ID:   The Spanner Database to be accessed

    • Schema:          The schema of the Spanner database

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.