Administration Oracle Database in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trakal
    New Member
    • Jun 2007
    • 17

    Administration Oracle Database in C#

    Hello all,
    I'm a new one in this forum and also the one to developpe the application database in C#.
    I want to administer the Oracle database (Express Edition) in C#. It's mean to create a schema of user or delete a user etc.
    In summary, i want a class that let me to do as DMO or SMO that Microsoft developpe for SQL Server.
    So thanks before for all your helps.

    PS:Sorry, if i post this subject in the wrong forum.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Hi
    trakal
    Welcome to TSDN.

    You have reached the right place for knowledge shairing.

    Here you will find a vast resource of related topics and code.

    Feel free to post more doubts/questions in the forum.

    But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.

    It will help Experts in the forum in solving/underestanding your problem in a better way.

    Please follow the posting guidelines in every new post/reply.

    Please specify your post/question clearly.

    Dont expect others to guess and solve your problem.

    Regards

    Debasis

    Comment

    • trakal
      New Member
      • Jun 2007
      • 17

      #3
      Hello Debasis,
      Thanks for your reply.
      I want to create an application in C# that let create the schema of database (or user) and objects of database ( tables, index, stored procedures,...) .
      Actually, i can only connect to the Oracle database (existing) by the connection string and do the query or call the procedure but i can not create schema of database or tables directly. To do that, i must to write the scripts sql and call this script to execute.
      So how can i create a user, the tables, stored procedures, etc without the script sql in C#?
      Thanks for your helps.
      Regards,
      Trakal

      Comment

      • parag100
        New Member
        • Feb 2007
        • 13

        #4
        hello,

        u cannot do that directly through C#.u can call procedures throgh C# or
        simple sql query.To DDL operations , open your oracle database n with sql plus
        run any DDL u want .then back to C#. do any DML .

        Comment

        • trakal
          New Member
          • Jun 2007
          • 17

          #5
          Hello,
          Thanks for your reply.
          So, do you mean that i can't do any DDL operations in the script SQL through
          C#?

          Thanks

          Comment

          • trakal
            New Member
            • Jun 2007
            • 17

            #6
            I just want to reform my question asked before.
            i'm now developping a application who connect to Oracle database as a DBA. the objectif is to let a user (DBA) to connect to the schema of DB, and can display the objects owned by that schema: tables, synonyms, constraints. moreover, this user can also create the database's objects as i asked before to do DDL operations(crea te, drop and soon).

            Now i find a assembly of ODT.Net named Oracle.Manageme nt.Omo.dll. this library can maybe answer to my question. But i can not find any documents that tell about it.
            i want to know if it's possible to use this dll in my application code?
            If yes, it's free? and how can i find the documents?

            So thanks before hand.
            Excuses me for my english.
            Trakal

            Comment

            • debasisdas
              Recognized Expert Expert
              • Dec 2006
              • 8119

              #7
              You can execute any DDL command from any front end application using
              EXECUTE IMMEDIATE.

              Comment

              • trakal
                New Member
                • Jun 2007
                • 17

                #8
                Hello,
                First, i want to say thanks to parag100 and debasisdas who answered me.
                I can now find the solution for my problem.
                My solution is the creation of the scripts (for exemple CREATE TABLE tab (col NUMBER); ) and i use ExecuteNonQuery to execute this scripts.
                after the execution this script. the table "tab" will be created in the database.
                So, i can use DDL's operation through C# by using the scripts sql.

                Thanks again,
                Have a nice day.
                Trakal

                Comment

                • debasisdas
                  Recognized Expert Expert
                  • Dec 2006
                  • 8119

                  #9
                  you are most welcome

                  Comment

                  Working...