Tuesday, August 24, 2010

Multiple VMs with the same name on one Domain

Recently I copied a Virtual machine that is a member of a domain and wanted to host that machine on the same network, the result was when trying to logon to the machine with a domain account it gives the error:

"The trust relationship between this workstation and the primary domain failed"

The reason for this being that now the domain controller has 2 machines with the same name trying to access it. in this scenario you have 2 solutions:

  1. Logon to the machine as a local user, go into the network settings and change the DNS server of the machine to something other than the Domain IP. This will force the machine to authenticate using cached credentials and you should be able to logon to the machine with the previous domain accounts and work normally
  2. The second solution is to right click on my computer --> Properties --> Change Settings and remove the computer from the domain temporarily and join it to any workgroup. Then restart. Logon to the workstation and re-join the domain. Be careful the dissadvantage to this resolution will be that the DNS on the Domain will update the IP DNS entry of the machine with your machine's IP leaving the other machine inaccessibe (atleast by name)

Tuesday, August 17, 2010

Configure Excel Services with SharePoint 2010

Recently I needed to get Excel Services to work on SharePoint 2010 for demo purposes on a VM of mine. I didn't want any delegation and wanted all the users to basically see the same pivot tables and be able to play around with some of the cool Excel 2010 functionalities like slicers. Turns out this is easier said than done. The new SharePoint 2010 architecture gives you 3 authentication options as a service
None : It uses the Secure Store Service Unattended account
Windows Authentication: Requires Kerberos Delegation to be in place
SSS : Requires you to specify the ID of the Secure Service Store you configured for Excel

For this simple tutorial I will configure SharePoint 2010 to work with Excel Services using None Authentication.

  1. Go to SharePoint Central Administration --> Applications Management --> Manage Service Applications
  2. First we will configure the secure store service so click on the Secure Store Service and press Manage
  3. Create a New Target Application and name it "ExcelServicesSSS" with a Target Application Type: Group. Follow through the wizard with the default settings until it creates the Secure Store
  4. Right Click on the Secure Store Service called "ExcelServicesSSS" and set credentials. Use the Windows account you want Excel to use when connecting to Analysis Services.
  5. Go Back to Applications Management --> Manage Service Applications --> Excel Service Application --> Global Settings and set the Application ID to "ExcelServicesSSS" 

  1. Go into an excel pivot table and in the connection properties go to Definition --> Authentication Settings --> None

Then go into your SharePoint Website and upload this excel sheet in a document library, then use Excel Web Access Webpart to connect to it and thats it :)

Excel services works

Install SQL Server 2008 Cumulative Update 9 or Service Pack 1 on Windows Server 2008

While trying to install SQL Server 2008 Cumulative Update I kept getting this error
Attempted to perform an unauthorized operation
the SQL Server log located at
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\
 showed the following
2010-08-17 13:01:34 Slp:     Message:
2010-08-17 13:01:34 Slp:         Attempted to perform an unauthorized operation.
2010-08-17 13:01:34 Slp:     Data:
2010-08-17 13:01:34 Slp:       WatsonData = Uninstall@{F692770D-0E27-4D3F-8386-F04C6F434040}
2010-08-17 13:01:34 Slp:       DisableRetry = true
2010-08-17 13:01:34 Slp:     Stack:
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess)
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.ArpRegKey.CleanupPatchedProductRegistryInfo()
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.SetPatchInstallStateAction.ExecuteAction(String actionId)
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.ProductInstallProperty.GetInstalledPackages(String instanceName, List`1& installedInstancePackages, List`1& installedSharedPackages, String& returnedErrorMessage)
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.ProductInstallProperty.CollectProductData()
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.FeatureTreeConfigurationBase.LoadFeatureTreeDefinitionAllInstances()
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Configuration.PatchFeatureTree.InitializePatchFeatureTree(ServiceContainer context)
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
2010-08-17 13:01:34 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
2010-08-17 13:01:34 Slp:     Inner exception type: System.UnauthorizedAccessException
2010-08-17 13:01:34 Slp:         Message:
2010-08-17 13:01:34 Slp:                 Attempted to perform an unauthorized operation.
2010-08-17 13:01:34 Slp:         Stack:
2010-08-17 13:01:34 Slp:                 at Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess)
2010-08-17 13:01:47 Slp: Watson Bucket 1
 Original Parameter Values

2010-08-17 13:01:47 Slp: Parameter 0 : SQL2008@RTM@KB979065

2010-08-17 13:01:47 Slp: Parameter 1 : Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey

2010-08-17 13:01:47 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey

2010-08-17 13:01:47 Slp: Parameter 3 : Microsoft.SqlServer.Configuration.Sco.ScoException@1211@1

2010-08-17 13:01:47 Slp: Parameter 4 : System.UnauthorizedAccessException@-2147024891

2010-08-17 13:01:47 Slp: Parameter 5 : InitializeUIDataAction

2010-08-17 13:01:47 Slp: Parameter 7 : Uninstall@{F692770D-0E27-4D3F-8386-F04C6F434040}

2010-08-17 13:01:47 Slp: Parameter 8 : Uninstall@{F692770D-0E27-4D3F-8386-F04C6F434040}

The solution to this turned out to be to go into regedit and set the permissions of Administrators to Write as well as read for all the SQL Server related Uninstalls in the following path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

some of the ones I had to set are
{F5FEEB7E-F647-4D18-85BA-096750A15547} (SSIS)
{F01EC9B9-21B4-441E-958A-1E01098B03BE} (SSAS)

Thanks,
Khaled Auf

Wednesday, August 11, 2010

Excel Multilingual connectivity to SQL Server Analysis Services (SSAS) 2008

-->

1.       Create a new connection
2.     Select the Perspective


3.       Press Finish
4.       Go to Properties à Definition
The connection string should look like a default SSAS connection string with the appended attribute:
Locale Identifier=XXXXX
Where XXXXX is the locale id for the language you set up in SSAS e.g. 14337 is the locale id for Arabic U.A.E

To get a complete listing of all the Locale ID mappings please visit the below URL
http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx
So the connection string would look like the below:
Data Source=ServerName;Initial Catalog=Datamart;Provider=MSOLAP.4;Persist Security Info=True;Integrated Security=SSPI;Locale Identifier=14337;
You should then see the below screen where the red highlighted box has the name of the perspective or Cube you are connecting to.
5.       The next screen will show you the below
 
6.       The results above are also incorrect, as you can see it still displays English names. Go to Data à Properties à Definition
Replace the clause
“;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error”
With
“;Locale Identifier=14337;”
Go to Usage tab and UNCHECK “Retrieve data and errors in the office display language when available”
7.       Press Ok. The below screen will appear showing the Arabic names.


Connect from Microsoft Office Clients to SharePoint

Recently I was trying to publish an excel file directly to SharePoint from within Excel and I kept getting the following error:
"Path does not exist.  Check Path and try again"
the problem only arises when trying to do this from inside Windows Server 2008. The solution is to install the Feature called Desktop Experience
Windows Server 2008 Add Features Wizard
After installing this feature and restarting the machine you can successful access SharePoint from within the save as dialog box in Excel