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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

find last time users logged in

RobeenJul 25 2017 — edited Nov 11 2017

Oracle Database 11.2.0.4

Hi,

how do I find last time users logged in and those who did not login for past 180 days

USERNAME                                      PROFILE                        ACCOUNT_STATUS

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

SYS                                           DEFAULT                        OPEN

SYSTEM                                        DEFAULT                        OPEN

OUTLN                                         DEFAULT                        EXPIRED & LOCKED

DIP                                           DEFAULT                        EXPIRED & LOCKED

MUZAMMER                                      DEFAULT                        OPEN

DBSNMP                                        DEFAULT                        OPEN

APPQOSSYS                                     DEFAULT                        EXPIRED & LOCKED

WMSYS                                         DEFAULT                        EXPIRED & LOCKED

XS$NULL                                       DEFAULT                        EXPIRED & LOCKED

EXFSYS                                        DEFAULT                        EXPIRED & LOCKED

XDB                                           DEFAULT                        EXPIRED & LOCKED

USERNAME                                      PROFILE                        ACCOUNT_STATUS

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

ANONYMOUS                                     DEFAULT                        LOCKED

ORDSYS                                        DEFAULT                        EXPIRED & LOCKED

ORDDATA                                       DEFAULT                        EXPIRED & LOCKED

ORDPLUGINS                                    DEFAULT                        EXPIRED & LOCKED

SI_INFORMTN_SCHEMA                            DEFAULT                        EXPIRED & LOCKED

MDSYS                                         NICE_PROFILE                   OPEN

MDDATA                                        DEFAULT                        EXPIRED & LOCKED

SPATIAL_WFS_ADMIN_USR                         DEFAULT                        EXPIRED & LOCKED

PP2                                           DEFAULT                        OPEN

SPATIAL_CSW_ADMIN_USR                         DEFAULT                        EXPIRED & LOCKED

DBADM                                         NICE_PROFILE                   OPEN

Regards,

Roshan

Comments

User_DGTCC

If necessary, I will provide specific data, but it seems like a problem to me: what to do if ...

asahide

Hi,
If possible, could you upload the table definition, the actual Insert statement, and the error output as is?
Regards,

User_DGTCC

create table test (
"TIPO_OPERAZIONE" VARCHAR2(50 CHAR),
"DATA_OPERAZIONE" TIMESTAMP (6)
);

Data as I see from sql*plus (and also from sqlDeveloper): "UPD-A","26-MAG-22 02:09:17,000000000"

create table test_PART (
"TIPO_OPERAZIONE" VARCHAR2(50 CHAR),
"DATA_OPERAZIONE" TIMESTAMP (6)
)
PARTITION BY RANGE (DATA_OPERAZIONE)
( PARTITION P_2022_06 VALUES LESS THAN (TIMESTAMP '2022-08-01 00:00:00.000000')
TABLESPACE nadtc
, PARTITION P_2022_07 VALUES LESS THAN (TIMESTAMP '2022-09-01 00:00:00.000000')
TABLESPACE nadtc
, PARTITION P_2022_08 VALUES LESS THAN (TIMESTAMP '2022-10-01 00:00:00.000000')
TABLESPACE nadtc
, PARTITION P_2023_09 VALUES LESS THAN (TIMESTAMP '2022-11-01 00:00:00.000000')
TABLESPACE nadtc
)
;
insert into TEST_PART select * from TEST;
*
ERRORE alla riga 1:
ORA-01858: è stato trovato un carattere non numerico al posto di uno numerico

User_DGTCC

Insertion on the source table is done with the "sysdate".

Saubhik

Not clear what you want to tell.

CREATE TABLE test (
    "TIPO_OPERAZIONE"  VARCHAR2(50 CHAR),
    "DATA_OPERAZIONE"  TIMESTAMP(6)
);

CREATE TABLE test_part (
    "TIPO_OPERAZIONE"  VARCHAR2(50 CHAR),
    "DATA_OPERAZIONE"  TIMESTAMP(6)
)
    PARTITION BY RANGE (
        data_operazione
    )
    ( PARTITION p_2022_06
        VALUES LESS THAN ( TIMESTAMP '2022-08-01 00:00:00.000000' ),
    PARTITION p_2022_07
        VALUES LESS THAN ( TIMESTAMP '2022-09-01 00:00:00.000000' ),
    PARTITION p_2022_08
        VALUES LESS THAN ( TIMESTAMP '2022-10-01 00:00:00.000000' ),
    PARTITION p_2023_09
        VALUES LESS THAN ( TIMESTAMP '2022-11-01 00:00:00.000000' )
    );
    
INSERT INTO test VALUES (
    'A',
    sysdate
);

INSERT INTO test VALUES (
    'B',
    sysdate + 20
);

INSERT INTO test_part
    SELECT
        *
    FROM
        test;

The above code block doesn't give any error. What s your data in "test" table? Is really the column is TIMESTAMP or VARCHAR2 ?

User_DGTCC

Hi Saubhik,
in test table column is really TIMESTAMP.
My (and your) code work properly from sqlDeveloper.
I am seeing that my sqlplus is an old release, set in Italian and the combination of these 2 factors gives problems.
We can close this discussion,
thank you for your interest.

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 9 2017
Added on Jul 25 2017
47 comments
76,692 views