CrazyEngineers
  • creating a database in sql

    Updated: Oct 26, 2024
    Views: 1.4K
    Hi,

    Once I have logged in to the SQL server, I am supposed to create my own database. Then this database is to contain tables etc. pertaining to my project. Right.

    The problem is that once I log in to my SQL server, I am not able to create my database.

    When I try to create my own database using CREATE DATABASE db_name; I get the message that the database is already mounted.

    Though I am able to perform my work (by creating tables, writing queries etc.), I am not able to create a database where I can put related tables in one separate space. I am working on two projects simultaneously, and all the tables seem to be there in one location (as I am not able to create separate databases for the two projects).
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Vishal Sharma

    MemberAug 3, 2015

    #-Link-Snipped-# Tagging the DB guy
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberAug 3, 2015

    ask your db admin if you have rights to create new database
    Are you sure? This action cannot be undone.
    Cancel
  • Aashish Joshi

    MemberAug 7, 2015

    You may get this error if you're trying to create a new database when you have another one already mounted. The DB in use needs to be unmounted first before you can create a new DB.

    If you're using Oracle try the following steps and see if you're able to create a database:

    1. First log in using Sqlplus. Open command prompt or terminal and enter the following command:

    sqlplus /nolog
    
    2. Sign in as a user that has create database privilege. For example, if you have the sysdba privilege you an use this to sign in:
    connect username as sysdba
    
    3. If the database is already running then you'll need to shut it down first:
    shutdown normal
    
    4. Now start the database without mounting it:
    startup nomount
    
    Now you should be able to create a new database.

    Note: If you use Oracle's free eXpress Edition DB additional steps are required before you can create more than 1 database.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register