none
can't create oracle db by ADOX RRS feed

  • Question

  • Hi
    i try to create Oracle db by adox but failed
    some body told me not to use it
    so. how to create it by executing sql like "create database mydbname;"

    i test to connect to oracle db by udl file with sys user and his password that i assign to him but can't login !!! although the password is right !!!

    i need any way to create oracle db by executing sql statement in code
    thanks in advance.
    Monday, August 6, 2007 9:41 PM

Answers

  • You need to check out the Oracle PL/SQL reference. Look for statements such as CREATE DATABASE, CREATE TABLE, etc.

     

    http://www.oracle.com/pls/db92/db92.sql_keywords?remark=homepage

     

    SQL DDL or DML can be run using ExecuteNonQuery:

     

    Code Snippet

    Dim OracleConnection As New System.Data.OleDb.OleDbConnection("...")

    OracleConnection.Open()

    Dim OracleCommand As New System.Data.OleDb.OleDbCommand("OracleCommandText", OracleConnection)

    OracleCommand.ExecuteNonQuery()

    OracleConnection.Close()

     

     

     

    Tuesday, August 7, 2007 1:00 PM

All replies

  • You need to check out the Oracle PL/SQL reference. Look for statements such as CREATE DATABASE, CREATE TABLE, etc.

     

    http://www.oracle.com/pls/db92/db92.sql_keywords?remark=homepage

     

    SQL DDL or DML can be run using ExecuteNonQuery:

     

    Code Snippet

    Dim OracleConnection As New System.Data.OleDb.OleDbConnection("...")

    OracleConnection.Open()

    Dim OracleCommand As New System.Data.OleDb.OleDbCommand("OracleCommandText", OracleConnection)

    OracleCommand.ExecuteNonQuery()

    OracleConnection.Close()

     

     

     

    Tuesday, August 7, 2007 1:00 PM
  • thanks for reply
    im getting error when executing CREATE DATABASE it says "error database already mounted"
    may be because im connecting to a database in order to execute that command !!

    Wednesday, August 8, 2007 7:50 AM
  • Well, yes there would be a database that is already mounted in the instance you've connected to.

     

    Oracle is a little different than other database servers such as SQL Server or Sybase. It doesn't support the same "database" concept although you can create multiple "schemas" within an Oracle database.

     

    Wednesday, August 8, 2007 12:37 PM
  • thanks for reply
    you say "you can create multiple "schemas" within an Oracle database." what is that mean ? and how this helps me? and how can i do it?

    thanks.

    Wednesday, August 8, 2007 2:31 PM
  • A schema in Oracle is similar to the database concept in SQL Server. You can create a schema and then objects which belong to that schema in addition to any appropriate security. A schema is typically bound to a single user but can be accessible to multiple users. See the following for how to create a schema:

     

    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_614a.htm#SQLRF01313

     

     

    Thursday, August 9, 2007 1:03 PM