Thursday, December 13, 2018

1- Create New Database User


1- Create A New Database User


      In the name of Allah, Most Gracious, Most Merciful
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,


     Creating a new work space for a new application requires following the next  four steps in order to avoid the inconvenience caused by missing any step of them and helps you doing your task efficiently.
    
Task Definition:   
   The Database Concept:   

         At the beginning, Even though it is not my scope,  I would like to simplify the database schema concept for the beginners.apart from other formal definitions with a little comparison story. 

        Let's imagine, creating a new database schema for a new application looks like planning to buy a new apartment in a housing project. 
             The client mainly focuses on identifying a prospective residential apartment in respect to his needs and his financial limits. 
             This concept resembles to such an extent the task of a system administrator in determining the system users with the appropriate privileges that fits his role within the system How can this be ?!  Let's see...

  • Determining the apartment area in proportion to the room numbers looks like specifying a table space to a specific number of database users.
  •  Identifying the apartment key for each client  looks like identifying the database user password for that schema. 
  • Assigning each client his apartment or property specifications looks like granting the database user its privileges.
  • Furnishing the room for the clients livings looks like creating database objects for each user schema. 
       
Task Solution:

     1.     Create a New database user

  •  Open the Command Prompt, you can either open the Command Prompt with admin privileges as shown in the screen shot or open the Command Prompt as a regular user which is all you need.



  •  The Command Prompt with admin privileges will open with the default path. 
  •  Change the default prompt path through a command prompt. 
  •  Follow the steps of creating a new database user. 
Note, even though the steps used in user creation are very common and easy to follow but they are not a good practice. It only fits for novices. 

           Since the user will store its data into the default system table space which stores the system dataAs if you are trying to save your personal work or programs into windows folder. Can you accept it off course you can't. Just for your information, i will demonstrate it to you. Then, i will drop it and recreate it with the recommended command.

  •     Note, most of us surrender to the default windows prompt path we used to change but never think of changing it  to the most common path we usually use.
  •  I would like to show you how can we change it to Oracle Apex path once an for ever you want.
  •      Let's open the Windows prompt's properties as follow
  • Replace the Target from  %windir%\system32\cmd.exe  
  • To the new Target        cmd /k cd C:\apex5\apex 
  • Press apply.
 

         This implies initializing the default windows prompt every time with the new target directory specified as shown in the screen shot.

          

          Henceforth, you don't have to worry about such routine step each time you are dealing with Oracle Apex folder. 
         
         Now, let's drop the user "doc" that depends on the default "system" table pace and recreate it based on a new user default table space and another temporary table space.
   

         I would really like to emphasis on the difference between Oracle Database & Database User;  Oracle Database (DB) refers to schema as a user collection of database objects. The schema and user names are the same but function quite distinctly; i.e., a user may be deleted or reassigned to another user while its collection of objects (schema) within the database remains intact.



       Now, Al-Hamdu Lellah,we have a database user as a first step for creating our application. Let's go on to the next step; Create a New Work Space Manually
  
  Why we have to create a work space ? 
      Since without a work space we will not be able to work or create an application. 
It looks like dreaming to build a block without a land area. 

      A work space is a virtual private data base allowing ×Oracle Application users to work with in the same Oracle Apex Application as a front end & to interact with the database objects & code as a back end while keeping database objects, data and application private and save.





Hope this helps,

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.


No comments :