<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Confused Amused &#187; sql</title>
	<atom:link href="http://www.confusedamused.com/tags/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.confusedamused.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 02:58:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating OCS conference directories to Lync the hard way</title>
		<link>http://www.confusedamused.com/notebook/migrating-ocs-conference-directories-to-lync-the-hard-way/</link>
		<comments>http://www.confusedamused.com/notebook/migrating-ocs-conference-directories-to-lync-the-hard-way/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 02:58:20 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Lync Server 2010]]></category>
		<category><![CDATA[Office Communications Server 2007 R2]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[dbimpexp]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[lync]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[pool]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=1198</guid>
		<description><![CDATA[A few evenings ago I ran into a scenario where moving a conference directory from OCS to Lync failed, and the conference directory ended up in this limbo state where it wasn&#8217;t on Lync, I couldn&#8217;t move it back to OCS, and the conferencing attendant wouldn&#8217;t recognize any PSTNs IDs which were part of the [...]]]></description>
			<content:encoded><![CDATA[<p>A few evenings ago I ran into a scenario where moving a conference directory from OCS to Lync failed, and the conference directory ended up in this limbo state where it wasn&#8217;t on Lync, I couldn&#8217;t move it back to OCS, and the conferencing attendant wouldn&#8217;t recognize any PSTNs IDs which were part of the directory. Not a great scenario.</p>

<p>After running Move-CsConferenceDirectory I could verify the move was in progress, but it never completed. The status would show it was trying to move, and OCS eventually started throwing errors that it no longer had a conference directory, but it never fully made it to Lync. The TargetServerIfMoving parameter stayed populated:</p>

<p><pre><code>Get-CsConferenceDirectory -Identity 5
Identity: 5
ServiceId: UserServer:OCSPOOL.ptown.local
TargetServerIfMoving: UserServer:LYNCPOOL.ptown.local</pre></code></p>

<p>Trying to run Move-CsConferenceDirectory again would consistently fail with the following errors:</p>

<blockquote>WARNING: Move operation failed for conference directory with ID "5". Cannot
perform a rollback because data migration might have already started. Retry the
 operation.<br />
WARNING: Before using the -Force parameter, ensure that you have exported the
conference directory data using DBImpExp.exe and imported the data on the
target pool. Refer to the DBImpExp-Readme.htm file for more information.<br />
Exception from HRESULT: 0xC3EE7950, Microsoft.Rtc.Management.ConferenceDirectoryCmdlets.MoveConferenceDirectoryCmdlet</blockquote>

<p>In the end I needed to export the data from the OCS directory via DbImpExp, force the directory to move, and then import the data. Not the cleanest route, but it works. The order is important, so be patient.</p>

<p>On the OCS pool and database export the conference directory data:</p>

<p><pre><code>DbImpExp.exe /hrxmlfile:C:\Temp\OCSDirectory5.xml /SQLServer:OCS-SQL.ptown.local /restype:confdir</pre></code></p>

<p>Only once you're positive you have a good export (Read: opened the file and checked!), and made a copy of it you can force the Move-CsConferenceDirectory operation:</p>

<p><pre><code>Move-CsConferenceDirectory 5 -TargetPool LYNCPOOL.ptown.local -Force</pre></code></p>

<p>Congrats. You've moved the directory to Lync, but it's empty. Copy the .xml export file to a FE in the Lync pool. On the Lync pool and database import the directory data while specifying the conference directory ID to recover the old data:</p>

<p><pre><code>DbImpExp.exe /import /hrxmlfile:C:\Temp\OCSDirectory5.xml /SQLServer:LYNC-SQL.ptown.local /restype:confdir /dirid:5</pre></code></p>

<p>At this point I could see the directory was no longer moving because TargetServerIfMoving was empty, and the conference attendant was now recognizing PSTN IDs which had been created against this directory.</p>

<p><pre><code>Get-CsConferenceDirectory -Identity 5
Identity: 5
ServiceId: UserServer:LYNCPOOL.ptown.local
TargetServerIfMoving: </pre></code></p>

<p>Again, this is a good reason to always do a DbImpExp.exe dump before moving directories or databases around. Those .XML files can save your skin!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/migrating-ocs-conference-directories-to-lync-the-hard-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lync Topology Builder error: &#8220;The directory name is invalid&#8221;</title>
		<link>http://www.confusedamused.com/notebook/lync-topology-builder-error-the-directory-name-is-invalid/</link>
		<comments>http://www.confusedamused.com/notebook/lync-topology-builder-error-the-directory-name-is-invalid/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 06:44:17 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Lync Server 2010]]></category>
		<category><![CDATA[lync]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[topology]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=1161</guid>
		<description><![CDATA[Earlier this week I had a project where we were moving the back-end Lync database from a standalone SQL to a clustered instance (pilot to production for Enterprise Voice!), but we ran into an error I haven&#8217;t hit before when trying to add the new SQL store to the topology &#8211; Topology Builder was failing [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week I had a project where we were moving the back-end Lync database from a standalone SQL to a clustered instance (pilot to production for Enterprise Voice!), but we ran into an error I haven&#8217;t hit before when trying to add the new SQL store to the topology &#8211; Topology Builder was failing on the enabling topology step with the error &#8220;The directory name is invalid.&#8221; As a result the databases and permissions were not even being populated in the new instance.</p>

<p>We checked the usual suspects: firewalls, permissions, etc with no luck. In the end we just used a different machine that had Topology Builder installed and the same topology file published OK. After doing some more research it seems this is a very generic SQL error that can typically be resolved with a reboot (of the server trying to talk to the SQL instance). So if you hit this error I would suggest just using a different machine, or restart the one you&#8217;re using.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/lync-topology-builder-error-the-directory-name-is-invalid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Topology Builder MMC Crash</title>
		<link>http://www.confusedamused.com/notebook/topology-builder-mmc-crash/</link>
		<comments>http://www.confusedamused.com/notebook/topology-builder-mmc-crash/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 17:03:24 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Lync Server 2010]]></category>
		<category><![CDATA[lync]]></category>
		<category><![CDATA[MMC]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[topology]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=1072</guid>
		<description><![CDATA[With my most recent Lync project I found Topology Builder crashing when I went to try and publish a brand new topology. I started with the basics and verified I had all the correct group membership for my account and that the SQL server was accessible. The server I was publishing from was 2008 R2 [...]]]></description>
			<content:encoded><![CDATA[<p>With my most recent Lync project I found Topology Builder crashing when I went to try and publish a brand new topology. I started with the basics and verified I had all the correct group membership for my account and that the SQL server was accessible. The server I was publishing from was 2008 R2 SP1 with all the latest patches, but even after a reboot I would get the following MMC crash as soon as I clicked on publish:</p>

<blockquote>
Description: <br />
  Stopped working<br /><br />

Problem signature:<br />
  Problem Event Name:   APPCRASH<br />
  Application Name: mmc.exe<br />
  Application Version:  6.1.7600.16385<br />
  Application Timestamp:    4a5bc808<br />
  Fault Module Name:    KERNELBASE.dll<br />
  Fault Module Version: 6.1.7601.17651<br />
  Fault Module Timestamp:   4e21213c<br />
  Exception Code:   e053534f<br />
  Exception Offset: 000000000000cacd<br />
  OS Version:   6.1.7601.2.1.0.272.7<br />
  Locale ID:    1033<br />
 </blockquote>

<p><p>In order to troubleshoot errors like this further you can dig in to the log files Topology Builder generates which can be found in the %APPDATA%\Local\Temp folder. I found the real issue by sorting the files in this folder by last modified date which pointed to the Create-CentralMgmtStore log file. Opening this up I noticed the following section:</p></p>

<blockquote>
Installed SQL Server 2005 Backward Compatibility version is 8.05.2312<br />
Connecting to SQL Server on &lt;SQL Server FQDN&gt;<br />
SqlMajorVersion : 10<br />
SqlMinorVersion : 0<br />
SqlBuildNo : 4000<br />
SQL version is acceptable: 10.0.4000.0<br />
Default database data file path is M:<br />
Default database log file path is L:<br />
Error: dbpath must be a fully qualified drive and path, ie c:\sql\db<br />
 </blockquote>

<p>Notice the final line which points out the database path requires a drive <b><i>and</i></b> path. I had been selecting the option to use the SQL database default paths for the CMS and FE pool databases, but these DB paths were simply a drive letter. Since this is considered invalid for Lync I modified the SQL instance default paths to include a folder after the drive letter.</p>

<p><a href="http://www.confusedamused.com/wp-content/pictures/2011/09/dbs-e1315328484874.png"><img src="http://www.confusedamused.com/wp-content/pictures/2011/09/dbs-e1315328531633.png" alt="" title="dbs" width="550" height="493" class="alignnone size-full wp-image-1081" /></a></p>

<p>After this change the topology published just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/topology-builder-mmc-crash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OCS Create Pool Wizard Error: Invalid database parameter</title>
		<link>http://www.confusedamused.com/notebook/ocs-create-pool-wizard-error-invalid-database-parameter/</link>
		<comments>http://www.confusedamused.com/notebook/ocs-create-pool-wizard-error-invalid-database-parameter/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 01:31:20 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Office Communications Server 2007 R2]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[2007]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[pool]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[sp2]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=987</guid>
		<description><![CDATA[Recently I had a project where we were moving the OCS databases to a new clustered SQL 2008 (R1) with SP2 Back-End and ran into a lovely new error I&#8217;d never seen before &#8211; also not seen before anywhere on Google!

For starters, we followed the steps outlined on Technet. After we had successfully detached and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had a project where we were moving the OCS databases to a new clustered SQL 2008 (R1) with SP2 Back-End and ran into a lovely new error I&#8217;d never seen before &#8211; also not seen before anywhere on Google!</p>

<p>For starters, we followed <a href="http://technet.microsoft.com/en-us/library/dd572422(office.13).aspx">the steps outlined on Technet</a>. After we had successfully detached and attached all databases and ran the LCSCMD.exe step, we launched the Create Pool wizard and attempted to plug in the info for the new SQL cluster. We got this error back:</p>

<blockquote>
An error occurred during the pool backend detection:<br /><br />

Pool backend discovery failed.<br /><br />

Invalid database parameter.
</blockquote>

<p>I double-checked the server name, instance, and FQDN and all looked well. We verified the SQL server was accessible via TCP 1433 and no firewall rules were preventing access, so the error didn&#8217;t make a lot of sense. Obviously there was some kind of parameter that the wizard GUI was not cool with. I thought maybe this was the <a href="http://support.microsoft.com/kb/961944">SQL allow updates issue</a>, but that solution had no effect on this error. There was definitely some validation check the UI was failing on against our new DB.</p>

<p>Since I couldn&#8217;t locate anyone else with this issue I figured my options were to call PSS and extend this process by a few hours, or pull out the ol&#8217; LCSCMD.exe again and try this operation via command line. The Create Pool wizard really is just collecting a bunch of information and then using it to execute the LCSCMD.exe commands in the background so while doing it manually is not fun, it works just as well.</p>

<p>The <a href="http://technet.microsoft.com/en-us/library/dd572972(office.13).aspx">entire syntax for LCSCMD.exe can be found on Techet</a>, but here is the command we ended up running. Please note, conferencing archiving was not implemented so that paramter is not present.</p>

<p><pre><code>LCSCMD.exe /Forest /Action:CreatePool /PoolName:MyOCSPool /PoolBE:MySQLServer.ptown.local\OCSInstance /PoolFQDN:MyOCSPool.ptown.local /InternalWebFQDN:MyOCSPool.ptown.local /ExternalWebFQDN:PublicOCSWebComponents.confusedamused.com /RefDomain:ptown.local /ABOutputlocation:&#92;&#92;MyFileServer\AddressBook /MeetingContentPath:&#92;&#92;MyFileServer\MeetingContent /MeetingMetaPath:&#92;&#92;MyFileServer\MeetingMetadata /AppDataLocation:&#92;&#92;MyFileServer\AppData /ClientUpdateLocation:&#92;&#92;MyFilerServer\ClientUpdates /DBDataPath:"D:\Databases" /DBLogPath:"L:\Logs" /DynDataPath:"D:\Databases" /DynLogPath:"L:\Logs" /ABSDataPath:"D:\Databases" /ABSLogPath:"L:\Logs" /ACDDataPath:"D:\Databases" /ACDLogPath:"L:\Logs"</code></pre></p>

<p>After running the command manually it succeeded with absolutely no issues. The new cluster has been running for over a week now without any issues so I think this is an problem specific to the UI. I&#8217;m not sure exactly what causes it, but our environment was running SQL 2008 with SP2 on top of a 2008 R2 SP1 operating system.</p>

<p>As a sidenote, this process seems to undo any changes made by the OCS2009-DBUpgrade.msi patches. You&#8217;ll need to re-run the patch version which lines up with your FE patch levels before the FE services will be able to start.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/ocs-create-pool-wizard-error-invalid-database-parameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OCS Create Pool Step Failure Drops Conference Directories</title>
		<link>http://www.confusedamused.com/notebook/ocs-create-pool-step-failure-drops-conference-directories/</link>
		<comments>http://www.confusedamused.com/notebook/ocs-create-pool-step-failure-drops-conference-directories/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 21:41:03 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Office Communications Server 2007 R2]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dbimexp]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[pstn]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=980</guid>
		<description><![CDATA[Something to keep in mind before you ever move an OCS database is that you&#8217;ll want to grab backups of the user data and conference directories so that you can restore the data just in case anything goes wrong with your move operation. The conference directory objects map conference IDs and passcodes used by PSTN [...]]]></description>
			<content:encoded><![CDATA[<p>Something to keep in mind before you ever move an OCS database is that you&#8217;ll want to grab backups of the user data and conference directories so that you can restore the data just in case anything goes wrong with your move operation. The conference directory objects map conference IDs and passcodes used by PSTN dial-in users to a specific Live Meeting instance. These objects are stored in Active Directory and not in the OCS back-end database like you might expect, but you can still back up all the data these objects hold.</p>

<p>You can export all user data and conference directories with the following command:</p>

<p><pre><code>dbimpexp.exe /hrxmlfile:everything.xml /sqlserver:SQL.ptown.local\OCS</code></pre></p>

<p>I usually also grab a separate backup of just the conference directories from the pool:</p>

<p><pre><code>dbimpexp.exe /hrxmlfile:confdirs.xml /sqlserver:SQL.ptown.local\OCS /restype:confdir</code></pre></p>

<p>After these run successfully you can copy these files off to a safe place and then proceed with your database operations. </p>

<p>As you are moving the databases around one of the steps on Technet will have you re-run the Create Pool wizard, but if this step fails for any reason the installer will kick into its rollback mode and remove any configuration changes it made. What&#8217;s not terribly apparent is that part of <b>this rollback process removes all conference directories on the pool without any warning.</b> </p>

<p>So say this step fails on something silly like a file share permission you&#8217;ll suddenly find you dropped all your conference directories. The end result of that is users calling in to meetings via PSTN will no longer be able to enter conference ID and passcode to join the meetings hosted on that pool. </p>

<p>I recently ran a DB move and the user account we used did not explicityly have Full Access rights to one of the OCS file shares (it had been removed at some point for an unknown reason), but the result was the Create Pool operation kicked into rollback mode and removed the pool&#8217;s conference directories. We had a solid backup of these to restore from, but this customer had previously lost the directory the first time they tried this operation on their own because of the same problem.</p>

<p>If the directories are dropped and you don&#8217;t have a backup via DBImpExp.exe you&#8217;ll need to recreate the conference directories on the admin side, but the big pain point is that all users will need to reschedule their meetings (because the previous ID/Passcode mappings are no longer valid). It&#8217;s a really ugly user experience and likely to not go over very well. If only you had backed these up in advance!</p>

<p>I would imagine you could restore the conference directory object stored in AD and possibly get that hooked back up to OCS, but your best bet is really to be using DbImpExp.exe instead. A general best practice for any OCS environment is to be taking regular backups of your OCS data and conference directories via DbImpExp.exe so that way you&#8217;ll never find yourself in this situation.</p>

<p>If your Create Pool step does fail at least one time you&#8217;ll need to restore the directories because they&#8217;ve been dumped. After you work out the Create Pool step issue and succeed in starting up your Front-End services  you can proceed with the conference diretory restore.</p>

<p>The syntax to restore just the conference directories from the pool is:</p>

<p><pre><code>dbimpexp.exe /import /hrxmlfile:confdirs.xml /sqlserver:SQL.ptown.local\OCS /restype:confdir</code></pre></p>

<p>After running this you should be able to dial in via PSTN and enter a conference ID and passcode from a pre-existing meeting again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/ocs-create-pool-step-failure-drops-conference-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving the Lync Central Management Store</title>
		<link>http://www.confusedamused.com/notebook/moving-the-lync-central-management-store/</link>
		<comments>http://www.confusedamused.com/notebook/moving-the-lync-central-management-store/#comments</comments>
		<pubDate>Thu, 05 May 2011 17:42:29 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Lync Server 2010]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[lync]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=952</guid>
		<description><![CDATA[As companies move from piloting Lync to a full-blown implementation you’ll likely end up in a scenario where you need to move the Central Management Store (CMS) from a proof-of-concept pool to a production-worthy one. 

This is hopefully a no-brainer, but first you should back up the CMS. Keep in mind that in order to [...]]]></description>
			<content:encoded><![CDATA[<p>As companies move from piloting Lync to a full-blown implementation you’ll likely end up in a scenario where you need to move the Central Management Store (CMS) from a proof-of-concept pool to a production-worthy one. </p>

<p>This is hopefully a no-brainer, but first you should back up the CMS. Keep in mind that in order to restore the CMS you also need the LIS database, so export both of these. </p>

<p><pre><code>Export-CsConfiguration –FileName config.zip
Export-CsLisConfiguration –FileName lis.zip</code></pre></p>

<p>Next, you need to install an empty database to house the new CMS. I typically use the –UseDefaultSQLPaths parameter to control where these databases are installed on the file system. You can also use the -DatabasePaths parameter for more control. </p>

<p><pre><code>Install-CsDatabase –CentralManagementStore –UseDefaultSQLPaths –SQLServerFQDN &lt;SQL Server FQDN&gt;</code></pre></p>

<p>Next, enable this topology change: </p>

<p><pre><code>Enable-CsTopology</code></pre></p>

<p>Verify all of your replicas are up to date before actually moving the CMS. When ready, log on to a Front-End server for the <b><i>target</i></b> pool hosting the CMS (Technet says the source, but this is incorrect. I’ve added a comment there as well). You’ll need to open the Lync Management Shell with elevated privileges (Right-click, Run as Administrator) or the next step will fail. </p>

<p><pre><code>Move-CsManagementServer</code></pre></p>

<p>You’ll be prompted to confirm the source and destination. Press Y to accept the move and hopefully it succeeds! </p>

<p>I had to restart both the Master Replica Service and File-Transfer Agent service on the Front-End I used to move the CMS to clear up errors in the event log that it could not connect to the back-end database. Once done, very your replica status is all up to date again.</p>

<p>After the move you need to clean up a few things. You’ll want to launch the setup wizard and run the “Install or Update Lync Server System” step for any Front-End server which was part of the old pool, and for any Front-End server which is part of the new pool. This step adds or removes the required services for a Front-End to serve as a CMS master replica.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/moving-the-lync-central-management-store/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Broken Lync Monitoring Server Reports</title>
		<link>http://www.confusedamused.com/notebook/broken-lync-monitoring-server-reports/</link>
		<comments>http://www.confusedamused.com/notebook/broken-lync-monitoring-server-reports/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 03:13:19 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Lync Server 2010]]></category>
		<category><![CDATA[lync]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=869</guid>
		<description><![CDATA[This afternoon I ran into an issue with deploying the Lync Server Monitoring Reports. The scenario was a 2-node SQL 2008 Back-End cluster and one of the SQL nodes had Reporting Services installed along with the Lync Monitoring role.  I assume the problem has something to do with the topology in place because I [...]]]></description>
			<content:encoded><![CDATA[<p>This afternoon I ran into an issue with deploying the Lync Server Monitoring Reports. The scenario was a 2-node SQL 2008 Back-End cluster and one of the SQL nodes had Reporting Services installed along with the Lync Monitoring role.  I assume the problem has something to do with the topology in place because I haven&#8217;t seen this happen in other deployments. The reports were deployed successfully through the installation wizard, but I was unable to actually run any of the them. I couldn&#8217;t even open the Monitoring Server Dashboard and I would get an error like this each time:</p>

<blockquote>Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source &#8216;CDRDB&#8217;. &#8212;&gt; System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server)</blockquote>

<p>After searching high and low for a reason why I noticed the data sources for the reports were configured incorrectly by the deployment wizard. Even though the node was part of a SQL cluster the data source was configured as if the SQL server was a standalone local instance. You can see this in the connection string:</p>

<p><a href="http://www.confusedamused.com/wp-content/pictures/2010/12/sqlconnection.png"><img src="http://www.confusedamused.com/wp-content/pictures/2010/12/sqlconnection.png" alt="" title="sqlconnection" width="534" height="314" class="alignnone size-full wp-image-870" /></a></p>

<p>To resolve this use the following steps:</p>

<ol>
<li>Browse to the SQL Server Reports home page: http://&lt;Reporting Services Server Name&gt;/Reports.</li>
<li>Click on the <b>LyncServerReports folder</b>.</li>
<li>Click the <b>Reports_Content folder</b>.</li>
<li>You&#8217;ll see the CDRDB and QMSDB data sources. Click the <b>CDRDB</b> data source to start.</li>
<li>In the <b>connection string</b> field, edit the data source to be the SQL server name (and instance if applicable) instead of the text that says &#8220;(local)&#8221;. </li>
</ol>

<p>Repeat these steps for the QMSDB data source. After that, the Monitoring reports dashboard and reports should run. As an example, my CDRDB data source connection string now reads:</p>

<p><blockquote>data source=LYNCSQL;initial catalog=LcsCDR</blockquote></p>

<p>When updating the QMSDB the initial catalog parameter is going to be slightly different (QoEMetrics) so be careful to only change the data source if you&#8217;re leveraging copy/paste.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/broken-lync-monitoring-server-reports/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sharing Physical NICs with Guest VMs for iSCSI Traffic on Hyper-V</title>
		<link>http://www.confusedamused.com/notebook/sharing-physical-nics-with-guest-vms-for-iscsi-traffic-on-hyper-v/</link>
		<comments>http://www.confusedamused.com/notebook/sharing-physical-nics-with-guest-vms-for-iscsi-traffic-on-hyper-v/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 04:35:25 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[lync]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=835</guid>
		<description><![CDATA[Since Microsoft has introduced support for virtualizing many more workloads with Lync Server 2010 we&#8217;ll probably begin to see more and more deployments done with a hypervisor. One challenge can be providing shared storage access to a virtual machine guest operating system running on top of a hypervisor such as Hyper-V. An example here would [...]]]></description>
			<content:encoded><![CDATA[<p>Since Microsoft has introduced support for virtualizing many more workloads with Lync Server 2010 we&#8217;ll probably begin to see more and more deployments done with a hypervisor. One challenge can be providing shared storage access to a virtual machine guest operating system running on top of a hypervisor such as Hyper-V. An example here would be if a company wants to provide high-availability for the Lync pool back-end running a SQL server cluster, which requires shared storage for the quorum, MSDTC, and data volumes.</p>

<p>It&#8217;s not uncommon for Hyper-V hosts to be configured in a failover cluster using dedicated NICs for iSCSI access, but how often does a guest VM typically need access to shared storage? Typically not often. Usually if a VM needs access to the SAN you can connect to the LUN from the host and then pass it through to the guest. With a SQL cluster though, both VMs should reside on separate hosts and need direct access to the SAN. In order to accomplish this you need to initiate iSCSI connections from within the guest VM directly to the SAN.</p>

<p>If you have unlimited NICs this is really easy. Just bind a physical NIC (pNIC) connected to the storage network to a Hyper-V virtual switch, create a new virtual NIC (vNIC) on the Hyper-V guest on this switch, and away you go &#8211; the guest now has iSCSI network access. For more realistic scenarios you may be limited on your NIC count and have to get creative because you can&#8217;t dedicate  a pNIC to VMs only. </p>

<p><p>If this is true the first option that comes to mind is to leverage VLAN tagging on a virtual switch already using a pNIC. This way you can tag LAN traffic and storage network traffic separately. The downside to this approach is you&#8217;re now sharing the same pNIC for both LAN and storage traffic in VMs. The host OS still has a dedicated NIC for iSCSI traffic here. If the LAN traffic starts maxing out the capacity of the adapter you could potentially lose connectivity to the SAN and cause some serious problems for the cluster. This configuration would look like this:</p>
<p><a href="http://www.confusedamused.com/wp-content/pictures/2010/11/Drawing3.png"><img src="http://www.confusedamused.com/wp-content/pictures/2010/11/Drawing3.png" alt="" title="Drawing3" width="550" height="200" class="alignnone size-full wp-image-837" /></a></p>
<p>Another option here is to leverage the network adapters already used by the host system for iSCSI access, i.e. the same adapters accessing the SAN and providing high-availability for the guest VMs. That may seem like a poor idea, but I think the alternative of sharing LAN and iSCSI network on the same adapter is far worse. In this configuration the Hyper-V host and the VM guest are both accessing the storage network through the same physical NIC, dedicated purely for storage traffic. A virtual NIC is created on the host and the host traffic also passes through the Hyper-V virtual switch in this scenario. The host and guest sharing a pNIC setup is depicted here:</p>
<p><a href="http://www.confusedamused.com/wp-content/pictures/2010/11/Drawing4.png"><img src="http://www.confusedamused.com/wp-content/pictures/2010/11/Drawing4.png" alt="" title="Drawing4" width="550" height="220" class="alignnone size-full wp-image-841" /></a></p>
<p>In order to accomplish this setup you&#8217;ll want to use the following steps:</p>
<ol>
<li>Shut down any VMs running on the host OS.</li>
<li>Stop any iSCSI access from the host.</li>
<li>Create a new Hyper-V virtual switch using the pNIC previously dedicated to iSCSI. Be sure to check the box &#8220;Allow management operating system to share this network adapter.&#8221;</li>
<li>Configure the new network adapter on the host OS with the old pNIC IP address and settings.</li>
<li>Reconnect iSCSI targets.</li>
<li>Edit the VM guest and add a new network adapter. Assign the network adapter to the iSCSI network virtual switch.</li>
<li>Configure iSCSI targets from within the guest VM</li>
</ol>
<p>At this point, all your storage traffic is isolated to the same physical NIC.</p>
<p><b>Warning</b>: I cannot for the life of me find documentation from Microsoft on whether or not this actually supported. If I were to wager a guess it&#8217;s on the unsupported side, but probably because of the &#8220;We haven&#8217;t tested this&#8221; reason more than the &#8220;It doesn&#8217;t work&#8221; reason. Your mileage may vary on your deployment, but this appears to be working just fine. I was a little reluctant to try this thinking the host OS may have iSCSI performance problems through the Hyper-V virtual switch, but all seems well so far.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/sharing-physical-nics-with-guest-vms-for-iscsi-traffic-on-hyper-v/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OCS2009-DBUpgrade.msi with a 32-bit SQL Server Back-End</title>
		<link>http://www.confusedamused.com/notebook/ocs2009-dbupgrademsi-with-a-32-bit-sql-server-back-end/</link>
		<comments>http://www.confusedamused.com/notebook/ocs2009-dbupgrademsi-with-a-32-bit-sql-server-back-end/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 17:02:20 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Office Communications Server 2007 R2]]></category>
		<category><![CDATA[2005]]></category>
		<category><![CDATA[2007]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[x64]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/notebook/ocs2009-dbupgrademsi-with-a-32-bit-sql-server-back-end/</guid>
		<description><![CDATA[I wanted to point out a quick note about KB 969834 aka the OCS2009-DBUpgrade.msi file &#8211; The KB article suggests running the package from your Back-End database server, but if you’re running SQL 2005 x86 you’ll be greeted with the following error:  This installation package is not supported by this processor type.  Basically, [...]]]></description>
			<content:encoded><![CDATA[<p><p>I wanted to point out a quick note about <a href="http://support.microsoft.com/kb/969834">KB 969834</a> aka the OCS2009-DBUpgrade.msi file &#8211; The KB article suggests running the package from your Back-End database server, but if you’re running SQL 2005 x86 you’ll be greeted with the following error:</p>  <blockquote>This installation package is not supported by this processor type.</blockquote>  <p>Basically, the MSI needs to be run from an x64 machine so your only option now is to run the update directly from your Front-End server. If you try to launch from there  you might receive this error:</p>  <blockquote>You must install Microsoft SQL Server 2005 Client Tools before you install Microsoft Office Communications Server 2007 R2 (KB969834).</blockquote>  <p>You could try install the SQL Tools and Service Pack updates from installation, but OCS is looking for very specific versions of the SQL tools. The quickest and easiest way is to just use a couple of downloads from the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=50b97994-8453-4998-8226-fa42ec403d17&amp;DisplayLang=en">Feature Pack for Microsoft SQL Server 2005 &#8211; February 2007</a>.</p>  <p>You’ll want to download and install the following on your R2 Front-End before running the update:</p> <ul> <li>Microsoft SQL Server 2005 Backward Compatibility Components (x64 package)</li> <li>Microsoft SQL Server 2005 Management Objects Collection (x64 package) </li> </ul>  <p>After running those installers you should be able to run the DB upgrade successfully. Don’t forget – you need to run that MSI from a command line with the poolname (Non-FQDN version) parameter. And if you&#8217;re using Server 2008 be sure open the command prompt as Administrator so it runs with elevated rights. Example:</p>  <pre><code>OCS2009-DBUpgrade.msi POOLNAME=MyFirstPool</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/ocs2009-dbupgrademsi-with-a-32-bit-sql-server-back-end/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Your OCS Front-End and DPM 2010 Part 3: Recovery</title>
		<link>http://www.confusedamused.com/notebook/your-ocs-front-end-and-dpm-2010-part-3-recovery/</link>
		<comments>http://www.confusedamused.com/notebook/your-ocs-front-end-and-dpm-2010-part-3-recovery/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 22:55:46 +0000</pubDate>
		<dc:creator>Tom Pacyk</dc:creator>
				<category><![CDATA[Data Protection Manager 2010]]></category>
		<category><![CDATA[Office Communications Server 2007 R2]]></category>
		<category><![CDATA[2007]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dpm]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[rtc]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.confusedamused.com/?p=535</guid>
		<description><![CDATA[Now would normally be the time where everyone is running around like their head has been cut off because your Front-End server is totally hosed, but because you followed the backup procedures in Part 1 (you did run the backup, right?) restoring service to your OCS server is fairly simple.  Restore the Database  [...]]]></description>
			<content:encoded><![CDATA[<p><p>Now would normally be the time where everyone is running around like their head has been cut off because your Front-End server is totally hosed, but because you followed the backup procedures in Part 1 (you <em>did</em> run the backup, right?) restoring service to your OCS server is fairly simple.</p>  <h4>Restore the Database</h4>  <ol>   <li>Open up the DPM console. </li>    <li>Click the Recovery tab at the top. </li>    <li>We need to restore the SQL database and files separately, but let&#8217;s start with the database. Expand the tree to &lt;Forest Name&gt;\&lt;OCS Server&gt;\All Protected SQL Instances\&lt;OCS Server&gt;\RTC\rtc      <br /></li>    <li>Highlight a suitable recovery date in the calendar and select the RTC database below.      <br /></li>    <li>Right-click and select Recover&#8230;      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200915940pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 1-59-40 PM" border="0" alt="10-9-2009 1-59-40 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200915940pm-thumb.png" width="500" height="392" /></a> </li>    <li>Press Next.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920109pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-01-09 PM" border="0" alt="10-9-2009 2-01-09 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920109pm-thumb.png" width="500" height="396" /></a> </li>    <li>We&#8217;ve successfully screwed up the server to where we might as well recover to the original SQL server. Select that option and press Next.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920112pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-01-12 PM" border="0" alt="10-9-2009 2-01-12 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920112pm-thumb.png" width="500" height="398" /></a> </li>    <li>Select Leave database operational and press Next.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920116pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-01-16 PM" border="0" alt="10-9-2009 2-01-16 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920116pm-thumb.png" width="500" height="399" /></a> </li>    <li>No options needed. Just press Next.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920121pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-01-21 PM" border="0" alt="10-9-2009 2-01-21 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920121pm-thumb.png" width="500" height="398" /></a> </li>    <li>Yup, those are the files we need. Press Recover.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920143pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-01-43 PM" border="0" alt="10-9-2009 2-01-43 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920143pm-thumb.png" width="500" height="399" /></a> </li>    <li>Press Close while the recovery operation occurs.      <br /></li>    <li>If you click the Monitoring tab you can view the jobs in process.      <br /></li> </ol>  <h4>Restore the Files</h4>  <ol>   <li>Now we need to restore files separately. Expand the tree to &lt;Domain Name&gt;\&lt;OCS Server&gt;\All Protected Protected Volumes\&lt;OCS Installation Volume&gt; </li>    <li>Highlight a suitable recovery date in the calendar and select the Program Files folder below.      <br /></li>    <li>Right-click Program Files and select Recover&#8230;      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920628pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-06-28 PM" border="0" alt="10-9-2009 2-06-28 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920628pm-thumb.png" width="500" height="394" /></a> </li>    <li>Press Next.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920634pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-06-34 PM" border="0" alt="10-9-2009 2-06-34 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920634pm-thumb.png" width="500" height="401" /></a> </li>    <li>Select Recover to the original location and press Next.      <br />&#160; <a href="http://www.confusedamused.com/wp-content/pictures/2009/10/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.confusedamused.com/wp-content/pictures/2009/10/image-thumb.png" width="500" height="402" /></a> </li>    <li>Select to Overwrite the existing versions (if any), and then select to Apply the security settings of the recovery point version. Press Next.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920751pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-07-51 PM" border="0" alt="10-9-2009 2-07-51 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920751pm-thumb.png" width="500" height="397" /></a> </li>    <li>Now press Recover.      <br /><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920758pm.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="10-9-2009 2-07-58 PM" border="0" alt="10-9-2009 2-07-58 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200920758pm-thumb.png" width="500" height="400" /></a> </li>    <li>Press Close while the recovery operation occurs.      <br /></li>    <li>If you click the Monitoring tab you can view the jobs in process.      <br /></li> </ol>  <h4>Fix SQL Database Chaining</h4>  <p>One thing DPM won&#8217;t restore is an option within SQL. If you miss this step your Front-End services will fail to start.</p>  <ol>   <li>Open SQL Management Studio (Express). </li>    <li>Press the New Query button. </li>    <li>Enter the following text: <code><pre>sp_dboption 'rtc','db chaining',TRUE</pre></code></li></p>

<p><li>Press Execute. 
    <br /></p>

<pre><code>&lt;br /&gt;&lt;a href="http://www.confusedamused.com/wp-content/pictures/2009/10/image1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.confusedamused.com/wp-content/pictures/2009/10/image-thumb1.png" width="500" height="258" /&gt;&lt;/a&gt; &lt;/li&gt;
</code></pre>

<p></ol></p>

<h4>Bounce the Server</h4>

<p>If you check your OCS Front-End you&#8217;ll find all the files you deleted previously have now returned. You could probably get away with restarting services as this point, but since the machine was completed hosed I&#8217;m just going to restart the server and cross my fingers.</p>

<h4>Check Functionality</h4>

<p>After the restart all of my OCS services started successfully and my errors have gone away. You can see now my Communicator list still has my contacts and access levels defined. Likewise, Device Updates and client auto updates should function normally now. 
  <br /></p>

<p><a href="http://www.confusedamused.com/wp-content/pictures/2009/10/109200922618pm.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="10-9-2009 2-26-18 PM" border="0" alt="10-9-2009 2-26-18 PM" src="http://www.confusedamused.com/wp-content/pictures/2009/10/109200922618pm-thumb.png" width="257" height="413" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.confusedamused.com/notebook/your-ocs-front-end-and-dpm-2010-part-3-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

