Interesting Situation Regarding OLE

Hi professional
I have two blocks on my form
1) order 2) item
Order is a master block containg fields
order_id, customer_id,date_order,date_shipped,sales_rep_id,total,payment_type,order_filled
Item is a detail block containing fields
order_id,item_id,product_id,price,quantity,
quantity_shipped
now the problem is that
i want to dump all the data of these blocks in an excel file on such a way that , data of master block dump in a seperate sheet where as data of detail block in seperate sheet.
I'll be very thank ful to you people if one can send me the proper sample code
Thanx in advance

INCLUDE ole2incl.
DATA: application TYPE ole2_object,
       workbook TYPE ole2_object,
       sheet TYPE ole2_object,
       cells TYPE ole2_object,
       gs_chart TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
CREATE OBJECT application 'excel.application'.
    SET PROPERTY OF application 'visible' = 1.
    CALL METHOD OF application 'Workbooks' = workbook.
*CALL METHOD OF workbook 'Add'. "if you want to create a file
    CALL METHOD OF workbook 'Open'
      EXPORTING
        #1 = p_file.
         #1 =    'C:\Temp\XXX0099_Support_20XX.xls'.  "your excel file
                                                           name here
Create second Excel sheet  "Timesheets
    CALL METHOD OF application 'Worksheets' = sheet
      EXPORTING
        #1 = 2.
    SET PROPERTY OF sheet 'Name' = 'Timesheets'.
    CALL METHOD OF sheet 'Activate'.
    CLEAR: w_index.
    SORT itab BY budat hiden.
    LOOP AT itab.
      w_index = sy-tabix + w_lin.
      CALL METHOD OF application 'Cells' = cells
        EXPORTING
          #1 = w_index      " line
          #2 = 1.           " column
      SET PROPERTY OF cells 'Value' = itab-hiden .  "need to be changed
Save excel spreadsheet to particular filename
    CALL METHOD OF sheet 'Save'   "'Save'
      EXPORTING
   #1 = p_file
        #1 =  p_file
        #2 = 1."filename
    "fileFormat
Closes excel window, data is lost if not saved
SET PROPERTY OF application 'visible' = 0.
reward points if its helpful

Similar Messages

  • Interesting scenario regarding billing

    Hello Experts,
    I have an interesting scenario regarding invoice block.
    The invoices are posted but blocked on perticular date.
    Could anybody please help  with  what could be the reason for this block and how this can be avoided in the future?
    Kindly throw some light about the tolerance limit set for the invoices.
    Awaiting your valuable inputs as early as possible.
    Thanks in advance for help.
    Regards,
    Psm.

    Hi,
    Your query is not clear.
    Can you explain further when the invoices are posted and when the invoices are blocked.
    Regards,
    VNR

  • Regarding OLE Excel

    Hi gurus,
    I am creating Excel file passing values to different sheets A,B,C from internal table.
    But when my program is under execution, if i try open new excel sheet then datas are getting written into new sheet. so the out put of real excel sheet is different from as expected.
    Do i have to maintain any property in OLE excel to avoid this situation. because i want to open some other excel file, while my program is executing with OLE excel creation.
    Regards
    Ambichan

    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
           workbook TYPE ole2_object,
           sheet TYPE ole2_object,
           cells TYPE ole2_object,
           gs_chart TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    CREATE OBJECT application 'excel.application'.
        SET PROPERTY OF application 'visible' = 1.
        CALL METHOD OF application 'Workbooks' = workbook.
    *CALL METHOD OF workbook 'Add'. "if you want to create a file
        CALL METHOD OF workbook 'Open'
          EXPORTING
            #1 = p_file.
             #1 =    'C:\Temp\XXX0099_Support_20XX.xls'.  "your excel file
                                                               name here
    Create second Excel sheet  "Timesheets
        CALL METHOD OF application 'Worksheets' = sheet
          EXPORTING
            #1 = 2.
        SET PROPERTY OF sheet 'Name' = 'Timesheets'.
        CALL METHOD OF sheet 'Activate'.
        CLEAR: w_index.
        SORT itab BY budat hiden.
        LOOP AT itab.
          w_index = sy-tabix + w_lin.
          CALL METHOD OF application 'Cells' = cells
            EXPORTING
              #1 = w_index      " line
              #2 = 1.           " column
          SET PROPERTY OF cells 'Value' = itab-hiden .  "need to be changed
    Save excel spreadsheet to particular filename
        CALL METHOD OF sheet 'Save'   "'Save'
          EXPORTING
       #1 = p_file
            #1 =  p_file
            #2 = 1."filename
        "fileFormat
    Closes excel window, data is lost if not saved
    SET PROPERTY OF application 'visible' = 0.
    reward points if its helpful

  • Quite interesting situation....

    Hey guys, so I have an older LGA 775 Intel processor for my desktop and I am having a little situation: Modern computer monitors do not work. I have tried using a workstation graphics card (Quadro 600) and I have tried using a consumer graphics card (NVidia
    8400) along with DVI cables, VGA cables, mini display port, display port, cable adapters, and I have had no luck on my Dell 4k monitor I just purchased for Christmas nor my Plasma television. I have had some luck on my plasma but the only way I can see my
    computer screen on my plasma is if I have my old monitor connected to the same video card. While my old monitor and my plasma are connected to the same video card, the plasma works, but as soon as I disconnect my older monitor, the plasma video output shuts
    down.
    I want to be able to just use my plasma as my display or my 4k monitor as my main display, but I am not having any luck. Yes, I have made sure all drivers and firmware's are up to date as well.
    please provide me some feedback, I want to get this resolved!

    Hi Andy,
    Please refer to your graphics card manufacturers and make sure that Max resolution and GPU specification are supporting for 4K Resolutions.
    4096x2160 (4K), 3840x2160 (4K UHD)
    Meanwhile, since there are a few compatibility issues about NVIDIA software and DELL 4k monitors , please check the issues with manufacturers too.
    About your plasma TV, I suppose you were using digital import such as HDMI port of your TV, when you use your TV as a monitor, the Plug and Play of your graphic card might be a problem. When your TV plug in, graphic card will read the best setting for that
    device, but when the setting suddenly changed, the TV connection might be Interrupted.
    Please try to set your TV to primary monitor in Windows screen resolution setting by right clicking desktop.
    Boot your computer in this order:
    Turn your TV on
    Set your TV import channel to HDMI or any channel you want
    Boot your computer
    You might not change your screen settings when you are using your TV as primary monitor 
    Regardsd
    DiWuNewFolder

  • One interesting situation when using hint

    Hi All,
    I have a SQL looks like
    select
    from
    where column in (select /*+ unnest*/ column
    from ....
    where
    I noticed that both unnest and no_unnest hint would lead to good execution plan. But if I removed the hint, the plan changed dramatically and this SQL would run much longer.
    My question is unnest and no_unnest seem to be exculsive to each other. Why did both of them work here ?
    Does anybody have some idea?
    Best regards,
    Leon

    My question is unnest and no_unnest seem to be exculsive to each other. Why did both of them work here ?I would wonder the same thing.
    I am thinking that the query transformations in each case - UNNEST, NO_UNNEST, and without both - are all different. One is probably more efficient than another but I can't tell from what you have posted so far.
    What are the execution plans in each case?

  • An interesting situation

    This is interesting. I'm attempting to download the
    orafw firewire drivers for RedHat Linux. After going
    through the download page and clicking on 'I Accept',
    the next page that comes up basically says - Sorry, but
    you may have received this in error if using a browser
    other than Internet Explorer or Netscape. Neither of
    these browsers currently ship with RedHat Linux. Well,
    you get the picture - I really would like the download, but
    I cannot download it with the OS that it is intended for.
    Is there another location from which to download?
    Thanks for your time.
    Greg Mekkes

    Update - found a machine with Netscape and tried again,
    but the result is the same. Is there a direct ftp site?

  • Interesting Situation Between LR and Bridge

    I was finishing up a job which I had started in ACR, and needed to create two sub-folders, so I did it in Bridge. When finished, I wanted to see how LR Slide Show looked, but when I opened that same folder of originals in LR, there was no sub-folders! I opened and closed LR, rechecked in Bridge and Explorere, there were indeed the sub-folders, but not in LR. To complicate matters, I opened a folder of images created long before I started the free trial, which included subfolders, and they were all present in LR.
    The solution was to re-import the folder for which I created the subs. Seems rather silly, imo.If you have a folder that both LR and Bridge see, and create sub-folders in Bridge, LR will not see them.
    While I am at it, why do I need to double import a set of images before LR will acknowledge their presence? You can imagine my frustration at the first day when I dutifully imported the images, after finding out I had to use the Import command, but still no files showing in LR. Only after clicking Import again on the same images did they show up in LR.
    Look, I have a fistfull of folders in my G drive. Bridge finds them, just by finding the drive. LR doesn't.
    It's beginning to look like a deal breaker for me, except I can really use the database. I need total bi directionality. No favored path between them, no one-way streets!

    I still would like to know what happened to the .xmp files along the way. It's also interesting that there are two processes out there that, along the way, drop the .xmp's and one of them is a photoediting program!
    Go figure!
    Ok, after writing the above, I thought: "No, that's not right. Go back and check".
    So I did, and things got worse! I picked, in LR, an image that hadn't been tweaked. It came up saying "The file named xxxx_258 is off line or missing". All the menus in develop are greyed out. Yet in Explorer, there it is, big as life and clicking on it opened it in ACR. Now the tutorial Geoff linked to in the basic tutorial made the point that the files are not in LR (they aren't in Bridge either) but they are in the OS. Just open Windows Explorer and you will see them (paraphrasing here). Yep, they are, Bridge finds it, it opens in ACR right from Explorer, but LR says it is off line.
    Instant insanity!
    And yes, the .xmp files are all there, from LR and from ACR.  In Explorer.
    But wait! There's more!
    I found out that LR will NOT necessarily open a file which was tweaked in ACR and read the sidecar and apply it. What I did was to open another folder with no adjustments to any file present. I tweaked the first image in LR, the second in ACR. Sure enough, ACR did not see the LR with it's tweaks. It ignored the side car. However, this time, LR did not see the ACR file either. LR ignored the side car, just as ACR did. Yet, go back to an ACR file before installing LR, and LR reads those images and includes the side car.
    Now these images, like all of them so far, have been uploaded from a card reader, using Bridge as the path. Might that have something to do with it? I'll try an upload using Explorer and see.
    Steps to reproduce the findings:
    Find a folder of images which haven't been tweaked. Open A in LR, make a noticeable adjustment. Open B next  in ACR  do the same thing. Compare the set first in LR and in Bridge.
    Expectations: In LR, both A and B are seen adjusted. In Bridge , only B will look adjusted. Result, neither sees the other's adjustments.

  • An interesting situation with XML

    Hi,
    I have an XML from where my application receive data. Now, at
    runtime using back end tachnology, i am updating the XML file. and
    i want to see the changes will reflect in running application..?
    I am not sure is it possible or not ?
    But, still if any one can help !!

    reload your xml using a changing query string so the xml file
    is not retrieved from your browser's cache.

  • Interesting article regarding Helix and Haswell

    and some benchmarks at the end.
    http://www.afr.com/f/free/technology/digitallife/lenovo_tiny_new_thinkpad_may_be_YqHFwrGrTODxvnDLhuy...

    stso9daa, with respect, I think you're retort misses the mark. First of all, the credit given by the review was in my opinion thin cover for a very empty set of criticisms. Second, their critique centered around the strategy of the device's timing, and not around features or execution, which are issues that you are pointing to personally. Third, your complaints and the evidence to support them (citing first adopters' issues with device), are inconclusive and frankly not proven to be any substantially worse than when Apple releases new devices that contain flaws.
    In fact the point of my gripe is that companies like Apple and Google are constantly releasing deeply flawed products, and yet are still given dozens of passes by the same types of "journalists".
    The fact is that the media is prone to the same kind of group think that all humans are, and Apple and Google's success has been as much about marketing as substance. Companies like Lenovo and Microsoft may indeed drop the ball on releases, but they're not given the benefit of the doubt that their "cooler" competitors are.
    I am not a Helix fanboy (yet). Mine sits unpacked after arriving today. I have yet to judge it on a personal basis. But as this article was about the device specs and strategy, it was deeply biased and used very cheap tactics to cover that bias. It was a fail.

  • Very interesting observation regarding speed

    I have a Toshiba PCX2000 cable modem. Using the Express with this cable modem, I was downloading the OS 10.4.4 combo update at around 250-300kbs. I thought it would be faster than that. I then realized that the cable modem ethernet interface is 10base T. I was using a 100base T cable to connect them. So I switched the ethernet cable to 10 base native to the cable modem. Downloaded the file again and this time I was hitting well over 650 to 700kbs... much better.
    I think its time to get a new modem with a faster ethernet interface to take full advantage of the Airport Express Wireless G speeds.

    Did I understand correctly - that a "10BaseT" cable provided you with a faster connection than a "100BaseT" cable? The most likely reason for this happening - the "100BaseT" cable is bad. It could be either miswired or have a poor internal connection - all issues which can still allow it to work, pass a DC conductivity test, but provide poor performance.

  • Was just told some interesting information regarding preorder and full retail price by a VZW Rep

    Just got off the phone with a rep on 611 who confirmed if you preorder you will receive the phone ON OR BEFORE the 10th. Now for those looking to purchase at full retail price, you will have to wait until the 28th. Don't shoot the messenger

    VZWSWAG wrote:
    I am only telling you all what i was told by this one rep. Why would I make this up? I personally do not even believe it. At first the rep told me that if you preorder you wont get it until the 28th, then i went back and forth with her saying how that sounds rediculous. Eventually she spoke to someone else (i think supervisor) and corrected herself by saying if you want to pay full retail you have to wait until the 28th.
    Ok I don't think you're making it up. Sorry. It's not anyones fault here that they're being misinformed. Like you said you don't believe it either. But, cmon it's ridiculous.
    Anyone here ever work as a CSR? I have for a U.S. major bank  about 6 years ago. Here's how it works:
    In fairness it's not REALLY the CSR's fault...
    Any time there is some type of new promotion, thye herd in groups of CSR's at a time and they have a real brief meeting ("training") which barely covers the basics. They do this for 2 reasons.
    1- Time is money and they lose money having reps off the phones. They cover the basics have a quick Q&A and then get them back to work. They are given, in reality, inadequate info. Basically just enough to be dangerous. LOL. This is TRUE!
    2- The corporate suits purposely do not give the CSR's all the info. They don't want them spilling the beans and causing problems. Which in turn can cause even more problems. 
    Now that causes THIS to happen:
    A customer calls in about the new promotion. They ask a specific question the CSR has no clue about how to answer. CSR does not want to sound stupid and literally just flubs his way through it rather than saying "I don't know".
    Every CSR within hearing range, hears what that CSR just said and thinks "Cool", they start telling the same **bleep** to customers. By the end of the day EVERYONE believes it is FACT and uses it. Over time like any other tall tale or rumor it takes on a life of it's own.
    Floor supervisors are in the same boat. They have maybe a TINY bit more info but, not much at all. They're asked a question they panic and literally make something up for the CSR to feed the customer.
    It's actually an insane environment. I'm glad I don't have to do it any more.  But, the above scenarios I described happen every single minute of the day.
    And then you have the really unethical sales reps who will slam you into an upgrade or "after-sale" to inflate his/her stats. That doesn't happen as much as it used to but, still does.
    If you want the real answers, asked to be transfered to the supervisors, supervisor. Or possibly Retention. 

  • Interesting situation, iPhone 5 stolen.

    Problem is I had just had this iPhone switched out with an old one because the screen on the old phone had shattered. This phone was on the restore screen, but I didnt have wifi. The phone was never restored. My questions are;
    1.What could someone who came upon my phone do from this screen?
    2.Could they wipe it and use it as their own?
    3.Could they restore from their own apple ID with my sims card in there?
    4.Would they have to restore my iCloud to move forward, meaning I could catch them on Find my iPhone?
    Something I have conflicting opinions on, I called a couple of apple stores and spoke to geniuses, one said the serial number could only help if the theif tried to pawn it, one said I could call Verizon and give them the serial number, report it missing, and it would be rendered useless to the thief. Anyone know the truth?

    1) Restore it
    2) Yes
    3) Yes.  They would likely remove your SIM and replace with their own.
    4) No.  They can restore and use as their own.
    You would have to Ask Verizon if they have  ablacklist ofr stolen phones.  They cannot render it useless, but they could put it on a list so that the thief could not sign up for Verizon wireless service using the stolen iphone.

  • What is the current situation regarding Presentation support with Lync Interoperability?

    From what I understand this is currently only one way from Cisco to Lync, is this correct?  If so is this in development?

    Yes, it only works the one direction, presenting to Lync, not presenting from Lync.
    The fix for the opposite direction is highly likely to be in development (by both Microsoft and Cisco), but it's unlikely that you'll get any official response in a public forum.  If you're looking for roadmap, or future feature information, your best best is to have an NDA discussion with your local Cisco Account Team or Microsoft.
    Wayne
    Please remember to rate responses and to mark your question as answered if appropriate.

  • Interactive Report "in" filters do not maintain trailling spaces

    I recently came across an interesting situation regarding interactive reports and "in" filters. When building the in list through the filter wizard, any trailing spaces in the column data is trimmed, which leads to inaccurate report results. This doesn't happen on a "=" filter, it seems limited to "in" filters.
    I have an example here: http://apex.oracle.com/pls/apex/f?p=39226:1
    If you click on the "=" filter you'll see the one record with the trailing space is properly displayed. Clicking on the "in" filter and no records are displayed.
    In my particular case, the trailing space shouldn't have been in the data, so I was able to update the table and the filters worked, but if the trailing space was important then the "in" behavior would be troublesome.
    Tony

    Well, considering the fact that there is a space in the data, and NOT in your in clause I bet, then what is the problem??
    Thank you,
    Tony Miller
    Webster, TX
    You know, I used to think that it was awful that life was so unfair. Then I thought, wouldn't it be much worse if life were fair, and all the terrible things that happen to us come because we actually deserve them? So, now I take great comfort in the general hostility and unfairness of the universe.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Interesting test case

    Hi,
    I played a little on my test machine and get interesting results so if someone could explain me what happens here I would be grateful.
    It is obvious that some data corruption happened but still interesting situation.
    OS: Linux 32bit
    Oracle: 10.2.0.2.0
    TEST CASE:
    1. Created tablespace and one table in that tablespace:
    SQL> create tablespace test_tbs datafile '/oradata/tbs01.dbf' size 75M autoextend on next 10M maxsize 512M;
    Tablespace created.
    SQL> create table objtab tablespace test_tbs as select * from dba_objects where 1=2;
    Table created.
    2. Made two more copies of tbs01.dbf datafile:
    SQL> !cp tbs01.dbf tbs02.dbf
    SQL> !cp tbs01.dbf tbs03.dbf
    3. Insert some rows into table objtab:
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> /
    50417 rows created.
    SQL> /
    50417 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from objtab;
    COUNT(*)
    151251
    4. Deleted tbs01.dbf:
    SQL> !rm tbs01.dbf
    5. Insert still works:
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> commit;
    Commit complete.
    6. Renamed tbs02.dbf to tbs01.dbf:
    SQL> !mv tbs02.dbf tbs01.dbf
    7. Inserted new rows:
    SQL> select count(*) from objtab;
    COUNT(*)
    302502
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> commit;
    Commit complete.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> commit;
    Commit complete.
    8. Check size of datafile:
    SQL> !du -hs tbs01.dbf
    *96M tbs01.dbf*
    SQL> select count(*) from objtab;
    COUNT(*)
    756255
    9. Deleted datafile tbs01.dbf and renamed tbs03.dbf to tbs01.dbf:
    SQL> !rm tbs01.dbf
    SQL> !mv tbs03.dbf tbs01.dbf
    10. Insert more rows and executed "alter system checkpoint":
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> insert into objtab select * from dba_objects;
    50417 rows created.
    SQL> commit;
    Commit complete.
    SQL> alter system checkpoint;
    System altered.
    SQL> select count(*) from objtab;
    COUNT(*)
    907506
    11. When I check the size of tbs01.dbf it is smaller then before despite of more rows I inserted. How come? Where are all this rows stored?
    SQL> !du -hs tbs01.dbf
    *86M tbs01.dbf*
    12. Now try to offline tablespace and then I get errors in alertlog:
    SQL> alter tablespace test_tbs offline normal;
    alter tablespace test_tbs offline normal
    ERROR at line 1:
    ORA-00603: ORACLE server session terminated by fatal error
    ALERT LOG
    Errors in file /oracle/admin/um/udump/um_ora_501.trc:
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01122: database file 6 failed verification check
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01208: data file is an old version - not accessing current version
    Fri May 29 09:01:31 2009
    ORA-600 signalled during: alter tablespace test_tbs offline normal...
    Fri May 29 09:01:31 2009
    Errors in file /oracle/admin/um/udump/um_ora_501.trc:
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01122: database file 6 failed verification check
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01208: data file is an old version - not accessing current version
    Fri May 29 09:01:37 2009
    Errors in file /oracle/admin/um/udump/um_ora_501.trc:
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01122: database file 6 failed verification check
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01208: data file is an old version - not accessing current version
    Fri May 29 09:01:43 2009
    Errors in file /oracle/admin/um/udump/um_ora_501.trc:
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-00600: internal error code, arguments: [krhpfh_03-1208], [fno =], [6], [fecpc =], [4], [fhcpc =], [3], []
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01122: database file 6 failed verification check
    ORA-01110: data file 6: '/oradata/tbs01.dbf'
    ORA-01208: data file is an old version - not accessing current version
    13. One more check:
    SQL> select tablespace_name, status from dba_tablespaces;
    TABLESPACE_NAME STATUS
    SYSTEM ONLINE
    SYSAUX ONLINE
    USERS ONLINE
    UNDOTBS2 ONLINE
    TMP ONLINE
    TEST_TBS ONLINE
    7 rows selected.
    SQL> select count(*) from objtab;
    COUNT(*)
    907506
    14. Restart database:
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup;
    ORACLE instance started.
    Total System Global Area 1224736768 bytes
    Fixed Size 1267188 bytes
    Variable Size 1006635532 bytes
    Database Buffers 201326592 bytes
    Redo Buffers 15507456 bytes
    Database mounted.
    Database opened.
    15. Try to count(*) from table but it says that object no longer exists:
    SQL> select count(*) from objtab;
    select count(*) from objtab
    ERROR at line 1:
    ORA-08103: object no longer exists
    SQL> select tablespace_name, status from dba_tablespaces;
    TABLESPACE_NAME STATUS
    SYSTEM ONLINE
    SYSAUX ONLINE
    USERS ONLINE
    UNDOTBS2 ONLINE
    TMP ONLINE
    TEST_TBS ONLINE
    7 rows selected.
    16. If object does not exist, how come I get this results (probably leftovers in data dictionary):
    SQL> desc objtab;
    Name Null? Type
    OWNER VARCHAR2(30)
    OBJECT_NAME VARCHAR2(128)
    SUBOBJECT_NAME VARCHAR2(30)
    OBJECT_ID NUMBER
    DATA_OBJECT_ID NUMBER
    OBJECT_TYPE VARCHAR2(19)
    CREATED DATE
    LAST_DDL_TIME DATE
    TIMESTAMP VARCHAR2(19)
    STATUS VARCHAR2(7)
    TEMPORARY VARCHAR2(1)
    GENERATED VARCHAR2(1)
    SECONDARY VARCHAR2(1)
    SQL> create table objtab tablespace test_tbs as select * from dba_objects;
    create table objtab tablespace test_tbs as select * from dba_objects
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    17. To drop object (can't drop):
    SQL> drop table objtab;
    drop table objtab
    ERROR at line 1:
    ORA-08103: object no longer exists
    18. Clean up:
    SQL> drop tablespace test_tbs including contents and datafiles;
    Tablespace dropped.
    Best Regards,
    Marko

    Hi Uwe,
    as I said before my intention was to understand behavior of Oracle and Linux in scenario like this.
    I thought about what will happen if some Linux admin by mistake moves live datafile to another location and after 5-10 mins, when he realizes his mistake, he moves the datafile to old (original) location.
    Will Oracle notice some errors in alert log? (In my test case I didn't receive any message in alert log)
    How will I know (as a DBA) what was done with this datafile if Linux admin does not say anything to me?
    Is any damage made to datbase ? (Probably)
    etc...
    When I am on my test machine I like to do all kind of stuff and try anything that comes on my mind. It isn't important to me if this scenario has any connection to real world problems. I enjoy doing this so I like to spend some of my time on this test cases.
    Anyway thanks for your comment.
    Regards,
    Marko
    Edited by: msutic on May 29, 2009 1:03 PM

Maybe you are looking for

  • Client server and database

    Hi im just still a beginner with java and ive a project that requires me to set up a client and server and store location information over gprs to a database. all the talk of drivers and sdks etc is very confusing trying toread through it. I've the j

  • Sound from lap top to tv?

    Hello I have a question Im hoping someone here can answer. I have a HP dv5 and I have my lap top connected to my tv with a HDMI cable. But when Im running my lap top with Windows 7, I dont get the sound out from my tv, only from the lap top??? but wh

  • WebServer WTC Error

    Hi there, Here i m trying to setup WTC where WebLogic talks to Tuxedo, but i got this error: [java] <Feb 8, 2002 3:37:52 PM SGT> <Warning> <EJB> <EJB Deployment: Tolowe r has a class weblogic.wtc.jatmi.TuxedoServiceHome which is in the classpath. Th

  • Default namespaces & templates

    I have a XML-document with a default namespace. If I do not declare a namespace in the template like described in Re: How use xml with namespaces , I do not get any data in my report. The only problem I have right now is that I have to add the name I

  • MySQL Date Question

    I have two DATETIME columns in a table. Is it possible to get the difference between the two dates and then format the output as H:M P? I've been trying to get this to work for a while... but now I'm not even sure it's possible.