![prompt user console app visual studio prompt user console app visual studio](https://i.stack.imgur.com/P2X9K.png)
String conStringUser = "User Id=" + user + " Password=" + pwd + " Data Source=" + db + " " Prerequisite: This app assumes the user has already been created with the Modify the CREATE USER command if you wish to use a different tablespace. Note: The new user will be given access to the USERS tablespace. User Id: Enter the username that will store the To Do table, such as DEMODOTNET.Leave blank if there is no role to assign. Administrator Role: Enter the administrator's role, such as SYSDBA.Administrator Password: Enter the administrator's password.Administrator User Id: Enter the administrator username with privileges to create an user and assign privileges, such as SYSDBA.If Oracle Database XE is on your local machine, use the Easy Connect "localhost/XEPDB1 as the Data Source. Data Source: Enter the net service name, Easy Connect, or connect descriptor to connect to the pluggable database.Modify Program.cs to include your DB connection information:."CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE MATERIALIZED VIEW TO " + user + "') " +Ĭonsole.WriteLine(user + " user created") "EXECUTE IMMEDIATE ('GRANT CREATE SESSION, CREATE VIEW, CREATE SEQUENCE, CREATE PROCEDURE, " + " DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS') " + "EXECUTE IMMEDIATE ('CREATE USER " + user + " IDENTIFIED BY " + pwd + Modify the anonymous PL/SQL GRANT command if you wish to modify the privileges granted
![prompt user console app visual studio prompt user console app visual studio](https://docs.microsoft.com/en-us/dotnet/core/tutorials/media/with-visual-studio/create-new-project.png)
Using (OracleCommand cmd = con.CreateCommand())Ĭonsole.WriteLine("Successfully connected to Oracle Database") Using (OracleConnection con = new OracleConnection(conStringDBA)) Check whether DBA Privilege is required.ĬonStringDBA = "User Id=" + sysUser + " Password=" + sysPwd + " Data Source=" + db + " " ĬonStringDBA = "User Id=" + sysUser + " Password=" + sysPwd + " DBA Privilege=" + role + " Data Source=" + db + " "
Prompt user console app visual studio password#
Set the demo user id, such as DEMODOTNET and password If admin has no role, then set to empty string Provide the DBA's user id, password, and role to create the demo user such as "localhost/XEPDB1" for 18c XE or higher Set the net service name, Easy Connect, or connect descriptor of the pluggable DB,