How to work on a fresh database

Hi,
i am a plsql developer, i have been given to work on a new/fresh database, they given me(in technical document) 4 tables to create and write some stored procedures.
i am not a dba and i am not aware of creating table spaces.
my question is do i need to really create any table spaces, or can i go with the defaul one?
Please suggest what precautions i can take before createing tables writing procedures.
and also how i can give database connection to the front end application to call the stored procedures.
Thanks,
Vinod

Hi,
i am a plsql developer, i have been given to work on a new/fresh database, they given me(in technical document) 4 tables to create and write some stored proceduresWhen you are saying you are plsql developer then, I must say you would have completed SQL and PLSQL things.
Having said that your line of statement and task does not dealt with any part of DBA stuff only developer. Have you gone the technical document ? what does it have. ?
What type of store procedure have they asked ? If not documented in that doc, go and ask them what is the requirement, so that you can develop/code procedures --that makes more specific to your work/task.
i am not a dba and i am not aware of creating table spaces.
my question is do i need to really create any table spaces, or can i go with the defaul one?As begin an developer you would have came across this stuff/point/step. Who performed at that time ?
Please suggest what precautions i can take before createing tables writing procedures. and also how i can give database connection to the front end application to call the stored procedures.Now, this question, conflicts with your above statement, that either you are purely new to work wiht out knowing anything on this area. If that is the case, you must first take proper traning then can continue with work else your work/application goes to toss.
- Pavan Kumar N

Similar Messages

  • Hi Pls help me, How to work with SQL 2000 Database

    I have database using SQL 2000, How to connect and work with SQL 2000 Database. thanks

    Log on to www.SQLite.org that may help you.
    Using the Sqlite3.dll and after customizing your code with SQLite3.h you can read and write on to that DB.

  • How to work offline without the database connection

    The first thing that make me do not like this tool is it is not possible to work offline or at least that I find out easily.
    Why should I need the database connection to write PL/SQL, SQL or whatever.

    Thanks Duncan,
    I want exactly what I said. To have the ability to modify the PL/SQLor SQL code, of course stored in the local file system or some kind of version control system.
    This happens because I was at home and could not create stupid file to just put main methods and SQL's I want while not having the connection.
    I do not want to use 3 different tools to do simple things. I am expecting from this tool to do all things for me that are meaningful as I am in Oracle more then 10 years and know exactly how robust Oracle tools are usually covering more then simple things.
    Offline work is more then simple requirement.
    Source control is more then simple requirement as sql developer is extracted from JDeveloper.
    It is so obvious that it is not possible to modify PL/SQL code inside the database without having the connection :)
    What are you doing when the database is not available or you need to work from home and no VPN or so, in the plane (never did that but there are people that will do), ...?
    Both TOAD and if you want SQL*Plus can do it without connection of course.
    sqlplus /nolog will do it :)
    Oracle SQL*Developer is the same but you need first to create manually some SQL or other file somewhere and then open it.
    While we are here SQL*Developer is not source control aware and that is not good.

  • How to work with EJBs and database for a simple login application

    Hi all :)
    I am new in JSP,EJB and Servlets. I just wanted to develop a simple login application, using JSP+EJBand servlets. In some tutorial I found that the beans are already populatesd with database records. But will it be good logic to retrive all records into a bean and then search for a perticuler users data for authentication.
    Can any one tell me me what is the best logic for doing so. :(
    Thanx in advance.

    Himanshu.Shekhar wrote:
    Hi all :)
    I am new in JSP,EJB and Servlets. I just wanted to develop a simple login application, using JSP+EJBand servlets. In some tutorial I found that the beans are already populatesd with database records. But will it be good logic to retrive all records into a bean and then search for a perticuler users data for authentication.No. Let the database do the search. It's far more efficient.
    %

  • How does works default parameters in a program with logical database PNP?

    Hi Friends,
      I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
      If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
      Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
      How does works period parameters in a program with logical database PNP?
    This it's the program example, i use the default category.
    REPORT  ZRPHRTEST.
    tables: pernr.
    infotypes: 0001.
    start-of-selection.
    get pernr.
      write: pernr-pernr, p0001-begda, p0001-endda.
    end-of-selection.
    write 'fin'.

    Hi,
    Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
    Syntax: Tables pernr.
                Get pernr.
    Try, activate and test. This should solve your problem.
    Regards,
    Abhijeet

  • How OEM works with database

    Hi,
    We use OEM (12c),have db (11.2,10.2/1).
    How OEM works with database?
    When oem initated a job aginst  db,What are the steps preformed by OEM?What are the info updated in OEM DB and Normal DB regading jobs?And Where?
    Br

    At what point do you get this message?
    Have a look at the Windows Service. Ensure the EM Agent is running. Your database and Listener may be running, but if the Agent is not running, you will not be able to see correct status.
    Stop and start the Agent

  • How to create a fresh database

    Hi,
    I want to create a fresh instance of database, How should I
    proceed.
    Another thing, is it necessary that my listener to be running
    prior to creation of database instance.
    please guide me.
    Sreekant

    Hi
    You can create a fresh database using the following command.
    create database database_name
    maxlogfiles 5
    maxlogmembers 5
    maxdatafiles 100
    maxloghistory 100
    logfile
    group 1 ('/disk3/log1a.rdo','disk4/log1b.rdo') size 1 M,
    group 2 ('/disk3/log2a.rdo,'/disk4/log2b.rdo') size 1 M
    Datafile
    '/disk1/system01.dbf' size 50M autoextend on charater set
    <name>;
    The above command will create a new database for you.And hope it
    helps you out.

  • How the transactional replication work for simple recovery database (looking for some internal concept)

    How the transactional replication work for simple recovery database (looking for some internal concept)
    Rahul

    There seems to be a new myth going around recently. I’ve had at least three people tell me, in the last month, that SQL’s transactional replication requires the database to be in full recovery.
    This is complete fabrication. Replication (SQL native replication, that is) can work with the databases in any of the recovery models.
    Transactional replication does involve the transaction log, as that’s where it picks up changes from. The log reader scans over the transaction log looking for log records marked for replication, copies those to the distribution database and then marks them
    as replicated. When the checkpoint (for simple recovery) or log backup (for full or bulk logged) occur, the log will only be truncated up to the oldest inactive, replicated transaction.
    Because transactional replication has its own way of ensuring log records aren’t discarded before been picked up by the log reader, there’s no requirement for a specific recovery model.
    Refer this link
    http://sqlinthewild.co.za/index.php/2008/12/05/a-new-sql-myth/
    --Prashanth

  • How can I set up a database program for inputing baseball team statistics that is compatible with numbers?

    I have been asked to be a statistician bar and athletic team. We are playing Dartball, a game of darts that is based on baseball.  The previous status station used Apple works which included a database manager that was compatible with numbers. I have checked with the Apple geniuses online for my MacBook Pro and they did not have an answer to my problem. Is there a program that can be used on my MacBook Pro that will keep up with statistics for eight baseball team?

    Im all for the dumb questions, because its probably a dumb mistake I did.
    I have checked that both sus ped and exp. ped are fully plugged in.
    Neither pedals show up in the Midi meter in the transport.
    I dont know how to set a patch for the keyboard, but if both pedals work in other programs (i.e. Reason), wouldn't it not be an issue with a Logic configuration and not in the keyboard's setting? (Unless I have a separate Logic setting that loads automatically when it detects Logic is booted. I dont know how that would work though.)
    Thank you for your prompt help, though. Any other ideas?

  • How to save pdf file in database

    Dear All,
    my application is forms 6i and database is 8i,requirement is that how to save pdf file in database and users can view through forms

    I'll apologize up front for the length of this post. I have a few database procedures I created that write a file to a BLOB column in a table as well as retrieve the BLOB from the column after it stored there. I have successfully stored many different types of binary file to the database using these procedures - including PDF files. I have not used these procedures in a Form so I can confirm that they will work, but theoretically they should work. I'm including the code for each procedure in this posting - hence the apology for the long post! :-)
    Also, since these procedures reside on the database you will need to use Forms TEXT_IO built-in package to write your file to the server before you can use these procedures to store and retrieve the file from the database.
    These procedures reads and writes a binary file to a table called "LOB_TABLE." You will need to modify the procedure to write to your table.
    -- Author :  Craig J. Butts (CJB)
    -- Name   :  load_file_to_blob.sql
    --        :  This procedure uses an Oracle Directory called "IN_FILE_LOC".  If you
    --           already have a directory defined in the database or would prefer to use
    --           a different Directory name, make sure you modify line 21 to reflect the
    --           new Directory name.
    -- ==================================================================================
    -- History
    -- DATE        WHO         DESCRIPTION
    -- 12/11/07    CJB         Created.
    CREATE OR REPLACE PROCEDURE load_file_to_blob (p_filename IN VARCHAR2) IS
       out_blob    BLOB;
       in_file     BFILE;
       blob_length INTEGER;
       vErrMsg     VARCHAR2(2000);
    BEGIN
       -- set the in_file
       in_file := BFILENAME('IN_FILE_LOC',p_filename);
       -- Get the size of the file
       dbms_lob.fileopen(in_file, dbms_lob.file_readonly);
       blob_length := dbms_lob.getlength(in_file);
       dbms_lob.fileclose(in_file);
       -- Insert a new Record into the tabel containing the
       -- filename specified in P_FILENAME and a LOB_LOCATOR.
       -- Return the LOB_LOCATOR and assign it to out_blob.
       INSERT INTO lob_table (filename, blobdata)
          VALUES (p_filename, EMPTY_BLOB())
          RETURNING blobdata INTO out_blob;
       -- Load the file into the database as a blob.
       dbms_lob.open(in_file, dbms_lob.lob_readonly);
       dbms_lob.open(out_blob, dbms_lob.lob_readwrite);
       dbms_lob.loadfromfile(out_blob, in_file, blob_length);
       -- Close handles to blob and file
       dbms_lob.close(out_blob);
       dbms_lob.close(in_file);
       commit;
       -- Confirm insert by querying the database
       -- for Lob Length information and output results
       blob_length := 0;
       BEGIN
          SELECT dbms_lob.getlength(blobdata) into blob_length
            FROM lob_table
           WHERE filename = p_filename;
       EXCEPTION WHEN OTHERS THEN
          vErrMsg := 'No data Found';
       END;
       vErrMsg := 'Successfully inserted BLOB '''||p_filename||''' of size '||blob_length||' bytes.';
       dbms_output.put_line(vErrMsg);
    END;
    -- Author   :  Craig J. Butts (CJB)
    -- Name     :  write_blob_to_file.sql
    -- Descrip  :  This procedure takes a BLOB object from a database table and writes it
    --             to the file system
    -- ==================================================================================
    -- History
    -- DATE        WHO         DESCRIPTION
    -- 12/11/07    CJB         Created.
    CREATE OR REPLACE PROCEDURE write_blob_to_file ( p_filename IN VARCHAR2 ) IS
       v_blob      BLOB;
       blob_length INTEGER;
       out_file    UTL_FILE.FILE_TYPE;
       v_buffer    RAW(32767);
       chunk_size  BINARY_INTEGER := 32767;
       blob_position INTEGER := 1;
       vErrMsg     VARCHAR2(2000);
    BEGIN
       -- Retrieve the BLOB for reading
       BEGIN
          SELECT blobdata
            INTO v_blob
            FROM lob_table
           WHERE filename = p_filename;
       EXCEPTION WHEN OTHERS THEN
          vErrMsg := 'No data found';
       END;
       -- Retrieve the SIZE of the BLOB
       blob_length := DBMS_LOB.GETLENGTH(v_blob);
       -- Open a handle to the location where you are going to write the blob
       -- Note:  The 'WB' parameter means "Write in Byte Mode" and is only
       --          available in the UTL_FILE pkg with Oracle 10g or later.
       --        USE 'W' instead for pre Oracle 10q databases.
       out_file := UTL_FILE.FOPEN('OUT_FILE_LOC',p_filename, 'wb', chunk_size);
       -- Write the BLOB to the file in chunks
       WHILE blob_position <= blob_length LOOP
          IF ( ( blob_position + chunk_size - 1 ) > blob_length ) THEN
             chunk_size := blob_length - blob_position + 1;
          END IF;
          dbms_lob.read(v_blob, chunk_size, blob_position, v_buffer );
          UTL_FILE.put_raw ( out_file, v_buffer, TRUE);
          blob_position := blob_position + chunk_size;     
       END LOOP;  
    END;Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • How to restore SQL Server 2008 database to SQL Server Express 2012

    How to restore SQL Server 2008 database to SQL Server Express 2012.
    I BACKED UP a SQL Server 2008 database from work, which runs the enterprise version of 2008, and I tried to RESTORE it to my new 64-Bit home PC which is running the new SQL Server Express 2012 64-Bit (Advanced Edition).
    But if fails. I get the following message text.
    Can anyone help me please. I thought restoring a 2008 database to the later version 2012 would be possible.
    Here is the error message. Thanks.
    TITLE: Microsoft SQL Server Management Studio
    Restore of database failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
    ADDITIONAL INFORMATION:
    System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.3128. Either restore the database on a server that supports the backup, or use a
    backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)

    ADDITIONAL INFORMATION:
    System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.3128. Either restore the database on a server that supports the
    backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)
    Are you sure your database is SQL server 2008 from error message it seems your SQL server version is 2000.I guess you have multiple versions of SQL server.
    AFAIK you cannot restore backup of SQL server 2000 to 2012 directly .Restore it first to SQL 2008/2008R2 or 2005 then take backup again of new database created and then you would be able to restore it on 2012.Its kind of intermediate way
    Also make sure your DB size is less than 10 G as max DB size supported by Express edition is 10 G and if your DB size is more than 10 G restore will fail.
    You are also trying to restore enterprise DB backup on express edition so you will loose enterprise features on express edition
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Trying to understand how beans work.

    I can't seem to figure out how beans work. Or more specifically how to target different parts of a bean. I think not knowing the terminology is a big part of this confusion too.
    For instance. I have a jsp file and a bean. the jsp has a form input that submits to itself. the bean gets the info that was typed in and displays is in the <%= etcetc %> tag. Now, what im trying to do is also submit that value to my mysql db. This has created numerous problems for me. For one, i don't really know how to check if it's working (other than actually looking at the DB table). The other problem is how do i target that part of the bean to tell it to do that function (again, the terminolgy eludes me).
    I'll post all of the code. There is a good chance that the DB code wont work. I'm really just hoping someone can explain to me
    how i call the DB function from the JSP file.
    I mean, is this even possible? Or do i need seperate beans for everything?? It seems kind of silly to not be able to do this.
    ok, so here is the code.
    JSP:
    <!-- JSP Directives -->
    <%@ page errorPage="myError.jsp?from=hello.jsp"%>
    <jsp:useBean id="simpleBean" scope="page" class="jspbook.ch3.simpleBean"/>
    <!-- Set bean properties -->
    <jsp:setProperty name="simpleBean" property="fname"/>
    <html>
    <head>
         <title>Hello</title>
    </head>
    <body>
    <center>
         <b><%= simpleBean.welcomeMsg() %></b>
    </center>
    <table align="center">
         <tr>
              <td>
                   <form name="sdfsdf" action="test.jsp" method="post">
                   <input type="text" name="fname" value="">
                   <input type="submit" name="submit" value="submit">
                   </form>
              </td>
         </tr>
    </table>
    </body>
    </html>and here is the bean
    package jspbook.ch3;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    public class simpleBean implements java.io.Serializable {
       private String emplid;
       private Connection con = null;
       private ResultSet rs = null;
       private PreparedStatement st = null;
       /* Member Variables */
       private String lname;
       private String fname;
      public simpleBean()
            try
              Class.forName("org.gjt.mm.mysql.Driver");
              Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/stm?user=root&password=");
        catch(Exception e)
              System.out.println(e.getMessage());
          /* Initialize bean properties */
        setLname("");
        setFname("");
      /* Accessor Methods */
      public String getLname() {
        return lname;
      public void setLname(String _lname) {
        lname = _lname;
      public String getFname() {
        return fname;
      public void setFname(String _fname) {
        fname = _fname;
      /* Display personalized message */
      public String welcomeMsg() {
        return "Hello " + fname + " " + lname +
          ", welcome to the wonderful world of JavaBeans!";
          public void insert()
           try
                String s1="insert into commstream (commTitle) values('"+fname+"')";
                st = con.prepareStatement(s1);
                st.executeUpdate();
                st.clearParameters();
                st.close();   
           catch(Exception m)
    }So there it is. If someone can explain the fundamentals to me, that would be great. What would also be great is if someone can make the above code work :)
    I've checked online tuts/specs on this, but to be honest im just not grasping it.

    iPhoto is a relational database program
    In the strongly recommended managed library (you have chosen to ignore this recommendation and use a referenced library) imported photos are copied to the iPhoto library and stored in the originals folder, a thumbnail jPEG is created and places in the data folder and when any modification is made (including autorotation) a modified version of the photo is created and placed in the modified folder. iPhoto updates its database entries to reflect everything it does.
    It is critical that you do not make any modifications of any sort to the content or structure of the iPhoto library - doing so is likely to corrupt the library and cause you to lose data.
    When you use the referenced mode which you are doing (and which is not recommended) you are taking total responsibility for the original photos which included not moving or modifying them while iPhoto is referencing them
    Unfortunately, all pictures from a certain import has duplicated in iPhoto.... so I "moved to trash" all pictures from that import
    Did you do this with the iPhoto trash? or did you use the finder to modify the contents of the iPhoto library.
    If I "move to trash", I assumed it got rid of whatever index (and preview cache) to that particular JPEG. I was actually surprised it did not delete the actual JPEG but I'm ok with that.
    again - iPhoto trash or finder trash. If you move a photo to the iPhoto trash and empty it all traces of that photo in the iPhoto library will be removed - nothing will be done to any file outside of the iPhoto library -- ever
    LN

  • How can i use offline & online database in the same time?

    how can i use offline & online database in the same time?
    my database in another server when the connection true it connect
    but if not does not work
    i wanna make offline database if the server not connected it connect offline then the server is on it alter all data from the offline to the server.

    User, please tell us your Jdev version!
    There is no such functionality build into the framework. The offline data base is only for designing the db, not to have a backup db.
    If you can't connect to the db the application will not work.
    Timo

  • How to add an existing content database to new Site collection

    Hi All,
    Can anyone help to figure out how can I add existing content database to a new site collection in SharePoint 2013 foundation.
    We have more than 40 site collections under one web application, and only one site collection is returning 404 error. When checked in the central admin to view all site collections, the details on the right side of the site is not visible, and unable
    to delete it. The database is not corrupt, as I tried to add the same content database to a new web application, and it works perfectly in a new web app.
    As we couldn't find any solution, the only option we thought of was to blow the site collection and create a new one and add the exisiting database, but I am unaware as to how can I add existing database to new create site collection. Can anyone help
    me with this please?
    Regards,
    DJ

    It's working....
    The current database was corrupt I guess, (not sure though). Took old backup file and tested to see if it's working. After the test was successful...
    Removed the current database in CA
    Delete the current database in SQL server
    Restored the working backup file in SQL server
    Added the content db in CA
    That's it... the site collection is working now...
    Regards,
    DJ

  • How to clean tables in Ides database of Mobile Sales

    Hello experts,
    I'm working with Mobile Sales v 4 SP08, and SQL Server 2000 Standard Edition.
    I have created a new extract for a site.
    In order to go faster loading the new extract synchronizing MSA client, how could I clean the Ides database into MSA client ?
    Best regards
    Juan

    Hi Pratik,
    Thank you, but I'm not interesting in complete archiving process.
    I only want clean tables into Ides database into SQL Server of MSA client, with SQL tools. From SQL Interprise manager.
    When I create a new extract for existing user and synchronize it, the import operation is very slow because SQL server needs delete the old records in all tables and import new records.
    As far as I know, detaching Ides database, saving it, ... some operations...., and restoring it, we can clean all records in tables. After that we will synchronize and will load new extract.
    Kind regards
    Juan

Maybe you are looking for

  • How to make the times of all nodes similar

    Hi, i have a 3 node 10.2.0.4 64Bit Cluster database on HP Itanium with OS RHEL-4.6. we donot have any NTP Server integrated with these. Three nodes are running with three different Time with significant differences. More over 2 of the Nodes run well

  • Incrementing Total not correct(adding +1)  in some group totals

    Hi All, I have an incrementing total that appears to work fine except when I try to display the total's final count only SOME groups have a +1 count. There doesn't seem to be a logical reason for it. Any ideas? Incrementing total formula: Whileprinti

  • Oc4j tp4

    Hi all i am useing tp4 and just installed oc4j tp4. here comes an error code when i deploy my application what am i missing ? Copy the archive to C:\oc4j_extended_11110_tp4\j2ee\home\applications\webapp1.ear Initialize C:\oc4j_extended_11110_tp4\j2ee

  • Automatically Launching Bridge when PS CS4 is launched

    I just installed CS4 and my first difference is the (on a PC) Edit/Preferences/General does not have a check box for automatically alunching Bridge. Was this moved to somewhere else?  I liked this in CS3. Thanks in advance. Marv

  • How to join multiple clips and music?

    Hi. I have finish a project, but I want to include new music with news clips in the middle of it . How can I join the multiples clips and the music I have edited so far in order to move them in the timeline as is they were a single clip, that is, wit