Add a new key to the keyring to store a new database connection string. If the keyring is locked then unlock it first with its password.

add_key(keyring_name, service_name)

Arguments

keyring_name

A character string providing the name of the keyring.

service_name

A character string providing the name of the key.

Details

On creating the key, the name of the key relating to the database is added under the service name and the database connections string is added as a json string in the password dialog box.

  • SQL Server windows authentication: {"server":"SERVER_NAME", "database":"DATABASE_NAME"}.

  • PostGresSQL database: {"server":"SERVER_NAME", "database":"DATABASE_NAME", "username":"USERNAME", "password":"PASSWORD"}.

  • For SQLEXPRESS on the local machine the server name is "localhost\SQLEXPRESS".

See also