Skip to Main Content

SQL & PL/SQL

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!

session lived synonym

Dmitrii DunaevMay 22 2019 — edited May 22 2019

Hello everyone.

We use Oracle 11.2 on a Linux machine.

I have a very large table with millions of rows, lets call it "trx". Based on that table we build an aggregate table - "trx_hours", which is partitioned by hours. We also have a buffer table - trx_buffer. We fill the buffer table for a specific hour and then exchange it with a relevant partition. Everything works great but the transaction table gets updated very often. Every time it gets updated we rebuild all relevant hours. Recently we have added a few workers to be able to simultaneously rebuild multiplle hours. Since each worker calls the same procedure i had to create multiple copies of trx_buffer table, one for each worker. I also had to rewrite the code to use dynamic SQL to be able to insert into an appropriate buffer table to avoid contention. Now since its dynamic its very hard to maintain and add changes. The only way i could think of to work around the problem is to create additinional GTT buffer table, fill it with non-dynamic SQL and then have small dynamic sql that copies everything from GTT into an appropriate buffer table and exchange it. But that would add an additional overhead. Materialized view is not a solution either. They are very slow. Is there a better way?

before the change:

begin

  insert into trx_buffer

    (src_code

    ,dst_code

    ,amount)

    select src_code

          ,dst_code

          ,sum(amount)

      from trx

     where trx.date >= to_date('01.01.2019','dd.mm.yyyy')

       and trx.date <  to_date('01.01.2019','dd.mm.yyyy') + 1 / 24

     group by src_code

             ,dst_code;

            

  execute immediate 'alter table TRX_HOURS exchange partition ' || l_part_name || ' with table trx_buffer';

end;

after the change

begin

  execute immediate 'insert into ' || l_trx_buffer || '

                          (src_code

                          ,dst_code

                          ,amount)

                          select src_code

                                ,dst_code

                                ,sum(amount)

                            from trx

                           where trx.date >= to_date(''01.01.2019'',''dd.mm.yyyy'')

                             and trx.date <  to_date(''01.01.2019'',''dd.mm.yyyy'') + 1 / 24

                           group by src_code

                                   ,dst_code';

            

  execute immediate 'alter table TRX_HOURS exchange partition ' || l_part_name || ' with table ' || l_trx_buffer;

end;

Thank you in advance.

This post has been answered by Cookiemonster76 on May 22 2019
Jump to Answer

Comments

Christian.Shay -Oracle

That error is very generic that just means "things are really messed up!"

If you do not see OracleServiceXE, then you have your answer - the install failed.

Did you set ORACLE_HOME? Don't set that on Windows. You shouldn't have to set any environment variable after install.

Possibly the PATH did not get set to the new Oracle home.

SullivanK

Thanks for your reply Christian,

Yeah I figured something went wrong :-) , but I don't even know where to start looking. I didn't set any environment variables, but I was expecting to see it already set, which was not the case.

So we have services missing and an incorrect path set? Mind giving me some debugging tips? i have no idea what to check and can't really find anything.

Christian.Shay -Oracle

If you do not see OracleServiceXE, there is no hope for it working in the current state. That is the Oracle database software.

When you installed it, did you use the user interface version of the install (as opposed to command line)? If so, did it show you a final screen with connection strings (similar to what is shown in chapter 5 of the documentation)?

Is there anything unusual about your Windows 10? Are the drives involved local drives? Is it an up to date version of windows 10?

If you are using a domain user, can you try creating a local administrator user and log in and install with that?

SullivanK

Do you mean this?

Capture.PNG

Then yes.

Local drive yes, I have only one, no partitions, if thats an issue too. Also up to date version of windows.

Tried with no differing results:

- creating another admin and installing with that one

- installing 11 xe, uninstalling that one and then reinstalling 18

- downloading 18xe again and installing that version.

Do you think installing from command line would make a difference?

Gaz in Oz

That screenshot suggests it did install.

What user did you use for the install, Adminsistrator?

What user are you looged in as when you try and view Services?

...when you say "I installed 18 XE on windows 10, but get this error when I try to login via cmd." show how you tried to login via cmd.

SullivanK

Thanks Gaz, I do realize that the screenshot suggests it did install... It's the first line on screen after all.

Yes I installed it as an administrator, even tried making another admin as Christian suggested. When i view Services, I tried logging in as the administrators (both of them, only two users on my laptop).

logging in via cmd is done via the usual:

"sqlplus /nolog" and then conn sys as sysdba

or "sqlplus / as sysdba"

or all other ways of logging in I could find on google, but I sure can reinstall it and paste a screenshot.

Christian.Shay -Oracle

Just to confirm again, you do NOT have OracleServiceXE in the services Window?

If not, the installation failed and we will need to find out why. I am talking to some of the engineers to see what the next step is.

SullivanK

yeah exactly, I do NOT have it.

Services.jpeg

Maybe this screenshot helps?

Christian.Shay -Oracle

Ok, thanks for your patience. Stand by.. we will probably have to look at your log files to figure out what is going wrong. I will get back soon.

SullivanK

Thanks Christan. It's for personal tinkering at home and I can't really get to my laptop right now so no absolute hurry. Asked my DBA friend to take a whack at it after work too, hopefully he will get it working. If so, I will post update and solution ofcourse.

SullivanK
Answer

Guess we found it.

My home laptop is Win Home edition.

https://docs.oracle.com/en/database/oracle/oracle-database/18/ntdbi/oracle-database-software-requirements.html#GUID-CEF2…  says that is not supported, only Pro, Enterprise, and Education editions so I'm out of luck.

Would be nice if the installer could check this as well.

Thanks for your help Christian.

Marked as Answer by SullivanK · Sep 27 2020
SBiedrzycki

I'm not entirely sure that the Windows edition is related.  I've actually spent the day wrestling with installing the XE with no luck.  I get the same error but I'm on Win 10 Pro.  Notable difference in my case is that I don't even have the recovery service even.  Only service running is the TNS listener. 

I also tried working around the problem by directly configuring a new DB with DBCA but have brickwalled at another issue with error [DBT-50000] Unable to check for available memory. 

Otherwise, my installation approach was the same.  Ran Setup as Administrator from my normal user account which is part of the Administrators group.  Installation completed successfully.  Same error when attempting to login through sqlplus.  I had no prior Oracle installations on the system.  Problem was reproducible through uninstall, reinstall with restarts in between to ensure cleanup.

1 - 12

Post Details

Added on May 22 2019
16 comments
436 views