|
Hi all, Has anyone been able to sucessfully deploy and connect to an instance with SQL Server 2008 R2 Best Practice Analyzer ? I've installed it on the Cluster node directly (which is running windows server 2008) and also installed it on a remote stand-alone machine (running windows server 2003) and still continue to get the error "Login does not exist or is not a member of the Systems Administrator role". I tried creating my login explictly as mentioned here : and tried to install BPA bypassing the powershell as mentioned here: I continue to struggle to connect. SQL Server reports no login attempts or failures. Any ideas?
(comments are locked)
|
|
I managed to get SQL SERVER 2008 R2 BPA working!!!! 2 areas of trouble that I had to pin point by getting into the PowerShell files for BPA! Those were found in %Programdata%MicrosoftMicrosoft Baseline Configuration Analyzer 2ModelsSQL2008R2BPA I first attacked the message I was receiving
and in the report Type :
Opened up PowerShell (as Administrator) and opened the file SQL2008R2BPA.ps1 Ran through most of the code and isolated to this area Running the following code manually icm $Alternate_Server_to_Scan { $env:computername } gave me the error: "Connecting to remote server failed with the following error message : The WinRM client cannot process t he request. Default authentication may be used with an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to set TrustedHosts run the following command: winrm help config. For moreinformation, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OpenError: (:) [], PSRemotingTransportException + FullyQualifiedErrorId : PSSessionStateBroken " -----------NOTES ON POWERSHELL------------- "By default, PowerShell requires Kerberos authentication to operate remotely, so you cannot use it in a simple peer-to-peer scenario. You can also not use it in a cross-domain scenario with untrusted domains. You will need to allow WSMan to use different authentication types to work remotely everywhere. All that is required is to add the IP addresses or computer names of computers you'd like to talk to. Note that this has to be done on both ends. The easiest (and most unsecure) way is to allow communication between any computer by specifying "*": Set-Item WSMan:localhostclienttrustedhosts * -force A more selective approach would use an IP address or computer name instead of "*". Once done, you can use all remote cmdlets to work remotely. Just make sure you use the -credential parameter to enter a User Name and Password for authentication: Invoke-Command { dir $env:windir } -computer 10.10.10.10 -credential(Get-Credential)" -----------END OF NOTES ON POWERSHELL------------- I ran : Set-Item WSMan:localhostclienttrustedhosts * -force Now the error in BPA was back to "Login does not exist or is not a member of the Systems Administrator role" and in the report Type : " Collected Data" -- "SufficiencyCheck" "CurrentUserLoginExistsOnSQL"= false" (I was running Scan for the SQL Engine btw:) Now I opened up the file Engine.ps1 found in found in %Programdata%MicrosoftMicrosoft Baseline Configuration Analyzer 2ModelsSQL2008R2BPAEngine Followed through the code and isolated this to the following areas of code: .. The trouble was not that my login didnt exist in sys.server_principals but that the way this code was setup it was trying to connect to the sql serve instance [node1][instancename] rather than the [sqlclustername][instancename]. So the script never conencts to SQL and fails on this statement "if(!$IsCurrentLoginAvailableOnSQL)" the culprit was this code: " $SQLInstanceID = $SQLInstallPath[3] " Here's the breakdown (assuming my SQL cluster instance is called INSTANCE1: PS C:Windowssystem32> $SQLExecutablePath.Remove($StartIndex).Split("") D: Program Files Microsoft SQL Server INSTANCE1 MSSQL10_50.INSTANCE1 MSSQL PS C:Windowssystem32> $SQLInstallPath[3] INSTANCE1 So when it checks to see if this is a cluster installation it looks in the following registry key "HKLM:SOFTWAREMicrosoftMicrosoft SQL Server" + $SQLInstanceID + "Cluster" in this case: HKLM:SOFTWAREMicrosoftMicrosoft SQL ServerInstance1Cluster Turns out that the "Cluster" key is not there thus returning a NULL value the "Cluster" key is in: HKLM:SOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10_50.INSTANCE1Cluster so I modified Engine.ps1 " $SQLInstanceID = $SQLInstallPath[3] " to " $SQLInstanceID = $SQLInstallPath[4] " I also modified AnalysisServices.ps1, IntegrationServices.ps1 and Replication.ps1 BPA R2 for sql 2008 is scanning and reporting properly!!!!!!!!!!!! Also changed ReportingServices.ps1 from $RSInstance = $RSInstallPath[3] to $RSInstance = $RSInstallPath[4]
May 13 '11 at 12:37 PM
vinman2
(comments are locked)
|
|
It sounds like you're running the software in a security context that doesn't have access to the server. I've run the tool. It works fine. You can use SQL Logins, but you need to make sure they are in the sysadmin role on the server. where can i plug in an sql login?
May 04 '11 at 07:03 AM
vinman2
Sorry, that was a mistake. Is remoting enabled?
May 04 '11 at 07:25 AM
Grant Fritchey ♦♦
Yes, did: Once BPA was installed, opened a PowerShell prompt as "run as Administrator" Executed the following commands Enable-PSRemoting -f winrm set winrm/config/winrs
May 04 '11 at 07:33 AM
vinman2
Did that complete successfully?, no errors? You might be hitting the kerberos issue that Adam talks about here: http://blogs.msdn.com/b/psssql/archive/2010/06/21/known-issues-installing-sql-2008-r2-bpa-relating-to-remoting.aspx I'll see if I can get Adam to look at this thread.
May 04 '11 at 07:40 AM
Grant Fritchey ♦♦
yes, it completed sucessfully and without errors. I thought it was kerberos also but I cannot find any HTTP SPN defined on my Domain Account. not sure if there is a specfic SPN to check for. I checked the spns by doing: setspn -L [domainaccount] setspn -L [hostname] and did not see anything with the text "http"
May 04 '11 at 08:04 AM
vinman2
(comments are locked)
|
|
Hi Vin, thx for mentioning my blog. I have changed my blog adress in the past but feleryan.wordpress.com was still available. Therefor I have copied your comments to the actual blog post: http://dirkhondong.wordpress.com/2010/09/18/sql2k8r2-bpa-again%E2%80%A6-because-i-was-a-little-bit-wrong/ Regards Dirk
(comments are locked)
|
|
We've run into issues like that. When we hit that before, the account wasn't provisioned properly in SQL. Basically if it wasn't listed in the following DMV, it wouldn't work. select * from sys.server_principals Although if you added the account explicitly within SQL, it should be listed there. The other thing would be how exactly are you trying to do this from BPA? Are you using Alternate_Server_To_Scan? Also, if "Enable-PSRemoting -f" works successfully from an Admin PS Prompt, then i wouldn't worry about the whole HTTP SPN piece. Yes, I am in the sys.server_principals server principles table. I attempt to connect and scan the DB engine by :
Impact: Analysis cannot be performed Resolution: 1. Add user as a member of Administrators group, OR 2. Run Commands Enable-PSRemoting -f through PowerShell command prompt using elevated privileges, AND 3. Run Command winrm set winrm/config/winrs
May 04 '11 at 10:15 AM
vinman2
(comments are locked)
|
|
Good Day. I installed Both the packages and I used all the tips I could lay may hands on , but still BPA does not work. It still displays the error "Login does not exist or was n ot added to the sysadmin role. " Why is such a simple programme giving so much trouble ?
(comments are locked)
|
1 2 next page »


Adding to this problem. I tried to run BPA using the Powershell command line option mentioned in the BPA White Paper:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3874409e-f19d-4d80-a5a2-0427d76b6d17&displayLang=en
Invoke-MbcaModel -ModelId SQL2008R2BPA -SubModelId Engine -ComputerName {computername} -SqlServerInstance {servername} -CurrentLoginName ($Env:USERDOMAIN + "" + $Env:USERNAME).ToString() -EngineLogFile c:tempengine.txt –RepositoryPath ("C:TEMPSQL2008" + (Get-Date).ToString("yyyyMMdd")).ToString()
--- To Create Report
model = get-MbcaModel –ModelId sql2008r2bpa $scanResult = get-MbcaResult –ModelId sql2008r2bpa $collectedConfig = get-MbcaResult –ModelId sql2008r2bpa –CollectedConfiguration
$model, $scanResult, $collectedConfig | export-CliXml c:tempas.xml
Get-MBCAResult -ModelId SQL2008R2BPA -SubModelId Engine | ConvertTo-Html | Add-Content -Path c:test.html
To no avail. The error message in the engine.txt file was :
Engine Rules Execution Interrupted - Current User Name is unavailable or is disabled on (COMPUTERNAME)
Found some other info on deploying BPA here: http://feleryan.wordpress.com/tag/sql2k8r2-bpa/
From here I tried to set the execution policy as such;
PS C:Windowssystem32> Set-ExecutionPolicy Unrestricted -f PS C:Windowssystem32> Get-Executionpolicy -list
Scope ExecutionPolicy ----- --------------- MachinePolicy Undefined UserPolicy Undefined Process Undefined CurrentUser Undefined LocalMachine Unrestricted
Still cannot run the scan.
One last thing to note is after running the scan, Under the "Report Type" option in BPA there is a radio button called "Colleted Data". when I clicked this there is an info tree that branches to the line "IsPSRemotingEnable = false"
Here's the screen shot:
http://imageshack.us/photo/my-images/3/59201120500pm.png/
I ensure that this is enabled: Enable-PSRemoting -force WinRM already is set up to receive requests on this machine. WinRM already is set up for remote management on this machine.
Any help would be much appreciated.