MOSS 2007 stsadm -o addcontentdb - Login failed for user
Hi folks, trying to add a content db to an existing web app and getting "login failed for user X. The user is not associated with a trusted SQL Server Connection". Any ideas? Here are the details. Test box: Windows Server 2003 domain controller, MOSS 2007 12.0.0.6539, SQL 2005, IIS6. Command: stsadm -o addcontentdb -url "url to web app" -databasename "name" -databaseserver "name\instance" -databaseuser "domain\user" -databasepassword password Tried adding a couple of restored db's to a new web app (detached default db) and to an existing web app. Same error. SQL is set to Windows only (I do not want to change it to "Mixed"). For domain\user, tried using the SQL service account, the MOSS service account, and domain administrator (all of which are in the Farm Administrators group; have SQL Logins with server roles dbcreator, public, securityadmin, and sysadmin; and are assigned db_owner in the User Mapping for each db). I've spent many frustrating hours on this with no success. Any suggestions would be greatly appreciated!
June 22nd, 2011 9:03pm

Hi, The databasepassword parameter in this command should only be used where Windows authentication is not implemented. Therefore, in a Microsoft SQL Server authentication scenario, you need to pass the databaseuser and databasepassword parameters to authenticate against the database server. Under Windows authentication, you can omit these parameters because the credentials are passed using NTLM. For more information, please refer to: http://technet.microsoft.com/en-us/library/cc263422(office.12).aspx Xue-Mei Chang TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Xue-Mei Chang
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2011 3:21am

Since it is Windows only run the command prompt used to run the addcontentdb command as the MOSS farm account and it should work. As mentioned by Chang, please ignore the databaseuser and password options from the command.Here to help.
June 23rd, 2011 11:07pm

HI, Just to add on this . You can try this out via Central Administrator UI also. I hope this will help. Thanks, Rahul Rashu
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2011 5:55am

Since it is Windows only run the command prompt used to run the addcontentdb command as the MOSS farm account and it should work. As mentioned by Chang, please ignore the databaseuser and password options from the command.Here to help.
June 24th, 2011 6:05am

Hi Guys, sorry for the late reply. Had a few days off. Many thanks for the replies! Xue-Mei, you were exactly correct. Before checking back to this post I finally tried removing the databaseuser and databasepassword parameters, and suddenly it worked. Of course this makes sense, as we use Windows authentication. Now I have another, related issue. After adding the content database to an existing (or new) web application, the content database has "current number of sites" = 0 in Central Admin. So, an export operation on this restored database would not be possible. On the other hand, I tried restoring a content database *from another farm*, and it is added with sites. Is there something else I need to do to make this work? Please advise. Thanks!
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 12:07am

Hi Chris, some times the number of sites do not show up in central admin for the content database...make sure you can check in the dbo.webs and dbo.sites table for the content database if you see ur sites urls there then detach the content database from the web application and readd the content database once again to the web app with same stsadm -addcontentdb operation ...hope it should work..:) Regards, Raj
June 30th, 2011 2:05am

Hi Raj, thank you for the reply. I checked the dbo.web and dbo.sites tables of the content datbase in question, but the tables were empty. I tried detaching the database (afterwards ran IISRESET /NOFORCE), and re-adding it using CA and STSADM, but still the same result, "Current Number of Sites" = 0. Like I wrote in the last post, I'm kind of guessing that this is "by design"? If I restore a content database under a different name to the same farm, I get a database ID conflict error. If I assign the DB a new ID, then it shows up with zero sites. If I restore the same content database to another farm, then it attaches with the correct number of sites under it. Thanks, Chris
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 9:48pm

Hi Chris, Iam sure that its not "by design" as i have done it lot of times like restoring the content db with a different db name in the same farm and assigned newdb-id and sites came up fine for me . might be we are missing some thing. have u checked the dbo.sites and webs table before restoring and made sure they exist? as you said the restored db works fine when attached to a different farm? Thanks, Raj
July 1st, 2011 2:47am

Hi Veera, thanks very much for the reply. Sorry it took me a while to reply. The re-named, restored content database is still showing up with "0" sites. However I got a little closer to success. The problem definitely seems to be related to the duplicate database ID. I started over, picked a new content database, backed it up, restored it to the same farm under a different name, and ran 'addcontentdb' (with 'assignnewdatabaseid'). The content DB showed "0" sites. Tried adding a new managed path and adding the DB to the new path, but same result. Compared the 'FullURL' field of the 'webs' table of the original and restored DB, and the paths were the same. Also the object ID's are the same. Tried manually changing the path of the restored DB webs, but no luck. Anyway, it obviously has something to do with a duplicate ID, as I can delete the original content DB and restore under a different name *from the same backup as used above* and it shows up with the sites. Any ideas would be appreciated.
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2011 9:45pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics