Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need Day wise leave statistic report

Shaik_MuhammadApr 30 2021

Oracle_Leave_statistic_report_day_wise.jpeg (255.09 KB)I am trying to develop new day wise leave statistic report, as attachment , please check below code and suggest.

CREATE TABLE GET_DATES (DATE_START DATE,DATE_END DATE,PERSON_ID NUMBER);
INSERT INTO GET_DATES
VALUES (TO_DATE('11-MAY-2014'), TO_DATE('04-JUN-2014'),26876);

INSERT INTO GET_DATES
VALUES (TO_DATE('22-JAN-2017'), TO_DATE('22-MAR-2017'),26876);

COMMIT;

1. select date_start, date_end, date_end - date_start +1 days FROM GET_DATES;
the below query is working fine for one row, if more than 1 row its records are more than million.
but the desired output is to get correct days as attached file.

  1. Select level - 1 lvl , date_start, date_end
    FROM
    (select date_start, date_end FROM GET_DATES
    WHERE ROWNUM = 1)
    connect by level <= (date_end - date_start)+ 1

  2. Final query

select * from(
select date_start + lvl date_,
Trim(to_char(date_start + lvl, 'Day')) current_day_,
to_char(date_start + lvl, 'mm') month_,
to_char(date_start + lvl, 'YYYY') Year_
from (
Select level - 1 lvl , date_start, date_end
FROM
(select date_start, date_end FROM GET_DATES
WHERE ROWNUM = 1)
connect by
level <= (date_end - date_start)+ 1))
pivot (count(date_)date_ for current_day_ in
('Sunday' Sun,'Monday' Mon ,'Tuesday' Tue,'Wednesday' Wed,'Thursday' Thu,'Friday' Fri,'Saturday' Sat))
order by 2, 1;

Thank you in advance

This post has been answered by Shaik_Muhammad on May 2 2021
Jump to Answer

Comments

L. Fernigrini

From what you say, the software installation runs OK (the product) is installed but the DB creation is somehow hanging.

You can try installing again and include the database alert log, it may show any serious error that may occur, or review if any trace file is generated.

AAndrei

Hi,

Thanks for your interest.

I've checked the database alert logs and ORA-00445 pops-up:

alert_xe.log

"

2020-01-23T14:52:29.135087+02:00

Errors in file C:\APP\USER1\PRODUCT\18.0.0\diag\rdbms\xe\xe\trace\xe_mmon_12924.trc  (incident=20555) (PDBNAME=CDB$ROOT):

ORA-00445: background process "M000" did not start after 120 seconds

2020-01-23T14:54:34.237803+02:00

Errors in file C:\APP\USER1\PRODUCT\18.0.0\diag\rdbms\xe\xe\trace\xe_aqpc_11892.trc  (incident=20552) (PDBNAME=CDB$ROOT):

ORA-00445: background process "QM03" did not start after 120 seconds

2020-01-23T14:56:39.326552+02:00

Errors in file C:\APP\USER1\PRODUCT\18.0.0\diag\rdbms\xe\xe\trace\xe_mmon_12924.trc  (incident=20556) (PDBNAME=CDB$ROOT):

ORA-00445: background process "MZ01" did not start after 120 seconds

"

xe_mmon_12924.trc

"

*** 2020-01-23T15:05:08.482150+02:00 (CDB$ROOT(1))

calling location                         entry point                              arg #1           arg #2           arg #3           arg #4         

---------------------------------------- ---------------------------------------- ---------------- ---------------- ---------------- ----------------

00007FFA9337F7E4                         0000000000000000                         0000000000000000 00007ffa93321563 0000000000000000 0000000000000000

00007FFA9331D815                         00007FFA9337F7D0                         0000000000000000 0000000000000000 0000000000000000 0000000000000000

00007FFA933267C7                         00007FFA9331D6B8                         0000000000000000 0000000000000000 0000000000000000 0000000000000000

00007FFA93355765                         00007FFA9332673C                         0000000000000000 0000000000000000 0000000000000000 0000000000000000

00007FFA933556C3                         00007FFA933556DC                         0000000000000000 ffffffff932e0000 0000000000000000 0000000000000000

00007FFA9335566E                         00007FFA93355688                         0000000000000000 0000000000000000 0000000000000000 0000000000000000

---------------- End of Call Stack Trace -----------------

Call stack acquisition performance stats:

  setup time (lock acquis., memory alloc.): 0 ms

  frame get time (time the target proc was suspended): 0 ms

  symbol translation time: 0 ms

  total time: 0 ms

DDE: Problem Key 'ORA 445' was flood controlled (0x4) (incident: 20558)

ORA-00445: background process "MZ01" did not start after 120 seconds

"

xe_aqpc_11892.trc

"

*** 2020-01-23T15:03:00.229499+02:00

DDE: Problem Key 'ORA 445' was flood controlled (0x4) (incident: 20562)

ORA-00445: background process "QM03" did not start after 120 seconds

"

I don't know what i need to do next, so if anything comes in mind, please share

I've checked this thread https://community.oracle.com/thread/4206522, but it isn't my case.

All the best,

Andrei

Billy Verreynne

There are support notes on this error:

  • Master Note: Troubleshooting Oracle Background Processes (Doc ID 1509616.1)
  • Troubleshooting Guide (TSG) - Ksvcreate: Process(xxxx) Creation Failed / ORA-00445: Background Process "xxxx" Did Not Start After n Seconds (Doc ID 1379200.1)

If you are technically inclined, troubleshoot by setting trace 10281 via custom pfile and do a manual db start.

If you are logically inclined, change from Windows to Linux. Exchange dirty and convoluted complexity for the elegance of simplicity.

Christian.Shay -Oracle

Please disable anti-virus and try again.

I think you said you have seen this list of common issues, but just to be sure:

1) Is ORACLE_HOME or TNS_ADMIN set in the environment? Go to a command prompt, type "set". You will need to temporarily unset any such environment variables.

2) Are you using Windows 10 Home Edition? It is not supported and the installer is not properly checking for it in the Prerequisite check.

3) Are you using Server 2019? Same issue.

4) On your network adapter that you are using, check (enable) "Client for Microsoft Networks" and "File and Printer Sharing for Microsoft Networks".

5) Check to make sure Netbios is enabled on your network connection:

See this link for more info:

http://ecross.mvps.org/howto/enable-netbios-over-tcp-ip-with-windows.htm

6) In some cases, antivirus has interfered with an installation.  Try installing without AV.

7) Try creating a local user and adding to local administrator group and then log in and install as that user.

user2685436

Hi all

I tried to install express 18c on Win 10 HOME and Win10 PRO and it was hanging at about 90-95% progress also.

The way I did to bypass this issue, working as well as for Win 10 Home as for Pro : all is about administrator account !

What I did :

     log to win 10 using the usual account and run cmd.exe (as administrator) and issue : net user administrator /active:yes

     log to win 10 with the real administrator account and run the 18xe setup.exe (no need to run as administrator). Then the install achieved well. Give full access to folder (and all sub-folders and sub-files)18xe was installed in to the win 10 usual account

    log to win 10 using the usual account and run cmd.exe (as administrator) and issue : net user administrator /active:no

Then I was able to use the 18xe from my usual account ...

I hope this will help someones

User_PIBOU

After 6hours on this stupid pile of wet leaves where i tried 21c xe which would constantly give only errors and 18c xe which would be stuck forever and tried every other thing i could find this finally worked for me. Thank you.

With XE 21c what errors were you getting?

User_PIBOU

When I was installing it, it would suddenly do roll back and then that oracle installation completed with errors. In logs and I hope I got right ones is this:
INFO: WindowsSecurityException has occurred
SEVERE: PRCZ-1082 : Failed to add Windows user or Windows group "Me" to Windows group "USERS"
O/S-Error: (OS 1387) A member could not be added to or removed from the local group because the member does not exist.

[FATAL] Failed to add ME\Me install user to %2% group.

Thank you, and sorry you hit this.
Could you please zip up and email to me the logs located in the following directories:

  1. [youroraclehome]/cfgtoollogs/oui
  2. C:\Program Files\Oracle\Inventory
    Please email them to me at christian dot shay at oracle dot com
    Thanks!
1 - 9

Post Details

Added on Apr 30 2021
7 comments
97 views