Consultor Eletrônico



Kbase P124481: How do I run a SQL script to create SQL-92 users
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/9/2009
Status: Verified

GOAL:

How do you add a user to the _user table from SQL Explorer?

GOAL:

How do you create a user from SQL Explorer?

GOAL:

How do I run a SQL script to create SQL-92 users

GOAL:

How to create a new SQL92 user

GOAL:

How to create SQL92 users for databases on UNIX machine itself

GOAL:

How to create SQL-92 users without a SQL explorer on Windows

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x
Progress 9.1x

FIX:

To create SQL-92 users any SQL-92 client can be used.
Progress provides a tool called SQL Explorer that can be used for Administrative purposes.

To create a SQL-92 user the following commands are needed:

CREATE USER '<username>','<password>';
GRANT <role> to '<username>';
COMMIT;

The 'userid' and 'password' must be enclosed in quotes and separated by a comma.
The user executing this statement must have DBA privileges.

Use SQL Explorer (on Windows) or sqlexp on the command line (on Unix) connected as owner of the database or as sysprogress.

The following steps can be used to create a SQL script file containing the above commands to be executed in SQl Explorer.

1. Create a file, e.g named "users.sql", containing the following SQL92 statements
CREATE USER '<username>','<password>';
GRANT DBA to '<username>';
COMMIT;

2a. Execute sql explorer on CHAR mode running the following command:
sqlexp -char -db <database> -S <service> -user sysprogress -password sysprogress -infile users.sql
OR
2b. Start a sqlexp session:
sqlexp -char -db <database> -S <service> -user sysprogress -password sysprogress
and execute:
@RUN users.sql

IMPORTANT: Progress reccomends create minimum one user with DBA privilege.