Solved

what is the equivalent command for oracle for creating DB and user w.r.t mysql

Posted on 2016-07-22
3
30 Views
Last Modified: 2016-09-23
below commands used for generate DB and user in mysql.what is the equivalent command for oracle.

CREATE DATABASE xyz; CREATE USER 'xyz'@'localhost' IDENTIFIED BY 'xyz'; grant all on xyz.* to 'alfresco5'@'localhost' identified by 'xyz' with grant option; grant all on xyz.* to 'xyz'@'localhost.localdomain' identified by 'xyz' with grant option;
0
Comment
Question by:chaitu chaitu
3 Comments
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 41725415
Might I refer you to the online documentation?

You can create a database from the command line but using the Database Configuration Assistant (DBCA) is a lot easier.

Create Database:
http://docs.oracle.com/database/121/ADMIN/create.htm#ADMIN11073

Create User:
http://docs.oracle.com/database/121/SQLRF/statements_8003.htm#SQLRF01503
0
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 250 total points
ID: 41733592
Be aware that the "create database..." command in Oracle may not mean exactly the same thing as it does in some other SQL-based systems.  For example, in SQL Server the concept of a "database" is a much more-limited object than in Oracle.  I don't know MySQL, so I don't know if the concept of a "database" in MySQL is more like the Oracle concept, or the SQL Server concept.  In Oracle the term "schema" is more like what is called a "database" in SQL Server.

Also, this concept: "grant all on xyz.* to [some other user]" is usually implemented in Oracle via roles.  Oracle allow you to grant permissions to a role, then the role can be granted to another user.  But, in Oracle, all of these grants are only in the local database.

This syntax in Oracle: "@...host" indicates a remote database, and permissions in Oracle are never granted to a remote database.  In Oracle systems, a remote database user must connect to the local database with a username and password that is valid in the local database.  (I don't know exactly what this syntax means in MySQL: "...@localhost".)
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question