Add DB Index with Drumping and Loading Data with dbreorg

Sort:
You are not authorized to post a reply.
Author
Messages
Randall
Veteran Member
Posts: 44
Veteran Member
    Hey all,

    We recently created a new database index to the APINVOICE table on our development system.  We ran the dbreorg as it normally would and, with the amount of invoices in the system, took about 16 hours to complete the dump, load, and creation of the index.

    We then needed to refresh our database and it cleared out in index again and needed to be recreated.  After checking out the manuals, it looked like dbreorg -F would take care of this for us.  Since we were only adding an index and not database fields, I didn't see the need to dump and load the data right back to where it was.

    However, when running this command, it again started dumping out data and then loading it again.  We're not about halfway through of a reorg that was kicked off last night (in Development thankfully).

    A long story short, is there a way to add an index and reorg the database without dumping and loading the table data?

    We're a Windows 2003 shop, SQL Server 2005, Apps 9.0.0.4, Environment 9.0.0.8 and NetExpress 5.

    I appreciate the help.

    Thanks,
    Randall
    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      It depends on what is in the index (e.g. conditional index actually adds a column to the table and includes that column in the index).

      To get around this, you would use bldmsf2000ddl to script the table and index creation (to a file, not "live" using the -U option!!). Then use that SQL in SSMS to (create and populate conditional index field if needed) create the index. Then use dbreorg -d to implement the updated index in the dictionary, but not touch the database. =
      Thanks for using the LawsonGuru.com forums!
      John
      Randall
      Veteran Member
      Posts: 44
      Veteran Member
        Hey John,

        Thanks for the reply.  I wasn't aware adding a conditional index would need to add a database column which is exactly what I was trying to add.  That's the root of my question and solves why the -F option didn't work when adding this index.

        I appreciate the response and will keep in mind that this will be a required step during our go-live with this project.

        Thanks again,
        Randall
        You are not authorized to post a reply.