While refreshing the table.

Database
N/A

While refreshing the table.

Hi All,

While deleting data from one my table, my application is not functioning (until new data is available). Can someone help me to find the best way to keep the data avilable to the system until new data is inserted into the table.

Thanks in advance,

Sri.

5 REPLIES
N/A

Re: While refreshing the table.

Sri,

What utility are you using?

Do you need to refresh the entire table or is just a subset actually new data?

RGlass

Re: While refreshing the table.

Sri,

In addition to RGlass' questions above...How big is the table? How many rows are you deleting? Are you using the PI values to select the rows for deletion? Are you deleting through a base view? if so, is the view prefaced with locking row for access?

Chewy

N/A

Re: While refreshing the table.

Hi RGlass,

We are not using any utility, we are just deleting all the data (delete from table) and then iserting new data into that table. During this period (i.e., after deleting and before inseting data), application is not functioning as the data is not available. It is functioning only after new data is inserted. Is there any way to make data available for the application until new data is inserted without much interruption.

Please advice.

Thanks,

Sri.

N/A

Re: While refreshing the table.

Hi Chew,

Its not a big table and rows are lesser than 100000, I'm deleting rows directly from base table (using delete from table command) without using any view.

Thanks,

Sri.

Re: While refreshing the table.

Sri,

There are a couple of wasy to do this, depending upon whether or not your app is using a view (it should be, according to TD best practices).  

presuming the table you want to refresh is named table_a

Create a second table, named table_x.

insert the new data into table_x

now you can either drop the old table, table_a,  and rename table_x to table_a, which is the simplest repeatable process to minimize your down time.

You could also mess around with repointing the view to the new table and simply dropping the old table...but that might be a bit more difficult to code...

-Chewy