User Profile

Collapse

Profile Sidebar

Collapse
sakumar9
sakumar9
Last Activity: Sep 8 '10, 05:23 PM
Joined: Jan 10 '08
Location: Bangalore
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sakumar9
    replied to Migration from SYbase to UDB database
    in DB2
    I would suggest you to visit DB2 Migration Portal.

    http://www-01.ibm.com/support/docview.wss?rs= 71&uid=swg21200 005
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Selecting from a Dynamic Table in SQL
    in DB2
    # SET V_TABLE = 'concat(''FL_TI ME_DIM'',(selec t Value from table ))'

    You cannot have any SQL like SELECT * FROM contact('a', 'b').

    Instead, you can have these values concated before the SELECT itself and try.
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Selecting from a Dynamic Table in SQL
    in DB2
    I am not sure if you are using CONCAT propoerly.
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Prepare Statement in DB2
    in DB2
    are you sure that you are getting 440 code from this PREPARE only??

    As far as my knowledge is concerned, it should not happen at precompile time atleast. Are you getting this error at run time or compile time??
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Empty Table
    in DB2
    Oh I am sorry, you can truncate the table conditionally.

    I would suggest you to use DB2 partitioning features like Range partitioning, MDC etc. This will boost your performance drastically. Just in fractions of seconds, you can actually delete huge data.

    Let me know if you need more details regarding this. I would be more than happy to share.

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Empty Table
    in DB2
    You can truncate the table. By the way, which DB2 are you running?

    As such, there is no command like truncate in DB2. But I am sure you would like to know how it can be done in DB2. For that, I would suggest you to refer to the sample: sqllib/samples/admin_scripts/truncate.db2 script.

    This will surely solve your problem.

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to using setAutoCommit(false) in DB2 and MSSQL
    in DB2
    It would be helpful if you can provide some additional information like what is the problem that you are facing.

    1. Use 'db2level' command to get the database version.
    2. You can also refer to some of the samples that are shipped with DB2. You can find them at SQLLIB/samples directory.

    (I am sure I didn't answered ur question....... .. :( )
    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • I would strongly recomment you to visit SQLLIB/samples/ directory. Many samples in various languages are shipped with DB2. You will find samples for IBM cobol as well as mf cobol along with other languages.

    Let me know if you have any difficulties in accessing them.

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to DB2LOOK Privileges
    in DB2
    By the way, you can run db2look on a set of schemas as well. Maybe you can try excluding SYSCAT schema of possible.

    Complete syntax might help.
    http://publib.boulder. ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw .admin.cmd.doc/doc/r0002051.html
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to shell script to extract rows from table
    in DB2
    You can call EXPORT command from a shell script, EXPORT will write the table data into files.
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to How to get top 1000 rows
    in DB2
    You can use FETCH FIRST n ROWS ONLY clause.

    Code:
    SELECT EMPNAME, SALARY FROM EMPLOYEE
       ORDER BY SALARY DESC
       FETCH FIRST 100 ROWS ONLY

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Sybase to DB2 Migration
    in DB2
    Checkout this link, it will help you a lot.... (not sure if you already have it)

    http://www.ibm.com/developerworks/ondemand/migrate/db.html#sybase


    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • 1. If you want to make this new database as the standby for another server, then I am not sure if you can do this. The requirement for standby server is: it should have same configuration as well as the directory structure as primary.

    2. You can try "db2move" utility.

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to connect Z/OS database from windows
    in DB2
    You need to catalog the ZOS db on your windows machine. You can refer to the following commands:

    Code:
    db2 catalog tcpip node <name> remote <ip address> server <service> ostype mvs
    db2 catalog dcs database <dbname> as <dbname>
    db2 catalog database<dbname> as <dbname> at node <node-name> authentication DCS
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Creating a new Database
    in DB2
    The first thing that you have to do is to start the database manager. The error says: Database manager was not started. Use "db2start" command to start the database. Then use "CREATE DATABASE TEST" to create the database.

    If you want to play around with sample tables and sample data, then you can use "db2sampl" command. This will create a database with name "SAMPLE" and will create many tables...
    See more | Go to post

    Leave a comment:


  • You can follow these steps:
    1. If your stored procedure is in any external language like C, Java, cobol etc, then compile it and paste the object file in sqllib/functions directory.

    Recommended method: Go to sqllib/samples directory. Then go to the directory corresponding to the language in which you have written stored procedure. And give following command:
    bldrtn <filename> --- Filename should be without...
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to Variable as column or table name
    in DB2
    Yes, it is possible to have table/column names as variables. In that case, you will have to use dynamic statements to execute the commands. For example:

    Code:
        CREATE PROCEDURE test
        (IN tabname CHAR(6))
        LANGUAGE SQL
        BEGIN
        DECLARE stmt VARCHAR(1000);
    
        SET stmt = 'INSERT INTO '|| tabname || 'values (1)';
        PREPARE s1 FROM stmt;
        EXECUTE s1;
    ...
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to What is XML extender???????
    in DB2
    Prior to DB2 9.1, we needed XML extenders to deal with XML documents. It was an add-on product. Not with DB2 9.1, we don't need any extender. DB2 9.1 has powerful hybrid engine which is capable to handle XML and non-XML documents very efficiently.

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to define another default instance
    in DB2
    To set the default instance, you need to change the value of DB2INSTANCE variable.

    If you don't want to change it always, then you can go in System Properties--> environment variables and change the value of this variable. This will permanently change this value, so you don't have to set it every time you logs in.

    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:


  • sakumar9
    replied to deleting simillar rows
    in DB2
    You can try this stored procedure:

    Code:
    DROP PROCEDURE remove_duplicate @
    
    CREATE PROCEDURE remove_duplicate()
    LANGUAGE SQL
    BEGIN
    CREATE TABLE t1 LIKE a;
    INSERt INTO t1 SELECT DISTINCT(a) FROM a;
    DELETE FROM a;
    INSERT INTO a SELECT * FROM t1;
    END @
    Regards
    -- Sanjay
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...