{"id":114,"date":"2018-09-29T17:50:30","date_gmt":"2018-09-29T17:50:30","guid":{"rendered":"http:\/\/kabiliravi.com\/?page_id=114"},"modified":"2019-07-21T13:47:53","modified_gmt":"2019-07-21T13:47:53","slug":"user-management","status":"publish","type":"page","link":"http:\/\/kabiliravi.com\/index.php\/software\/databases\/oracle-db\/user-management\/","title":{"rendered":"User Management"},"content":{"rendered":"<h1>Creating a User<\/h1>\n<p>Once you connect as a sysdba user, simply you can execute the CREATE USER command to generate a new DB user.<\/p>\n<p>Here is the command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">SQL&gt; ALTER SESSION SET \"_ORACLE_SCRIPT\"=true;\r\n\r\n\r\nSession altered.\r\n\r\nSQL&gt; CREATE USER phonebookdba IDENTIFIED BY \"p123!@#\";\r\n\r\nUser created.<\/pre>\n<blockquote>\n<p style=\"text-align: left;\">Note if you get&nbsp;<strong>ORA-65096: invalid common user or role name<\/strong> error run&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">SQL&gt; ALTER SESSION SET \"_ORACLE_SCRIPT\"=true;<\/pre>\n<\/blockquote>\n<h1>Grant Access<\/h1>\n<h2>Grant to CONNECT role<\/h2>\n<p>The CONNECT role was established with<\/p>\n<table class=\"cellalignment444\" dir=\"ltr\" title=\"Privileges originally associated with CONNECT\" summary=\"This table lists the eight privileges originally granted with the CONNECT role.\">\n<tbody>\n<tr class=\"cellalignment435\">\n<td id=\"r2c1-t2\" class=\"cellalignment443\" headers=\"r1c1-t2\">Alter Session<\/td>\n<td class=\"cellalignment443\" headers=\"r2c1-t2 r1c2-t2\">Create Session<\/td>\n<\/tr>\n<tr class=\"cellalignment435\">\n<td id=\"r3c1-t2\" class=\"cellalignment443\" headers=\"r1c1-t2\">Create Cluster<\/td>\n<td class=\"cellalignment443\" headers=\"r3c1-t2 r1c2-t2\">Create Synonym<\/td>\n<\/tr>\n<tr class=\"cellalignment435\">\n<td id=\"r4c1-t2\" class=\"cellalignment443\" headers=\"r1c1-t2\">Create Database Link<\/td>\n<td class=\"cellalignment443\" headers=\"r4c1-t2 r1c2-t2\">Create Table<\/td>\n<\/tr>\n<tr class=\"cellalignment435\">\n<td id=\"r5c1-t2\" class=\"cellalignment443\" headers=\"r1c1-t2\">Create Sequence<\/td>\n<td class=\"cellalignment443\" headers=\"r5c1-t2 r1c2-t2\">Create View<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Refer to <a href=\"https:\/\/docs.oracle.com\/cd\/B19306_01\/network.102\/b14266\/appendixa.htm#CHDGJGJF\">Addressing The CONNECT Role Change<\/a> for more information<\/p>\n<p>Here is the command to grant a user CONNECT role:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">SQL&gt; GRANT CONNECT TO phonebookdba;<\/pre>\n<h2>Grant a user to be DBA<\/h2>\n<p>Sometimes you need to create a user with more privileges like allowing the user to create named types for custom schemas or even the DBA role that allows the user to not only create custom named types but alter and destroy them as well.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">SQL&gt; GRANT CONNECT, RESOURCE, DBA TO phonebookdba;<\/pre>\n<p>&nbsp;<\/p>\n<h1>Alter User<\/h1>\n<p>&nbsp;<\/p>\n<h1>Drop User<\/h1>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a User Once you connect as a sysdba user, simply you can execute the CREATE USER command to generate a new DB user. Here is the command: SQL&gt; ALTER SESSION SET &#8220;_ORACLE_SCRIPT&#8221;=true; Session altered. SQL&gt; CREATE USER phonebookdba IDENTIFIED BY &#8220;p123!@#&#8221;; User created. Note if you get&nbsp;ORA-65096: invalid common user or role name error [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":88,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-114","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/pages\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":6,"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/pages\/114\/revisions"}],"predecessor-version":[{"id":122,"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/pages\/114\/revisions\/122"}],"up":[{"embeddable":true,"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/pages\/88"}],"wp:attachment":[{"href":"http:\/\/kabiliravi.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}