cancel
Showing results for 
Search instead for 
Did you mean: 

License issue after System Restore

Former Member
0 Kudos


Hello All,

We are facing an issue while doing a system restore on Windows 2003 / MS SQL 2005 / SAP 4.7D EXT 110. We followed the System copy option using SAPInst to do our system restore. When SAPinst prompted for DB import we stopped the SAPINST Tool and started our DB restore using our backup tool. Once the DB restore was successfully done , we restarted SAPINST and tried to continue with the import. However in the POST DB load step it is giving us an error as below;

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

ERROR
MOS-01012  PROBLEM: 'C:\usr\sap\SID\SYS\exe\run/saplicense -R3Setup SID "S782KZCP" TRACE=2' returned with '-2' which is not a defined as a success code.

Creating file C:\Program Files\sapinst_instdir\R3E47X2\COPY\IMPORT\SYSTEM\ABAP\MSS\NUC\DB\saplicense.log.

Switched to user: sidadm.

Working directory changed to C:\Program Files\sapinst_instdir\R3E47X2\COPY\IMPORT\SYSTEM\ABAP\MSS\NUC\DB.

See 'C:\usr\sap\SID\SYS\exe\run/saplicense -R3Setup SID "6FJD2I4C" TRACE=2' output in 'C:\Program Files\sapinst_instdir\R3E47X2\COPY\IMPORT\SYSTEM\ABAP\MSS\NUC\DB\saplicense.log'.

ERROR
MOS-01012  PROBLEM: 'C:\usr\sap\SID\SYS\exe\run/saplicense -R3Setup SID "6FJD2I4C" TRACE=2' returned with '-2' which is not a defined as a success code.

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

We upgraded the kernel to the latest version and have implemented the environment variables [ MSSQL_SCHEMA ; MSSQL_DBNAME; DIR_LIBRARY ; SAPLOCALHOST ; DBMS_TYPE etc ] . However that has not helped.

The id that we have used for the installation is not the sidadm id but an administrator id.

The saplicense.log simply reads as below;

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

'Tue Apr 08 23:27:29 2014

MtxInit: 0 0 0'

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

When we do a sapilcense -show using the administrator id it gives us the below results;

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

C:\usr\sap\SP1\SYS\exe\run>saplicense -show

*** SAPLICENSE (Release 640) ERROR ***
    ERROR:   Connect to database failed
    DETAILS: DbSlConnect failed with return code 99
SQL-ERROR 0 (check DB manual for explanation)

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

So we logged in a separate session using sidadm and ran the same saplicense command. However we got the exact same output as above.

Then we ran a R3trans -d using the sidadm id and we got the below output;

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

This is R3trans version 6.13 (release 640 - 17.09.12 - 20:12:05 ).

2EETW169 no connect possible: "DBMS = MSSQL                            ---  SERVER = 'HOSTNAME' DBNAME = 'SID'"

R3trans finished (0012).

The trans.log read as below;

4 ETW000  [dev trc     ,00000]  OpenOledbConnection: line 23653. hr: 0x8000ffff Login failed for user 'DOMAIN\sidadm'.

4 ETW000                                                                           30451  0.038630

4 ETW000  [dev trc     ,00000]  sloledb.cpp [OpenOledbConnection,line 23653]: Error/Message: (err 18456, sev 0), Login failed for user 'DOMAIN\sidadm'.

4 ETW000                                                                              37  0.038667

4 ETW000  [dev trc     ,00000]  Procname: [OpenOledbConnection - no proc]             12  0.038679

4 ETW000  [dev trc     ,00000]  sloledb.cpp [OpenOledbConnection,line 23653]: Error/Message: (err 0, sev 0), Invalid connection string attribute

4 ETW000                                                                             109  0.038788

4 ETW000  [dev trc     ,00000]  Procname: [OpenOledbConnection - no proc]             14  0.038802

4 ETW000  [dev trc     ,00000]  Using Provider SQLNCLI                              5268  0.044070

4 ETW000  [dev trc     ,00000]  OpenOledbConnection: MARS property was set successfully.

4 ETW000                                                                             146  0.044216

4 ETW000  [dev trc     ,00000]  OpenOledbConnection: line 23653. hr: 0x8000ffff Login failed for user 'DOMAIN\sidadm'.

4 ETW000                                                                            2978  0.047194

4 ETW000  [dev trc     ,00000]  sloledb.cpp [OpenOledbConnection,line 23653]: Error/Message: (err 18456, sev 0), Login failed for user 'DOMAIN\sidadm'.

4 ETW000                                                                              49  0.047243

4 ETW000  [dev trc     ,00000]  Procname: [OpenOledbConnection - no proc]             14  0.047257

4 ETW000  [dev trc     ,00000]  sloledb.cpp [OpenOledbConnection,line 23653]: Error/Message: (err 0, sev 0), Invalid connection string attribute

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

Request you to kindly advise on how to resolve this issue. Is there an authentication mechanism ( similar to OPS$ in Oracle ) which is causing this issue in MSSQL.

Thanking you in advance,

Regards

Surajit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Deepak and Matt,

Firstly Thank you for taking an interest in my issue.

@ Deepak - The SAP kernel is already at the highest level available i.e 640 Patch 414. I have also sseparately upgraded the dbsl , R3trans and tp executables.

Gentlemen , I am unable to find any option as ' SAP tools for MS SQL ' in SMP. Also the SAPINST that I am using does not have an option ' database copy completion'.

Please Note this SAPINST was downloaded from the Archive section of  SMP as 640 Inst master is no longer generally available.

My system is ABAP only and Non Unicode.

Request your guidance on how to execute / download this particular tool or option for my system release.

Thanking you in advance,

Surajit.

Matt_Fraser
Active Contributor
0 Kudos

The version of sapinst that came with your installation media definitely will not work, and/or the version in archive for the 640 installation master, definitely will not work.  I think you can use the SWPM tool for your release, but I need to double-check that.  The old 'sap tools for sql server' version of sapinst doesn't seem to be available any longer.  I keep a copy on-hand because we do frequent refreshes of a 7.01 test system, and the old tool still works well for that.

Anyway, using the wrong sapinst is definitely the cause of your issue.  I'll get back to you shortly.

Matt_Fraser
Active Contributor
0 Kudos

Ok, according to the Note that Deepak linked, the new SWPM tool should work for your system, as it's on 6.40.  You can download the tool at http://service.sap.com/swdc -> Browse our Download Catalog -> SAP Technology Components -> SL Toolset -> SL Toolset 1.0 -> Entry by Component -> Software Provisioning Manager -> Software Provisioning Manager 1.0 -> Windows on <your platform> -> SWPM10SP05_1-20009707.SAR.

Unpack the tool and execute it on your central instance server.  Run sapinst.exe that you find in the unpacked folder.  Go to Generic Installation Options -> MS SQL Server -> Database Tools -> Database Copy Completion.

Reagan
Advisor
Advisor
0 Kudos

Try to follow the suggestions provided in this SAP note

551915 - R/3 won't start after database restore or database copy

Good Luck

RB

Matt_Fraser
Active Contributor
0 Kudos

Also, although you can find a System Copy guide on the SMP for your release, I don't actually recommend following the procedure in it, as it's a 14-year-old document and not really relevant for the new tool.  You will probably have better luck following the guide at http://service.sap.com/instguides -> SAP NetWeaver -> SAP NetWeaver 7.0 (2004s) -> Installation -> 2 - Installation - SAP NetWeaver Systems -> System Copy: Systems Based on SAP NetWeaver 7.0/7.0 EHPs -> Windows / ABAP -> Chapter 5.3 (MS SQL Server-Specific Procedure).

Matt_Fraser
Active Contributor
0 Kudos

Also follow the "Follow-Up Activities" in Chapter 6 of the system copy guide after you've run the tool.  There are a few things I do differently based on experience (like temporarily setting the background work processes to zero before the first system start), but overall if you follow the procedure in the guide you should have success.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello All,

The issue has been resolved by running the ' Database Copy Completion ' . My sincere thanks to Matt for providing a step by step resolution of the issue. We really appreciate your support Matt.

@ Deepak - Thank you for pointing us in the right direction.

Thanking all who spent their time to provide the valuable inputs,

Regards

S.

Matt_Fraser
Active Contributor
0 Kudos

To add to what Deepak is saying, when I do a system copy, I typically use the sidadm user, not another OS administrator user.  Also, make sure you are using the version of sapinst that is either provided with the SWPM tool mentioned in Note 683447, or if you are using the legacy 'SAP Tools for SQL Server' that was applicable to 7.0, 6.40, etc, then use the sapinst from that.  You cannot use the sapinst that was part of the original 4.6D installation.  After you do the database restore, you must execute the "database copy completion" tool in sapinst as the sidadm user.  This should restore the sidadm and sapservicesid logins in the database and install a temporary license.  It will also change the schema to be equal to the sid (in lower case), either from the source system's schema, or from the 'dbo' schema.

Best regards,

Matt

former_member188883
Active Contributor
0 Kudos

Hi Surajit,

Can you update the kernel and check the results.

Also check SAP note 683447 - SAP Tools for MS SQL Server


To change schema user post system copy


Hope this helps.

Regards,

Deepak Kori