This SAS Note describes how to have SAS Enterprise Guide prompt you for a user ID and password when you access a database library. To set up this prompt, perform one of the following procedures. Use the first procedure if your library was defined in SAS® Management Console. Use the latter procedure if your library was defined using a LIBNAME statement in the SAS code.
1. From the Server Manager plug-in, highlight the name of the database server that you created. For this example, we use the name oracle_prompt.
2. In the panel on the right, right-click Connection: oracle_prompt and select Properties. The Connection: oracle_prompt Properties dialog box appears: 
3. In the dialog box, click the Options tab.
4. From the Authentication type drop-down menu, select Prompt.
5. Click New. The New Authentication Domain dialog box appears.
6. In the New Authentication Domain dialog box, enter a name of your choosing (for example, foo). You can also enter a description, but this is optional. Click OK.
7. Back in the Connection: oracle_prompt Properties dialog box, click OK.

8. Now, in the Data Library Manager plug-in, right-click the oracle_prompt library and select Properties. The oracle_prompt Properties dialog box appears.
9. In the dialog box, click the Extended Attributes tab. And then click New:

10. Under Field Name, enter Assignmode, and under Value, enter 0.
11. Click New.
12. For the second Field Name, enter loginmode and enter prompt for the value.
13. Click OK.
14. Restart SAS Enterprise Guide and then try assigning the library. You should be prompted for your database user ID and password.
Note: This library behaves as a pre-assigned library, so all of the tables in that library are visible.
1. In SAS Enterprise Guide, select View ► Prompt Manager.
2. In the Prompt Manager pane, click Add. The Add New Prompt dialog box appears.
3. In the dialog box, click the General tab. In the Name field, enter a name for the new prompt, using this format: name_PASSWORD. Note that the text _PASSWORD is required to mask the entry.
Example: My_PASSWORD
4. Click the Prompt Type and Values tab.
5. From the Prompt type drop-down menu, select Text.
6. From the Method for populating prompt drop-down menu, select User enters values.
7. From the Text type drop-down menu, select Masked single line (for password entry).

8. From the Method for encoding masked text drop-down menu, select (none).
9. Click OK to save your entries and close the window.
10. Right-click your program task and select Properties. The Properties for task_name dialog box appears.
11. In the dialog box, click Prompts and then Add. The Select Prompts dialog box appears. It should contain your new named prompt.

12. In the dialog box, click the name of your prompt and click OK.
13. In the Properties for task_name dialog box, click OK. The prompt is now associated with your code node.
14. You should now be able to refer to the prompt macro in your code by using this syntax:

When the code runs, you are prompted to enter the password as shown above.