cancel
Showing results for 
Search instead for 
Did you mean: 

System copy 'Homogeneous' from MSSQL2005 to SQL2012 on Windows

Former Member
0 Kudos

Hi All

I am trying to do the System copy 'Homogeneous' from MSSQL2005 to SQL2012 on Windows.

I detached DB from source system and attached to the target system.

Then I run SAPInst from SWPM cd,

And selected homogeneous copy from existing DB, but it gives the following error and unable to continue the installation.

       " User tables belonging to the dbo schema were found in the database S11.

SOLUTION: You can only install an SAP system in a database with no user objects belonging to the system schema dbo.

If there already is an SAP system in the database (MCOD), or you install a Java Add-In, you might have to convert the existing system to its own schema, or contact your SAP support.  "

Anybody can help me to resolve this issue?

Thanks

Sel

Accepted Solutions (1)

Accepted Solutions (1)

luisdarui
Advisor
Advisor
0 Kudos

Hi,

It seems that you maintain at least some tables in the dbo schema, but does your system runs on dbo schema? This is the first thing you should look at.

The following queries might help you. To run then, first execute the following statement;


USE [S11];

GO

1) The following query will give you the list of the users in your database;


SELECT

     uid, status, name

FROM

     sys.sysusers

WHERE

     uid < 16384;

2) This query will list you all the schemas in your database:


SELECT

     *

FROM

     sys.schemas

WHERE

     schema_id < 16384;

3) This query will give you the number of objects present in each schema in your database:


SELECT

     count(schema_id) as #objects

FROM

     sys.objects

GROUP BY

     schema_id;

Now you know:

1) What users does exists in your Database;

2) What schemas does exist and to which user they belongs

3) The number of objects present in each schema.

Now all you need is to know which user tables are on 'dbo' schema and decide what to do with them.

1) All tables that belongs to dbo schema:


SELECT

     *

FROM

     sys.objects

WHERE

     type = 'U'

     AND schema_id = 1; --dbo

2) All tables in the dbo schema that also does exist in the 'sid' schema:


SELECT name FROM sys.objects WHERE type = 'U' and schema_id = 1 --dbo

INTERSECT

SELECT name FROM sys.objects WHERE type = 'U' and schema_id = ? --change to the schema_id of your SID database.

For example:

If the objects in the dbo schema are named like 'sap_' they probably belongs to a monitoring (Solution Manager) or are duplicated with the 'sid' schema tables. You should drop them.

If you have doubt please share the results of those queries, we might be able to further help you.

Best Regards,

Luis Darui

Former Member
0 Kudos

Hi Luis

As you have advised, I run all queries and attached the results in the below link. Please help me to resolve the issue as soon as possible.

Please find the below link to download the query result.

https://dl.dropboxusercontent.com/u/34445799/QueryResults.txt

Thanks

Sel

luisdarui
Advisor
Advisor
0 Kudos

Hi Sel,

Is this really a dual-stack system?

I can see the existence of the SAPS11DB and s11 users and schema as well. I have seen some cases where the JAVA only system had all tables in dbo but not a dual stack system.

Also my previous query was missing information:


SELECT

     count(schema_id) as #objects, schema_id

FROM

     sys.objects

GROUP BY

     schema_id;

Please check out the following queries also:

Objects in s11 schema:


SELECT

     *

FROM

     sys.objects

WHERE

     type = 'U'

AND

     schema_id = 5;

Objects in SAPS11DB schema:


SELECT

     *

FROM

     sys.objects

WHERE

     type = 'U'

AND

     schema_id = 7;

If this is not a dual-stack system, you may drop the 'sap_tabstats' table and repeat the schema move suggested by Eduardo.


DROP TABLE s11.sap_tabstats;

If this is a dual-stack system and all tables from both schema are on dbo, this will be interesting.

Regards, Luis

Former Member
0 Kudos

Hi Luis

Thank you for your reply and quick response.

It is not dual system. It is a abap system only.  And the remaining query results is given below,

SELECT 

     count(schema_id) as #objects, schema_id 

FROM 

     sys.objects 

GROUP BY 

     schema_id;

Results:

156857 1

73 4

4 5

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

SELECT 

     * 

FROM 

     sys.objects 

WHERE 

     type = 'U' 

AND 

     schema_id = 5; 

Results:

sap_tabstats 15687545 NULL 5 0 U USER_TABLE 2009-06-13 04:00:01.343 2009-06-13 04:00:02.247 0 0 0

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

SELECT 

     * 

FROM 

     sys.objects 

WHERE 

     type = 'U' 

AND 

     schema_id = 7; 

Results:

There is not table.

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

Thanks

Sel

luisdarui
Advisor
Advisor
0 Kudos

Hi Sel,

Go ahead and drop the sap_tabstats in the s11 schema, and perform the schema move as per note 1294762, from 'dbo' to 's11'. This will fix your issue.

Best Regards,

Luis Darui

Former Member
0 Kudos

Hi Luis

I have a one concern in our SAP system.

I have checked the source system schema owner and it is dbo.

If I moved from dbo to s11, there will be no issue. right? Can you please confirm and advise on this.



Thanks

Sel


luisdarui
Advisor
Advisor
0 Kudos

Hi Sel,

Actually it wont. this will 'fix' the usage of the dbo schema for the SAP tables and after you move this, SWPM will be able to complete the system copy.

If you were just moving the schemas without a system copy, it would be necessary to update the profile parameter "dbs/mss/schema" and the user environment variable "MSSQL_SCHEMA" for the user <sid>adm, but this is explained in the note 1294762.


And just for confirmation, you're doing this in the test system, after restoring the database from the source system, correct? If yes, no, there will be no issue as the SWPM take cares of the rest.


Regards,

Luis

Former Member
0 Kudos

HI luis

thanks a lot for your confirmation and advise.

I Have to do the same migration for production system as well after successful upgrade of test system.

For that, what would be the better way to choose schema for our production system whether it is dbo or s11?

as i mentioned, the current schema is dbo.

Pls advise.

Thanks

sel

luisdarui
Advisor
Advisor
0 Kudos

Hi Sel,

It is advised to always use the 'sid' schema (s11 in your case).

Former Member
0 Kudos

Hi Luis

Thank you so much.

Everything is fine. Now the test is ready.

Can you clarify about the exported file (which has generated from source system). The SAPInst did not ask for that location during the installation.

Where will we use that exported file?

Thanks

Sel

Sriram2009
Active Contributor
0 Kudos

Hi Sel

You can find the SUMMARY.html file located in C:\Program Files\sapinst_instdi\ folder check the export path

Regards

SS

Former Member
0 Kudos

Hi SS

I don't find path in Summary file as well.

Summary file is:

Dialog "Parameter Mode > Default Settings"

Typicalselected

Dialog "SAP System > General Parameters"

SAP System ID (SAPSID)S11
Installation Drive😧
Unicode System (recommended)deselected

Dialog "SAP System > DNS Domain Name"

Set FQDN for SAP Systemdeselected
DNS Domain Name for SAP System

Dialog "SAP System > Master Password"

Password for all users of this SAP system******

Dialog "SAP System > Windows Domain"

SAP System ID (SAPSID)S11
Local installationselected
Windows Domain

Dialog "SAP System > OS User Passwords"

Password of SAP System Administrator******
Password of SAP System Service User******

Dialog "SAP System > Database"

Homogeneous System Copy (MS SQL Server-specific: Detach/Attach or Backup/Restore)selected
Start Migration Monitor manuallydeselected

Dialog "MS SQL Server > Database Connection Information"

Local MS SQL Server InstancesSAP-DR

Dialog "MS SQL Server > Database Information"

Database ID (DBSID)S11

Dialog "Media Browser > Software Package Request"

Package LocationMedium
D:\SAPMigration\InstallationKernel\51049439_2\Krnl_7.21_EXT_WIN__IA64__x64__SP08_\DATA_UNITS\K_721_N_WINDOWS_X86_64Kernel NW 7.20 / 7.21

Dialog "MS SQL Server > Database Schema"

Password of ABAP Schema******

Dialog "SAP System > Central Instance and ASCS Instance"

Central Instance Number00
ASCS Instance Number01

Dialog "SAP System > Central Instance"

Host with Transport DirectorySAP-DR

Dialog "SAP System > Actions Before Starting System"

Interrupt before SAP System startsdeselected

Dialog "SAP System > DDIC Users"

Password of 'DDIC' in client 000 in the source system******

Sriram2009
Active Contributor
0 Kudos

Hi Sel

In target system you are performed detached / attach method, because of this it may not asked for source system export path.

Regards

SS

luisdarui
Advisor
Advisor
0 Kudos

Hi Sel,

It has been a long time that I don't perform a system copy. In the System Copy guide for SAP NetWeaver systems, there is topic for "Database Specific" topic for MSSQL Server.

It's a step before you run SWPM. You restore the database with SSMS and then run SWPM. It is not asked during the execution.

Check the system copy guide in the following link.

There is also a space for specific questions regarding SWPM in our community:

If you could complete your copy, go and mark as answered/helpful answers that assisted you through this and create a new topic.

Best Regards,

Luis Darui

SAP Support.

Answers (3)

Answers (3)

Sriram2009
Active Contributor
0 Kudos

Hi Sel

You are going to upgrade the DB from MS Sql 2005 to 2012, In this case use the backup /restore and then  perform the Homogeneous system copy method.

Could you share the SAP version details?

Regards

SS

Former Member
0 Kudos

Hi SS

why can I use dettach/attach method?

thanks

Sriram2009
Active Contributor
0 Kudos

Hi Sel

Because of the MS Sql version from lower 2005  to higher 2012, you can avoid the schema issues,

Could you share the SAP version details and full log?


Regards

SS

luisdarui
Advisor
Advisor
0 Kudos

There are no differences between detach / attach and backup/restore methods to the result of the system copy, though I always use backup / restore.

Regards,

Luis Darui

former_member184473
Active Contributor
0 Kudos

Hello Sel,

You can use the 'move script' from note 1294762 to move the SAP objects from schema 'dbo' to schema 's11'. Then you will be able to continue.

Also, check carefully note 1651862 about the minimum SP Stack required before you move to SQL Server 2012.

Best regards,
Eduardo Rezende
SAP Support

Former Member
0 Kudos

Hi Eduardo

I already run the script, but it is not resolved the issue.

thanks

Former Member
0 Kudos

Hi Sel

did you read this

Let me know if it is helpful

a