Best sollution for date problem.

Hi guys.
I have a table with 100 000 items and it is growing with 50 rows per day. it has a lot of columns and two of them are:
expiration_date date,
status varchar2 (1) ---- A- active and N- Non active.
the expiration_date is a date.
80% of these have status = 'A' and expiration_date in future.
the problem is that I need to create a processes that changes the items status from A to N in exact expiration_date.
exact means: the exact time, or can be 10 minutes or one hour max after that date.
the expiration date can be put manually somewhere in future. when I reach this date, the item need to have the status changed to N.
I was thinking to create a job, that runs each minute. and select all items that are in status A and have expiration_date smaller than sysdate.
my select will be something like.
select * from my_table where expiration_date < sysdate and status = A for update.
for this I will create a composite index on (expiration_date and status).
is there a another solution? can I do something like a 'ticking bomb':) : when expiration_date is updated and set somewhere in future, to set a process that will take care to change the status when that time is reached. doing this I can avoid to scan the index (from the first solution) at every minute.
I use oracle 10G.
Thanks in advance.

alinux wrote:
Hi guys.
I have a table with 100 000 items and it is growing with 50 rows per day. it has a lot of columns and two of them are:
expiration_date date,
status varchar2 (1) ---- A- active and N- Non active.
the expiration_date is a date.
80% of these have status = 'A' and expiration_date in future.
the problem is that I need to create a processes that changes the items status from A to N in exact expiration_date.
exact means: the exact time, or can be 10 minutes or one hour max after that date.
the expiration date can be put manually somewhere in future. when I reach this date, the item need to have the status changed to N.
I was thinking to create a job, that runs each minute. and select all items that are in status A and have expiration_date smaller than sysdate.
my select will be something like.
select * from my_table where expiration_date < sysdate and status = A for update.
for this I will create a composite index on (expiration_date and status).
is there a another solution? can I do something like a 'ticking bomb':) : when expiration_date is updated and set somewhere in future, to set a process that will take care to change the status when that time is reached. doing this I can avoid to scan the index (from the first solution) at every minute.
I use oracle 10G.
Thanks in advance.The BEST solution would be to modify the app so it doesn't rely on a "status" that is derived from a date. Why doesn't the app already know this:
if expiration_date < sysdate
   status is active
else
   status is non active
end ifUse of a data element (in this case STATUS) that can be derived from another data element (in this case EXPIRATION_DATE) is a violation of basic data design 101.

Similar Messages

  • TA24002 My 500 GB can't verify nor repair. I have photoshop work that I need to recover. I would like to know which erase option would be the best solution for this problem.

    My 500 GB can't verify nor repair. I have photoshop work that I need to recover. I would like to know what option would be the best solution for this problem?

    You appear to have two issues: 1) a hard drive that is not working properly and 2) files you wish to recover.
    Re 1) you need to answer Kappy's questions.
    Re 2) does the drive load and can you see your photo files? If so can you copy them to another drive?
    Do you not have a backup of the photo files?

  • I have problems in the initiation of the Encore process when opening presents the following error message : "Encore CS6 Cannot Run in Non-Royalty Serialized".... What is the best solution for this problem ?

    Help Me.
    What is the best solution for this problem ?

    Encore is activated when you activate Premiere Pro... so, as Stan asked, how did you install P-Pro?
    Ask for serial number http://forums.adobe.com/thread/1234635 has a FAQ link
    -and a fix for Encore http://forums.adobe.com/thread/1421765?tstart=0 in reply #7
    -plus more Encore http://helpx.adobe.com/encore/kb/cant-write-image-fie-larger1.html

  • Best practice for data migration install v1.40 - Error 2732 Directory manag

    Hi
    I'm attempting to install SAP Best Practice for Data migration 1.40 on Win Server 2008 R2 (64 bit).
    Prerequisite error
    Installation program stops with missing file error
    The following file was not found
    ... \migration\InstallationWizard\BusinessObjects Data Services\setup.exe
    The file is necessary for successful installation. Please connect to internet or refer to Quick Guide (available on SAP note 1527151) for information regarding the above file.
    Windows installer log displays
    Error 2732 Directory Manager not initialized
    SAP note 1527151 does not exist or is internal.
    Any help appreciated  on what is the root cause of the error as the file does not exist in that folder in the installation zip file.
    Other prerequisite of .NET 3.5.1 met already.
    Patch is released since 20.11.2011 so I presume that it is a good installation set.
    Thanks,
    Alan

    Hi Alan,
    There are details on data migration v1.4 installations on SAP website and market place. The below link should guide to the right place. It has a power point presentation and other useful links as well.
    http://help.sap.com/saap/sap_bp/DMS_V140/DMS_US/html/index.htm
    Arun

  • Best  Course  for Data Warehousing

    Hi,
                I am planning to join data warehousing course .I heard there is lot courses in data warehousing .
    Data warehousing with ETL tools or
    Data warehousing with Crystal Reports or
    Data warehousing with Business object or
    Data warehousing with Informatica or
    Data warehousing with Bo-Webel or
    Data warehousing with Cognos or
    Data warehousing with Data Stage or
    Data warehousing with MSTR or
    Data warehousing with Erwin or
    Data warehousing with oracle.
    Please suggest me which best to choose and  which have more scope because I  don't know  the ABC of data warehousing  but I have some experience in oracle.
    Is it must that I need work experience in data warehousing  then only can get a job ?Please tell me which is the best book for data warehousing which should start from scratch.  Please  give your suggestions about to my queries.
    Thanks & Regards,
    Raji

    Hi,
    Basically Datawarehouse is a concept.To develop DW , we need two tools mainly. One is ETL tool and other one is Reporting tool .
    The few famous ETL tools are
    Informatica
    Data Stage
    Few famous Reporting tools are
    Crystal Reports
    Cognos
    Business object
    As a DW developer you should aware of atleat one ETL tool and atleat one Reporting tool.The combination is your choice.It better to finout the best combination in point of job market , and then learn them.
    Erwin is Datamodel tool. It can aslo be used in DW implementation. You have already have experience on ORacle,So my adivce is go for Data warehousing with oracle or Data warehousing with Informatica .And learn one reporting tool.I donot is there any reporting tool available from ORACLE.
    My suggestion on books.
    Fundamentals of Datawarehouse by PaulRaj Ponnai and
    Datawarehouse toolkit.
    http://www.inmoncif.com/about.html is one of the best site for Datawarehouse.
    With rgds,
    Anil Kumar Sharma .P
    Assigning points is the way to say thanks in SDN site.

  • SAP Best Practices for Data Migration :repositories only on MS SQL Server ?

    Hi,
    I'm implementing the "SAP Best Practices for Data Migration" (see https://websmp109.sap-ag.de/bp-datamigration).
    As part of the installation you have to install MS SQL Server Express Edition. The installation guide contains detailed steps to do this. All repositories for Data Services should be running on SQL Server, according to the installation guide.
    The customer I'm working for now does not want to use SQL Server, but DB2, as company standard.
    So I use DB2 for the local and profiler repositories.
    I notice however that the web application http://localhost:8080/MigrationServices does not support DB2.The only database type you can select in the configuration area is MS SQL Server.
    Is this a limitation, a by design ?

    Hans,
    The current release of SAP Best Practices for Data Migration, v1.32, supports only MS SQL Server.  The intent when developing the DM content was to quickly set up a temporary, standardized data migration environment, using tools that are available to everyone.  SQL Server Express was chosen to host the repositories, because it is easy to set up and can be downloaded for free.  Sone users have successfully deployed the content on Oracle XE, but as you have found, the MigrationServices web application works only with SQL Server.
    The next release, including the web app, will support SQL Server and Oracle, but not DB2.
    Paul

  • Best practices for data migration

    Hi All,
    This thread is useful for those who can use their opportunity to share the ideas and knowledge for making better and best use of data migration using Business Objects Data Services.

    Hans,
    The current release of SAP Best Practices for Data Migration, v1.32, supports only MS SQL Server.  The intent when developing the DM content was to quickly set up a temporary, standardized data migration environment, using tools that are available to everyone.  SQL Server Express was chosen to host the repositories, because it is easy to set up and can be downloaded for free.  Sone users have successfully deployed the content on Oracle XE, but as you have found, the MigrationServices web application works only with SQL Server.
    The next release, including the web app, will support SQL Server and Oracle, but not DB2.
    Paul

  • MMy iPhone 4s is struggling to send messages and dial out.. service is going back and forth between Verizon with a little circle, Roaming, and No Service.. Best fix for this problem..? Thanks

    My iPhone 4s is struggling to send messages and dial out.. Service is going back and forth between Verizon (with a little circle), Roaming, and No Service.. Best fix for the problem..?
    Thanks

    My iPhone 4s is struggling to send messages and dial out.. Service is going back and forth between Verizon (with a little circle), Roaming, and No Service.. Best fix for the problem..?
    Thanks

  • What is teh best solution for my Problem??

    hello everyone
    i'am planing to develop a Patient Management System (PMS)
    since i 'm not that guru in the J technologies i would like you to get me some help with this decision:
    what is the best solution for developeing an intranet "PMS" which should handles data (connection to postgresql) and runs some algorithm (for planing puropose) im background ??
    1 developeing a web based solution (servlet and jsp and and ..)
    2 developeing an application wich will be manging everything ??? (a kind of programm with its own GUI)
    3 you may have an other idea solution and ill be gald for any advices
    ps sorry for my english its not that great ;)

    Web applications are all the rage these days and IMO rightly so as they greatly reduce deployment cost and headaches.
    They do have some drawbacks though which for you might be important.
    I can imagine that sooner or later (probably sooner in my experience) a requirement to interface with hardware installed on the client machines will emerge.
    Whether this is a barcode scanner or a chipcard reader to get client information from some form of card issued to the client, or maybe a label printer to print out labels for medication bottles doesn't matter, you need to access the client machine directly.
    Web applications have great difficulty with that (in fact, it's all but impossible).
    You could go for an applet solution but that's contrived at best and still leaves the same problems.
    So in your situation an old-fashioned client/server application (maybe using web services to communicate with the serverside application) is likely the best longterm solution.
    You'd have the database remote so everyone has access to the same data, being accessed through processes run on the server and called by the clients. These can also do most of the business logic, leaving the clients relatively dumb responsible mainly for data validation and entry and presentation of the results.

  • Best Practise for Data Refresh & Hierarchy

    Hi,
    During a recent discussion with one of our BI user groups, the questions were raised as what the best practice are to handle the following two issues.
    Issue 1:
    If entries are posted to the prior periods in SAP R/3 (outside of the daily auto-refresh range), the current process is that the user group will ask us to conduct a manual refresh in BI for the prior periods which are effected.
    Question: Is it possible to set up a trigger in the system, so that BI knows which periods are changed and automatically refreshes data for those periods?
    Issue 2:
    If a hierarchy used in the reports is modified, there might be an adverse impact on the financial data the user group reports. The current process we have in place is to run a group of BI reports for both current year and prior year to make sure nothing is impacted, but there is limitation to this current process. What if there is no impact on current or prior year, but on the years prior to that?
    Question: What other global companies do to minimize such reporting impact, especially when they have hundreds of complex reports?
    If someone has any info on this, help me in sharing the same.
    Thanks all for your support.
    Regards,
    Murali

    Hi Srini,
    1. SAP suggestes to implement data archiving strategy  as early as possible to manage database growth .
    However pople think of archiving when they realise the  problems like large data volumes,slow system resonse time,performance issues etc...
    2. There is a proper way to implement Data Archiving . Database has to be anaylzed first for getting the top DB tables and Archiving objects.
    3. Based on the DB analysis ,Data archiving plan has to be implenemted according to data management guide.
    4. There is a minimum period known as residence time has to be completed before any data to be archived. Once the document is business completed and serverd its minimum required period in the Database ,it can be archived.
    5, Before going for data archiving there are many steps to be followed like analysis,configuration etc that you can see in details at the link below :
    http://help.sap.com/saphelp_47x200/helpdata/en/2e/9396345788c131e10000009b38f83b/frameset.htm
    let me know if this helps you .
    -Supriya
    Edited by: Supriya  Shrivastava on May 4, 2009 10:38 AM

  • Locale for Date Problem.

    Hi all,
    I am using following code:
    SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yyyy hh:mm aa");
    Date date=new Date();
    String ls_dateTime=sdf.format(date);
    It is working well. My problem is that I want to change Locale for date as Japanese. But I had problem on new SimpleDateFormat("dd/MM/yyyy hh:mm aa");
    This aa is used to tell that am or pm. Probs is there. [am or pm] which is not correctly displayed.Please tell the solution.

    alinux wrote:
    Hi guys.
    I have a table with 100 000 items and it is growing with 50 rows per day. it has a lot of columns and two of them are:
    expiration_date date,
    status varchar2 (1) ---- A- active and N- Non active.
    the expiration_date is a date.
    80% of these have status = 'A' and expiration_date in future.
    the problem is that I need to create a processes that changes the items status from A to N in exact expiration_date.
    exact means: the exact time, or can be 10 minutes or one hour max after that date.
    the expiration date can be put manually somewhere in future. when I reach this date, the item need to have the status changed to N.
    I was thinking to create a job, that runs each minute. and select all items that are in status A and have expiration_date smaller than sysdate.
    my select will be something like.
    select * from my_table where expiration_date < sysdate and status = A for update.
    for this I will create a composite index on (expiration_date and status).
    is there a another solution? can I do something like a 'ticking bomb':) : when expiration_date is updated and set somewhere in future, to set a process that will take care to change the status when that time is reached. doing this I can avoid to scan the index (from the first solution) at every minute.
    I use oracle 10G.
    Thanks in advance.The BEST solution would be to modify the app so it doesn't rely on a "status" that is derived from a date. Why doesn't the app already know this:
    if expiration_date < sysdate
       status is active
    else
       status is non active
    end ifUse of a data element (in this case STATUS) that can be derived from another data element (in this case EXPIRATION_DATE) is a violation of basic data design 101.

  • Best strategy for data definition handling while using OCCI

    Hi, subject says all.
    Assuming to use OCCI for data manipulation (e.g. object navigation), what's the best strategy to handle definitions in the same context ?
    I mean primarily dynamic creation of tables and columns.
    Apparent choices are:
    - SQL from OCCI.
    - use OCI in parallel.
    Did I miss anything ? Thanks for any suggestion.

    Agreeing with Kappy that your "secondary" backups should be made with a different app. You can use Disk Utility as he details, or a "cloning" app such as CarbonCopyCloner or SuperDuper that can update the clone periodically, rather than erasing and re-copying from scratch.
    [CarbonCopyCloner|http://www.bombich.com> is donationware; [SuperDuper|http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html] has a free version, but you need the paid one (about $30) to do updates instead of full replacements, or scheduling.
    If you do decide to make duplicate TM backups, you can do that. Just tell TM when you want to change disks (thus it's a good idea to give them different names). But there's no reason to erase and do full backups; after the first full backup to each drive, Time Machine will back up only the changes made since the last backup +*to that disk.+* Each is completely independent.

  • Table Onwers and Users Best Practice for Data Marts

    2 Questions:
    (1)We are developing multiple data marts that share the same Instance. We want to deny access to the users when tables are being updated. We have one generic user (BI_USER) with read access through one of the popular BI Tools. The current (first) data mart we denied access by revoking the privilege to the BI_USER, however going forward with other data marts the tables will get updated on a different schedule and we do not want to deny access to all the data marts. What is the best approach?
    (2) What is the best Methodology for table ownership of tables in different data marts that share tables across marts? Can we create one generic ETL_USER to update tables with different owners?
    Thanx,
    Jim Masterson

    If you have to go with generic logins, I would at least have separate generic logins for each data mart.
    Ideally, data loads should be transactional (or nearly transactional), so you don't have to revoke access ever. One of the easier tricks to accomplish this is to load data into a shadow table and then rename the existing table and the shadow table. If you can move the data from the shadow table to the real table in a single transaction, though, that's even better from an availability standpoint.
    If you do have to revoke table access, you would generally want to revoke SELECT access to the particular object from a role while the object is being modified. If this role is then assigned to all the Oracle user accounts, everyone will be prevented from viewing the table. Of course, in this scenario, you would have to teach your users that "table not found" means that the table is being refreshed, which is why the zero downtime approach makes sense.
    You can have generic users that have UPDATE access on a large variety of tables. I would suggest, though, that you have individual user logins to the database and use roles to grant whatever ad-hoc privileges users need. I would then create one account per data mart, with perhaps one additional account for the truely generic tables, that own each data mart's objects. Those users would then grant different roles different database privileges, and you would then grant those different roles to different users. That way, Sue in accounting can have SELECT access to portions of one data mart and UPDATE access to another data mart without granting her every privilege under the sun. My hunch is that most users should not be logging in to, let alone modifying, all the data marts, so their privileges should reflect that.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • JPA - Best Practice For Data Transfer?

    I've been considering an alternative method for data transfer between applications, by using Serialized or Encoded to File JPA Entities. (either Binary or XML)
    I know this procedure may have several draw backs as compared to traditional exported SQL queries or data manipulation statements, however, I want to know if anyone has considered or used this process for data transfer?
    The process would be to
    - query the database and load the JPA Entities
    - Serialize or Encode them to file
    - zip up the entire folder with the JPA entities
    - transfer the data to destination machine
    - extract the data to a temp directory
    - reload the JPA entities by de-serializing and persisting them to the database
    The reason I'm considering this process, is basically because I have a desktop application (manages member records, names, dates, contributions, etc) used by different organisations in different locations (which are not related except by purpose ie clubs or churches) and would like to have a simple way of transporting all data associated with a single profile (information about a member of the organisation) from one location to another in a simple way, ie users interact only with the application without the need for any database management tool or such.
    I'm also considering this because it is not easy to generate an SQL Script file without using a dedicated Database Management Tool, which I do not want the application users to have to learn how to use.
    I would appreciate ANY suggestions and probable alternative solutions for this problem. FYI: I'm using a Java DB database.
    ICE

    jschell wrote:
    In summary you are moving data from one database to another. True
    You only discussed flow one way. Well the process is meant to be bi-directional. Basically what I envision would to have something like:
    - the user goes to File -> Export Profile...
    - then selects one or more profiles to export
    - the export process completes and the zip archive is created and transfered (copied, mailed, etc) to the destination location
    then on the destination pc
    - the user goes to File -> Import Profile
    - selects the profile package
    - the app extracts, processes and imports the data (JPA serialized for example)
    Flow both ways is significantly more complicated in general.Well if well done it shouldn't be
    And what does this have to do with users creating anything?Well as shown above the user would be generating the Zip Archive (assuming that is the final format)
    Does this make the problem clearer?
    ICE

  • Custom InfoObject for date, problem with offset

    Hi all,
    I have a BEx reports presenting 0CALWEEK and another IO I created for dates.
    This IO has the same properties as 0CALWEEK (but it was not created as a reference of 0CALWEEK).
    In my report I'd like to use offsets for both IO's.
    It works perfectly for 0CALWEEK, but it doesn't work at all for the other IO. Actually, only the first offset is shown. For all others weeks, I get "#".
    Additionally, I made some calculations based on the week difference (using formula variables). Of course, every time a "#" appears, the calculation cannot be done (otherwise it works like it should).
    Could anybody help me out with this?
    Thanks in advance

    Hi Jagadeesh,
    did I understand you correctly that:
    1) offsets only work with standard characteristics? (this seems really weird to me...)
    2) if I want to use offsets with with Z_* characteristic, I will need ABAP?
    The problem is that I don't know anything about ABAP.
    Do you know any "typical" code to use to resolve this type of problem?
    Where do I have to use this code: in the query, in the IO, in a start routine somewhere?
    Thanks

Maybe you are looking for

  • Oracle 9i Report service

    Does anyone have any knowledge of 9i Report Service? Our intention is to provide web based reporting to our users with ability to control their access and remove their dependency of having connected to the network. We want our users to have global ac

  • "Unable to download" error in iTunes iPod touch 5G

    I began to download a song, and suddenly an error came up saying it was unable to download. I tried resetting my iPod, sliding from the left, and the right to delete, nothing worked. Please, help! I am on iOS 7.0.4, if that helps. Thank you!

  • MSS - compensation planning - compensation profile page

    Dear All, I have a question regarding a simple customization of a Standard SAP content page. In the Compensation Planning iview, after the search is done a list of employees is displayed. Then single employee name is selected, and new window is launc

  • Export render video Quicktime ?

    When export rendering from photo-shop cs4 as a QT H.264 one of the settings is for  digits which for me automatically opens as 4 followed by Ex: File0000.jpg, my question therefor  is,"what is the  definition/benefit of digits, how does the setting b

  • 10g cluster installs

    All, I am having problem on getting installation of 10g cluster stared. I am installing CRS on the cluster, the first node install successfully. But the second node is hanging on "root.sh" script: Running Oracle10 root.sh script... \nThe following en