cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with MSSQL and EhP5 installation

Former Member
0 Kudos

Hi folks,

I'm on an EhP5 upgrade on our sandbox, which was just copied from the prod system.

Now I'm getting an errormessage in MSSCONCHECK.LOG saying

Msg 15157, Level 16, State 1, Server S-SAPBAS, Line 1

Setuser failed because of one of the following reasons: the database principal 'bas' does not exist, its corresponding server principal does not have server access, this type of database principal cannot be impersonated, or you do not have permission.

I'm running the EHPI Gui as <SID>adm.

Please advice, I'm not very familiar with this Microsoft stuff (Unix/Oracle man), but unfortunately have to work with it.

Cheers,

Helmut

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I found out that the db user bas had not the correct permissions (db_owner).

Assigned the permission and on we go.

I don't like MSSQL, by the way.

some days and a new installation later...

in MSSSHDCRE.LOG we find:

Creating Login bas_shd

Changed database context to 'master'.

Changed database context to 'master'.

Granted control server to bas_shd

Changed database context to 'BAS'.

Msg 15151, Level 16, State 1, Server S-SAPBAS, Line 2

Cannot find the object 'sap_upg_getrelease', because it does not exist or you do not have permission. <---

Execution completed successfully <--- this is one of the stupidest messages I've ever seen...

So let's have a look into MSSSHDCRE.OUT, which points us to the respective sql script:

EXECUTING C:\Windows\system32\sqlcmd.exe -S S-SAPBAS -E -d BAS -i Y:\EHPi2\EHPI\abap\bin\MSSSHDCRE.SQL...

We'll have a closer look at this one:

...

use BAS <- that's fine

...

setuser <- which sets the user back to the original user, here 'bas'

grant all on [bas].[sap_upg_getrelease] to bas_shd

setuser <- why this? user is already set to 'bas'

print 'Execution completed successfully' <-- blah, blah...

now we'll see what happens when we put that command into the lovely pointy-clicky-thingy which M$ uses for db administration:

ERRORMESSAGE:

The ALL permission is deprecated and maintained only for compatibility. It DOES NOT imply ALL permissions defined on the entity. <- this is jus a hint (in black)

Msg 15151, Level 16, State 1, Line 5

Cannot find the object 'sap_upg_getrelease', because it does not exist or you do not have permission. <- here ist is...

changing the sql statement like so:

setuser

grant all on [sap_upg_getrelease] to bas_shd

--> works!

What do I need to change that EhPI builds that script in the correct way?

Just for information - the correct syntax for M$$QL 2008R2 would be:

grant EXECUTE on [sap_upg_getrelease] to bas_shd;

which works fine. Note that here also "[bas]." is missing. This causes the error. Unfortunately I don't have a M$$QL 2005 db to check if its working there. My db is running on compatibility level 90.

Did I mention that I don't like MSSQL....? (and I wonder why SAP ever has been released on Windows and MSSQL....)

Cheers,

Helmut

Former Member
0 Kudos

solution:

edit msstemps.mss, msstemps9.mss and msstemps10.mss.

Remove [<schems>]. from  all lines containing [<schema>].[sap_upg_getrelease]

former_member189725
Active Contributor
0 Kudos

Please check this thread http://scn.sap.com/thread/1882160

Should be helpful.

Regards

Ratnajit

Former Member
0 Kudos

Hi Ratnajit

I already checked the mentioned thread. All settings were correct as mentioned by Clas.

Cheers,

Helmut