cancel
Showing results for 
Search instead for 
Did you mean: 

NOT ABLE TO CONNECT TO DATABASE with R3trans -d

Former Member
0 Kudos

HI SAP Gurus,

We have recovered our BW quality system from backup of production system.

Database is restored and recovered. We are able to open database:

We have performed OPS$ schema conversion with below queries:

1)CREATE USER "OPS$TBWADM" DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE PSAPTEMP IDENTIFIED EXTERNALLY;

2)GRANT SAPDBA,CONNECT,RESOURCE to OPS$TBWADM

3)SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'OPS$TBWADM';

4)CREATE USER "OPS$ORATBW" DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE PSAPTEMP IDENTIFIED EXTERNALLY;

5)GRANT SAPDBA,CONNECT,RESOURCE to OPS$ORATBW

6)SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'OPS$ORATBW';

7)SELECT OWNER FROM DBA_TABLES WHERE TABLE_NAME = 'SAPUSER';

8)CREATE TABLE OPS$TBWADM.SAPUSER  (USERID VARCHAR2(255), PASSWD VARCHAR2(255));

9)INSERT INTO OPS$TBWAADM.SAPUSER VALUES ('SAPPBW', 'london123');

10)CREATE TABLE OPS$ORATBW.SAPUSER  (USERID VARCHAR2(255), PASSWD VARCHAR2(255));

11)INSERT INTO OPS$ORATBW.SAPUSER VALUES ('SAPPBW', 'london123');


I am able to connect to database with users OPS$TBWADM and OPS$ORATBW with password london123

I am also able to connect to DB with SAPPBW with password london123.


When I am giving R3trans -d from tbwadm i am getting below error:


This is R3trans version 6.23 (release 720 - 27.03.12 - 17:30:00).

unicode enabled version

2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'TBW'"

R3trans finished (0012).

Trans.log files says:

4 ETW000  [     dev trc,00000] Connecting as SAPTBW/<pwd>@TBW on connection 0 (nls_hdl 0) ... (dbsl 720 140910)

4 ETW000                                                                                                  66  0.131040

4 ETW000  [     dev trc,00000]  Nls CharacterSet                 NationalCharSet              Env        Err        ErrBt

4 ETW000                                                                                                  69  0.131109

4 ETW000  [     dev trc,00000]    0 UTF8                                                      102ba7eb0 102bb32c8 102bd8188

4 ETW000                                                                                                  69  0.131178

4 ETW000  [     dev trc,00000]  Assigning username to user session: con=0, usrhp= 102c297d0               43  0.131221

4 ETW000  [     dev trc,00000]  Assigning password to user session: con=0, usrhp=102c297d0                50  0.131271

4 ETW000  [     dev trc,00000]  Starting user session: OCISessionBegin(con=0, usr='SAPTBW', svc=102bb31e8, srv=102bda330, usr=102c297d0)

4 ETW000                                                                                                 498  0.131769

4 ETW000  [     dev trc,00000]     OCISessionBegin(OCI_DEFAULT) failed with -1=OCI_ERROR                5132  0.136901

4 ETW000  [     dev trc,00000]     OCISessionBegin(OCI_DEFAULT) failed with SQL error 1017:              149  0.137050

4 ETW000  [     dev trc,00000]     ORA-01017: invalid username/password; logon denied

4 ETW000                                                                                                  74  0.137124

4 ETW000  [    dbsloci.,00000]  *** ERROR => CONNECT failed with sql error '1017'                         53  0.137177

4 ETW000  [     dev trc,00000]     set_ocica() -> SQL error code 1017                                     41  0.137218

4 ETW000  [     dev trc,00000]  -->oci_get_errmsg (con=0, rc=1017)                                        43  0.137261

4 ETW000  [     dev trc,00000]     OCIErrorGet -> SQL error code: 1017                                   109  0.137370

4 ETW000  [     dev trc,00000]     ORA-01017: invalid username/password; logon denied

4 ETW000                                                                                                  66  0.137436

4 ETW000  [     dev trc,00000]     DbSlConnect(con=-1) -> orc=0, 99=DBSL_ERR_DB                           46  0.137482

4 ETW000  [    dblink  ,00000]  ***LOG BY2=>sql error 1017   performing CON                              189  0.137671

4 ETW000  [    dblink  ,00000]  ***LOG BY0=>ORA-01017: invalid username/password; logon denied            52  0.137723

2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'TBW'"

It is trying to connect to SAPTBW where as for a BW system schema is SAPPBW. SAPTBW is not at all present in dba_users view.

Kindly advice me on this..please let me know if any further logs are required.

Thanks,

Avadhesh

+91 8095226536


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look at the environment variable dbs_ora_schema.
It suppose it should be SAPPBW, but not SAPTBW.
I suppose you didn't rename your schema.

As for Yves's advice not to enter an unencrypted password in table sapuser:
Not sure if this advice is correct nowadays. I know it wasn't correct for old releases.
I remember having done it myself, before starting SAP. And the password in the table got encrypted during start.

regards

Former Member
0 Kudos

Hi Josef,

Many thanks for your response.

yes you are right, below env variable is set to:

dbs_ora_schema=SAPTBW

dbs_ora_tnsname=TBW

Changing these variable to SAPPBW and PBW will  resolve the issue??

Thanks,

Avadhesh Sharma

Former Member
0 Kudos

I suppose database name was changed to TBW during system copy.
So keep this:
dbs_ora_tnsname=TBW

But schema name didn't change, it is the same as in production.
So change to:
dbs_ora_schema=SAPPBW


regards

Former Member
0 Kudos

Hi Josef,

I will try out this step .

Will update you on this.

Many Thanks for your support !!

Thanks,

Avadhesh Sharma

Former Member
0 Kudos

Hi Josef,

Thanks for the solution.

Above solution worked for me .

issue was resolved by setting parameter dbs_ora_schema = SAPTBW.

in dbenv.hostname.sh file .

Thanks,

Avadhesh

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi All,

Thanks for your valuable inputs.

As suggested by Josef , issue was resolved by setting parameter dbs_ora_schema = SAPTBW.

in dbenv.hostname.sh file .

Thanks,

Avadhesh

former_member182657
Active Contributor
0 Kudos

Hi,

@Regan Benjamin Thanks for correcting me,yes oradbusr.sql is used for recreation of OPS$ user.

@Sharma try to set SCHEMA USER password to default i.e "pass" & retry to connect with R3trans -d. Please ignore as i was wrong for incorrect mentioning of below


it's mandatory to perform schema conversion with the help of oradbusr.sql script. (For SCHEMA conversion export/import of database method will be used.)

brconnect -u / -c -f chpass -o <SCHEMA_OWNER> -p "pass" .

Regards,

Gaurav

former_member182657
Active Contributor
0 Kudos

Hi Sharma,

As you restored or recovered the system by Production database,so it's mandatory to perform schema conversion with the help of oradbusr.sql script.You can follow like as below:

logon on your   ora<sid> now run the script

orasid > sqlplus /NOLOG @oradbusr.sql <schemaname> UNIX <SID> X   (If OS is Unix)

Apart form it make sure correct schema has been provided under .dbenv_<hostname>.sh file ,which you can find out like as below:

su -  <sid>adm

ls -a

vim .dbenv_<hostname>.sh

On performing above try to execute R3trans -d again & share the result with us .

Hope this will help you.

Regards,

Gaurav

Reagan
Advisor
Advisor
0 Kudos

orasid > sqlplus /NOLOG @oradbusr.sql <schemaname> UNIX <SID> X   (If OS is Unix)

The oradbusr.sql is used for recreating the OPS$ users.

To convert the schema name from SAPPBW to SAPTBW you will need to do an export and import.

I would check the owner of the SAP schema user from the database level and then check whether the dbs_ora_schema environment variable is set correctly.

If yes then you need to run this command using brtools.

brconnect -u / -f chpass -o SAPPBW -p Boston123

Regards

RB

ACE-SAP
Active Contributor
0 Kudos

Hi

You are not supposed to insert the password as plain text in table SAPUSER.

It must be crypted using Brconnect with the here under command:

Echo c| Brconnect -u / -p initPBW.sap -l E -f chpass -o SAPPBW -l d:\chpass.log -p london123

1576837 - ORA-01017: invalid username/password;

400241 - Problems with ops$ or sapr3 connect to Oracle

Regards