Archive Page 2

29
May
14

Remove-SPUser PowerShell Command: How to Use it in SharePoint 2013

I was trying to use the Remove-SPUser cmdlet and kept getting this error:

Remove-SPUser : You must specify a valid user object or user identity.

image

With claims based authentication the cmdlet Get-SPUser returns all users like this:

image

So, you can see the format of the –Identity (UserLogin) is something like this:

i:0#.w|DOMAIN\USERID

This thread referred to the Get-SPUser cmdlet and using New-SPClaimsPrincipal, but what I found was pretty simple.

http://social.msdn.microsoft.com/Forums/en-US/260ad45b-cfe7-4699-842b-fc2ecdf6e543/powershell-cant-getspuser-adfs-user?forum=sharepointgeneralprevious

Use this format for the cmdlet:

Remove-SPUser -identity "i:0#.w|cfgmgt\rwright" -web http://cmsp2013:5555

The trick for me was to put double quotes around the encoded user name.

Now, if the Microsoft documentation would be more accurate…

19
May
14

Create MS Access View Missing after Installing Hotfix KB2553170

Windows 7 SP1, Office 2010, accessing SharePoint 2013 on both Office 365 and on-premises.

You might find you have an issue when attempting to create an Access view from SharePoint 2013.  In this case I was getting an error when I clicked on Access View, "Export to database failed. To export a list, you must have a Microsoft SharePoint Foundation-compatible application."

image

I found an article where this error was being discussed.  There was a hotfix issued in December 2013 that addressed the issue.  However, after installing the hotfix, I found the Access View link on the create view page was missing.  This required performing an Office 2010 repair (from Programs and Features) by selecting Change on Office 2010.

image

After doing this and rebooting, the link was back…and it worked!  This is the 2nd time in the last week I’ve had to perform an Office 2010 repair.  I think it all started when I installed SharePoint Designer 2013 on this machine (it already has SPD2007 and SPD2010).

Hey Microsoft, stop breaking your software!

13
May
14

Opening Office Document Information Panel with Managed Metadata Causes Application to Crash

Every time I opened a Word document (or tried to create one) using a content type in SharePoint 2013 that had a managed metadata column and the document information panel was displayed, Word would crash.

This was happening on both my Windows 8.1 Lenovo Yoga that has Office 2010 and Office 2013 and My Windows 7 Dell D830 that has Office 2010.  Both of these machine had SharePoint Designer 2013 installed on them, in addition to SPD 2007 and SPD 2010.

I found this post from L.L that seemed to address my problem.  It appears that running an office repair fixes the issue.  Yay!

I guess the last one you repair (Office 2013 or Office 2010) is the one that gets registered as the default application.  Which is okay by me, because I am constantly annoyed by the ditching of skeuomorphism and replacement of flat design found within Office 2013.

Keywords:  Office 2010, Office 2013, SharePoint 2013, Managed metadata, Content types, Crash, MS Word 2010, MS Word 2013.

12
Mar
14

Changing Host Header for the MySite Host in SharePoint 2013

Update for SharePoint 2013:

I recently set up a SharePoint 2013 site and provisioned the MySite host as "My.domain.com" when I should’ve used something like "MyTest.domain.com."

In order to fix this, it’s very similar to fixing it in 2007. 

Change the alternate access mapping.

image

Edit the default zone URL.

image

Edit the Site Binding in IIS to reflect the new host header.

image

Manage Service Applications

image

Click on your User Profile Service Application to manage it.

image

Go to Setup My Sites.

image

Change the My Site Host location.

image

IISReset and you should be good to go.

image

Hey, and if you want to change the name of the web application so it matches (I know, I know…it’s a bit anal, but I’m kinda’ OCD), here’s some PowerShell.

$WebApp = SPWebApplication | where {$_.Name -match "OldWebAppNameGoesHere"}
$WebApp.Name ="NewWebAppNameGoesHere"
$WebApp.Update()

 

 

 

Original post for SharePoint 2007:

I was playing around with SharePoint on my virtual machine and had set up a new installation of MOSS when I noticed I had entered a host header incorrectly (at least incorrectly from the standpoint of being consistent with my previous installations). I entered "MySite" instead of "MySites" as the first part of the host header. I know, I know, it’s probably more correct to use the singular, but I was trying to be consistent with what others had done.
All I wanted to do was to change the host header and have SharePoint recognize the change. I performed the standard internet search and didn’t get instant gratification, so I started playing around. I found that making the changes in three places and an IISRESET seemed to take care of my problem.
First, in Central Administration under Operations, Global Configuration, Alternate access mappings, edit the internal URL.


Next, open up IIS Manager and select the properties of the MySites web app. Change the host header by clicking on the Advanced… button.


Again in Central Administration, navigate to the Shared Services provider and click on My Site settings in the User Profiles and My Sites section. Change the personal site provider URL.


Perform an IISRESET. All should be well.

05
Feb
14

Deleting List or Library Fields Breaks Data View Web Part in SharePoint 2007

Okay, I know this is OLD 2007, but some folks are still running it!

This is actually a two-part fix. 

  1. Fix the data source so it isn’t referencing the deleted fields
  2. Fix the web part so it isn’t referencing deleted fields from the data source

Here’s the web part that is showing an error because field(s) were deleted from the underlying list (library).

image

The data source will not return any data because it is also messed up due to the deleted list fields.

image

You can find the datasource in the _fpdatasources folder.

image

Then you can edit it in XML or Text mode.  You probably need to check it out first, or you won’t be able to save it!

image

Fix the data source.  This involves finding the field in the data source XML that has been deleted.  In this example, we have found <FieldRef Name="Scorecard"> that has been encoded (e.g. &lt;).  Delete it, and be sure you get all the correct text deleted. 

image

Now you can see the data in the data source once again!

image

You need to fix the web part by finding the extra field(s) that are being referenced and remove them from the data source reference.

image

In the code view, find the <DataSources> tag and you can then locate the <datafields> section where the deleted list fields are still present.  You need to remove them as shown above.

image

 

 

References:

The server returned a non-specific error when trying to get data from the data source.  Check the format and content of your query and try again.  If the problem persists, contact the server administrator.

23
Jan
14

Creating a Link to Open a Word Document Content Type in SharePoint 2010

You might be familiar with creating a content type on a document library and associating a Word template with that content type.  When you do this, you end up with a very nice link in the Documents menu that fills in the blank, "I want to create a new ______."  In this case, I want to create a new ECCN Classification Document.

image

When Word opens up, it uses the template on the list content type so you can expose the content type columns as Quick Parts in Word.  If you’re not familiar with this process, it’s kind of a poor man’s form for SharePoint.

image

Once you’ve done this, you might want to create a link to use this on other pages and in other places…and least that’s what I wanted to do.

When you start looking around for a solution to this, you might find this post by Srini Sistla which is pretty much the route I originally went down.  It involves viewing the source on the page with the menu and attempting to replicate what the menu does.

image

This ends up with some JavaScript that runs CoreInvoke that then appears to wrap createNewDocumentWithRedirect.  Trying to read through all the encoded gibberish will make your head hurt, but you can do it and it will work. 

My goal was to make this as simple as possible and, assuming it was going to require some JavaScript to make it happen, I wanted it to be a lot more readable.  Also, I don’t want to include a lot of extra, hard-to-read and understand, code that doesn’t really add to the solution.  In this vein, I felt I should be able to execute createNewDocumentWithRedirect and not have to wrap it in anything else.  Perhaps I don’t understand fully what CoreInvoke is doing.  What I’ve found is it doesn’t appear to be doing much for the solution I need.

If you do a little research, you’ll find there is a pretty straightforward definition for the createNewDocumentWithRedirect function.  Perhaps the most difficult part of using any function is to know what to pass for each of the parameters.  Here’s where I’ll try and elaborate and make it easy for you.  Here’s the definition.

function createNewDocumentWithRedirect(strTemplate, strSaveLocation, strProgID, bXMLForm, strRedirectUrl, defaultItemOpen)

strTemplate – A string value that identifies the URL to the template file associated with the content type.

strSaveLocation – A string value that identifies the default save location you want Word to display when performing a save.

strProgID – A string value to the program ID (ProgID) SharePoint.OpenDocuments which identifies a registry entry that is associated with a CLSID.  Like the CLSID, the ProgID identifies a class but with less precision because it is not guaranteed to be globally unique.

bXMLForm – A boolean (true/false) indicating whether this is an XML form.  False for Word and other office documents.

strRedirectUrl – A string value that contains the URL to redirect to after closing Word.  NOTE:  I’m not positive this works when closing Word.  I haven’t been able to get it to work.  Does it require CoreInvoke?  I tried that and it didn’t work either.

defaultItemOpen – Specifies whether to open items in a client application or in the browser.  Not really sure if it has much affect on opening Word documents in this context, but a 0 means open in the thick client and 1 means open in the thin (web) client.

Here’s what the ProgID looks like in the registry.  You’ll see that SharePoint.OpenDocuments points to SharePoint.OpenDocuments5 which, in turn, points to the CLSID (unique identifier for the class).  Kinda’ like "there’s a hole in the bottom of the sea."

image

image

image

So, if we continue on and create an anchor <a> link with some JavaScript on the onclick event, it looks something like this, which is much easier to read.

NOTE:  If you copy and paste this be aware that the single quotes can get changed to the accent grave variety (not the ambidextrous single quote we are used to, the ')

<a onclick="createNewDocumentWithRedirect(‘https://yoursite.com/sites/WPL/CCL/Saved Records/Forms/ECCN Classification Document/ECCN Classification.docx’, ‘https://yoursite.com/sites/wpl/ccl/saved records’, ‘SharePoint.OpenDocuments’, false, ‘https://yoursite.com/sites/wpl/ccl&#8217;, 1);" href="#">createNewDocumentWithRedirect Test</a>

When you put this in a content editor web part in SharePoint 2010, it will encode the apostrophes and change them to '.

However, you’ll note that I didn’t have to encode the spaces in my links, and they work just fine.

So, what are these links anyway?  The first one, strTemplate, is the link to the template that was uploaded.  This is the link to the template on the list.  You can see this in SPD or look at the list content type page and copy it from the Edit Template link.

https://yoursite.com/sites/WPL/CCL/Saved Records/Forms/ECCN Classification Document/ECCN Classification.docx’

image

 

image

When you implement this in a content editor web part it looks something like this.  In this case I have two test links.  The "Word 2010" link uses the CoreInvoke function and the "createNewDocumentWithRedirect Test" link uses the createNewDocumentWithRedirect function.  Both seem to give me the same results, but the 2nd one is much easier to read and duplicate.

image

 

image

22
Dec
13

Installing Microsoft Office SharePoint Server 2007 on SQL Server 2012

Well, I got myself into a pickle.  I needed to create a SharePoint 2007 server instance within my domain so I could test some 2007/2010/2013 interactions.  It’s been a while since I installed 2007, but I thought it would be like riding a bicycle…you never really forget.  Turns out it was more like figuring out how to ride a unicycle.

I was planning on using best practices for all of the accounts necessary to perform a proper SharePoint installation.  And, for the most part, that went well.  The one thing I hadn’t planned on, however, was installing on SQL 2012.

I had recently upgraded my SQL VM to 2012 and that went without a hitch.  It was working fine, so out of sight, out of mind.  I started on my merry way.  I didn’t even consider whether MOSS 2007 would install on SQL 2012.  Hey, it’s SQL, right?  Well, not so fast, bucko!

The slipstreamed installation of 2007 w/SP2 actually went pretty well.  It was only after the installation and applying SP3 and some CU’s that I began to experience the incompatibilities, specifically in the SharePoint Products and Technologies Configuration Wizard.

sp_dboption is Deprecated and No Longer Exists in the Master Database

This was the first issue I had to overcome.  The configuration wizard calls sp_dboption but it no longer exists.  This was fairly easy to fix.  Simply get a copy of sp_dboption and add it back.  I present Exhibit A (sp_dboption) for your perusal.  (Skip to next topic)

USE [master]
GO
/****** Object: StoredProcedure [sys].[sp_dboption] Script Date: 12/08/2013 21:22:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [sp_dboption] -- 1999/08/09 18:25
@dbname sysname = NULL, -- database name to change
@optname varchar(35) = NULL, -- option name to turn on/off
@optvalue varchar(10) = NULL -- true or false
as
set nocount on

declare @dbid int -- dbid of the database
declare @catvalue int -- number of category option
declare @optcount int -- number of options like @optname
declare @allstatopts int -- bit map off all options stored in sysdatqabases.status
-- that can be set by sp_dboption.
declare @alloptopts int -- bit map off all options stored in sysdatqabases.status
-- that can be set by sp_dboption.
declare @allcatopts int -- bit map off all options stored in sysdatqabases.category
-- that can be set by sp_dboption.
declare @exec_stmt nvarchar(max)
declare @fulloptname varchar(35)
declare @alt_optname varchar(50)
declare @alt_optvalue varchar(30)
declare @optnameIn varchar(35)

select @optnameIn = @optname
,@optname = LOWER (@optname collate Latin1_General_CI_AS)

-- If no @dbname given, just list the possible dboptions.
-- Only certain status bits may be set or cleared by sp_dboption.

-- Get bitmap of all options that can be set by sp_dboption.
select @allstatopts=number from master.dbo.spt_values where type = 'D'
and name = 'ALL SETTABLE OPTIONS'

select @allcatopts=number from master.dbo.spt_values where type = 'DC'
and name = 'ALL SETTABLE OPTIONS'

select @alloptopts=number from master.dbo.spt_values where type = 'D2'
and name = 'ALL SETTABLE OPTIONS'

if @dbname is null
begin
select 'Settable database options:' = name
from master.dbo.spt_values
where (type = 'D'
and number & @allstatopts <> 0
and number not in (0,@allstatopts)) -- Eliminate non-option entries
or (type = 'DC'
and number & @allcatopts <> 0
and number not in (0,@allcatopts))
or (type = 'D2'
and number & @alloptopts <> 0
and number not in (0,@alloptopts))
order by name
return (0)
end

-- Verify the database name and get info
select @dbid = dbid
from master.dbo.sysdatabases
where name = @dbname

-- If @dbname not found, say so and list the databases.
if @dbid is null
begin
raiserror(15010,-1,-1,@dbname)
print ' '
select 'Available databases:' = name
from master.dbo.sysdatabases
return (1)
end

-- If no option was supplied, display current settings.
if @optname is null
begin
select 'The following options are set:' = v.name
from master.dbo.spt_values v, master.dbo.sysdatabases d
where d.name=@dbname
and ((number & @allstatopts <> 0
and number not in (-1,@allstatopts)
and v.type = 'D'
and (v.number & d.status)=v.number)
or (number & @allcatopts <> 0
and number not in (-1,@allcatopts)
and v.type = 'DC'
and d.category & v.number <> 0)
or (number & @alloptopts <> 0
and number not in (-1,@alloptopts)
and v.type = 'D2'
and d.status2 & v.number <> 0))
return(0)
end

if @optvalue is not null and lower(@optvalue) not in ('true', 'false', 'on', 'off')
begin
raiserror(15241,-1,-1)
return (1)
end

-- Use @optname and try to find the right option.
-- If there isn't just one, print appropriate diagnostics and return.
select @optcount = count(*) ,@fulloptname = min(name)
from master.dbo.spt_values
where lower(name collate Latin1_General_CI_AS) like '
%' + @optname + '%'
and ((type = '
D'
and number & @allstatopts <> 0
and number not in (-1,@allstatopts))
or (type = '
DC'
and number & @allcatopts <> 0
and number not in (-1,@allcatopts))
or (type = '
D2'
and number & @alloptopts <> 0
and number not in (-1,@alloptopts)))

-- If no option, show the user what the options are.
if @optcount = 0
begin
raiserror(15011,-1,-1,@optnameIn)
print '
'

select '
Settable database options:' = name
from master.dbo.spt_values
where (type = '
D'
and number & @allstatopts <> 0
and number not in (-1,@allstatopts)) -- Eliminate non-option entries
or (type = '
DC'
and number & @allcatopts <> 0
and number not in (-1,@allcatopts))
or (type = '
D2'
and number & @alloptopts <> 0
and number not in (-1,@alloptopts))
order by name

return (1)
end

-- If more than one option like @optname, show the duplicates and return.
if @optcount > 1
begin
raiserror(15242,-1,-1,@optnameIn)
print '
'

select duplicate_options = name
from master.dbo.spt_values
where lower(name collate Latin1_General_CI_AS) like '
%' + @optname + '%'
and ((type = '
D'
and number & @allstatopts <> 0
and number not in (-1,@allstatopts))
or (type = '
DC'
and number & @allcatopts <> 0
and number not in (-1,@allcatopts))
or (type = '
D2'
and number & @alloptopts <> 0
and number not in (-1,@alloptopts))
)
return (1)
end

-- Just want to see current setting of specified option.
if @optvalue is null
begin
select OptionName = v.name,
CurrentSetting = (case
when ( ((v.number & d.status) = v.number
and v.type = '
D')
or (d.category & v.number <> 0
and v.type = '
DC')
or (d.status2 & v.number <> 0
and v.type = '
D2')
)
then '
ON'
when not
( ((v.number & d.status) = v.number
and v.type = '
D')
or (d.category & v.number <> 0
and v.type = '
DC')
or (d.status2 & v.number <> 0
and v.type = '
D2')
)
then '
OFF'
end)
from master.dbo.spt_values v, master.dbo.sysdatabases d
where d.name=@dbname
and ((v.number & @allstatopts <> 0
and v.number not in (-1,@allstatopts) -- Eliminate non-option entries
and v.type = '
D')
or (v.number & @allcatopts <> 0
and v.number not in (-1,@allcatopts) -- Eliminate non-option entries
and v.type = '
DC')
or (v.number & @alloptopts <> 0
and v.number not in (-1,@alloptopts) -- Eliminate non-option entries
and v.type = '
D2')
)
and lower(v.name) = lower(@fulloptname)

return (0)
end

select @catvalue = 0
select @catvalue = number
from master.dbo.spt_values
where lower(name) = lower(@fulloptname)
and type = '
DC'

-- if setting replication option, call sp_replicationdboption directly
if (@catvalue <> 0)
begin
select @alt_optvalue = (case lower(@optvalue)
when '
true' then 'true'
when '
on' then 'true'
else '
false'
end)

select @alt_optname = (case @catvalue
when 1 then '
publish'
when 2 then '
subscribe'
when 4 then '
merge publish'
else quotename(@fulloptname, '
''')
end)

select @exec_stmt = quotename(@dbname, '
[') + '.dbo.sp_replicationdboption'

EXEC @exec_stmt @dbname, @alt_optname, @alt_optvalue
return (0)
end


-- call Alter Database to set options

-- set option value in alter database
select @alt_optvalue = (case lower(@optvalue)
when '
true' then 'ON'
when '
on' then 'ON'
else '
OFF'
end)

-- set option name in alter database
select @fulloptname = lower(@fulloptname)
select @alt_optname = (case @fulloptname
when '
auto create statistics' then 'AUTO_CREATE_STATISTICS'
when '
auto update statistics' then 'AUTO_UPDATE_STATISTICS'
when '
autoclose' then 'AUTO_CLOSE'
when '
autoshrink' then 'AUTO_SHRINK'
when '
ansi padding' then 'ANSI_PADDING'
when '
arithabort' then 'ARITHABORT'
when '
numeric roundabort' then 'NUMERIC_ROUNDABORT'
when '
ansi null default' then 'ANSI_NULL_DEFAULT'
when '
ansi nulls' then 'ANSI_NULLS'
when '
ansi warnings' then 'ANSI_WARNINGS'
when '
concat null yields null' then 'CONCAT_NULL_YIELDS_NULL'
when '
cursor close on commit' then 'CURSOR_CLOSE_ON_COMMIT'
when '
torn page detection' then 'TORN_PAGE_DETECTION'
when '
quoted identifier' then 'QUOTED_IDENTIFIER'
when '
recursive triggers' then 'RECURSIVE_TRIGGERS'
when '
default to local cursor' then 'CURSOR_DEFAULT'
when '
offline' then (case @alt_optvalue when 'ON' then 'OFFLINE' else 'ONLINE' end)
when '
read only' then (case @alt_optvalue when 'ON' then 'READ_ONLY' else 'READ_WRITE' end)
when '
dbo use only' then (case @alt_optvalue when 'ON' then 'RESTRICTED_USER' else 'MULTI_USER' end)
when '
single user' then (case @alt_optvalue when 'ON' then 'SINGLE_USER' else 'MULTI_USER' end)
when '
select into/bulkcopy' then 'RECOVERY'
when '
trunc. log on chkpt.' then 'RECOVERY'
when '
db chaining' then 'DB_CHAINING'
else @alt_optname
end)

if @fulloptname = '
dbo use only'
begin
if @alt_optvalue = '
ON'
begin
if databaseproperty(@dbname, '
IsSingleUser') = 1
begin
raiserror(5066,-1,-1);
return (1)
end
end
else
begin
if databaseproperty(@dbname, '
IsDBOOnly') = 0
return (0)
end
end

if @fulloptname = '
single user'
begin
if @alt_optvalue = '
ON'
begin
if databaseproperty(@dbname, '
ISDBOOnly') = 1
begin
raiserror(5066,-1,-1);
return (1)
end
end
else
begin
if databaseproperty(@dbname, '
IsSingleUser') = 0
return (0)
end
end

select @alt_optvalue = (case @fulloptname
when '
default to local cursor' then (case @alt_optvalue when 'ON' then 'LOCAL' else 'GLOBAL' end)
when '
offline' then ''
when '
read only' then ''
when '
dbo use only' then ''
when '
single user' then ''
else @alt_optvalue
end)

if lower(@fulloptname) = '
select into/bulkcopy'
begin
if @alt_optvalue = '
ON'
begin
if databaseproperty(@dbname, '
IsTrunclog') = 1
select @alt_optvalue = '
RECMODEL_70BACKCOMP'
else
select @alt_optvalue = '
BULK_LOGGED'
end
else
begin
if databaseproperty(@dbname, '
IsTrunclog') = 1
select @alt_optvalue = '
SIMPLE'
else
select @alt_optvalue = '
FULL'
end
end

if lower(@fulloptname) = '
trunc. log on chkpt.'
begin
if @alt_optvalue = '
ON'
begin
if databaseproperty(@dbname, '
IsBulkCopy') = 1
select @alt_optvalue = '
RECMODEL_70BACKCOMP'
else
select @alt_optvalue = '
SIMPLE'
end
else
begin
if databaseproperty(@dbname, '
IsBulkCopy') = 1
select @alt_optvalue = '
BULK_LOGGED'
else
select @alt_optvalue = '
FULL'
end
end

-- construct the ALTER DATABASE command string
select @exec_stmt = '
ALTER DATABASE ' + quotename(@dbname) + ' SET ' + @alt_optname + ' ' + @alt_optvalue + ' WITH NO_WAIT'
EXEC (@exec_stmt)

if @@error <> 0
begin
raiserror(15627,-1,-1)
return (1)
end

return (0) -- sp_dboption
 

dbo.trace_xe_action_map Moved from dbo to sys Schema

This next issue took me quite  a while longer to figure out. 

Kudos to Dan Guzman, SQL Server MVP, (http://www.dbdelta.com) for helping me figure this one out.  Without dragging this out too much, I was getting this error when running the configuration wizard:  Invalid object name ‘dbo.trace_xe_action_map’.

image

This pointed back to system table, dbo.trace_xe_action_map.  From there I found out it, as well as trace_xe_event_map, have been moved to the sys schema and here’s some of the original discussion by Aaron Bertrand and the SQL team.  Well, in case you wondered, it did make it into the final release!

I thought creating a synonym would fix this quickly and easily.  If I had only known what I know now about synonyms!  You have to create them in the context of the database in which they will be called.  What does this mean?  You need to create the synonym for each table the SharePoint Products and Technologies Configuration Wizard will upgrade, as dbo.trace_xe_action_map is referenced within each database context during the process.

I started troubleshooting this first by using SQL Profiler, as I wanted to see what the wizard was doing.  This is what SQL Profiler trapped during the wizard execution.

declare @p3 int
set @p3=NULL
exec sp_executesql N’SELECT @RowCount=COUNT(1) FROM [dbo].[trace_xe_action_map] WITH (NOLOCK)’,N’@RowCount int output’,@RowCount=@p3 output
select @p3

The first database where I fixed the issue was on the AdminContent database. 

use [SharePoint_AdminContent_a974ce72-f4c4-43ff-a3bc-fe08e4e0a553]

go

CREATE SYNONYM [dbo].[trace_xe_action_map] FOR [sys].[trace_xe_action_map];

CREATE SYNONYM [dbo].[trace_xe_event_map] FOR [sys].[trace_xe_event_map];

go

That got me up to task 8 of 9 but then I started getting other errors that were not as well identified.  I was seeing issues such as this one:

The B2B upgrader timer job failed.

clip_image001

Reading some other discussion threads, I invoked psconfig as follows:

psconfig -cmd upgrade -inplace b2b -force -wait

But I continued to get errors.  It was only after looking at the Upgrade text file in the logs folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS) that I began to see the source of the additional errors.

image

This is where I noticed the Invalid object name error on dbo.trace_xe_action_map that was occurring upon every database context switch. 

[SPManager] [ERROR] [12/22/2013 8:33:39 PM]: Upgrade [SPContentDatabase Name=WSS_Content_RXSP2007 Parent=SPDatabaseServiceInstance] failed.
[SPManager] [ERROR] [12/22/2013 8:33:39 PM]: Invalid object name 'dbo.trace_xe_action_map'.
[SPManager] [ERROR] [12/22/2013 8:33:39 PM]: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Upgrade.SPSqlCommandFactory.GetRowCount(String strTable)
at Microsoft.SharePoint.Upgrade.SPDatabaseWssSequence.LogTableRowCounts()
at Microsoft.SharePoint.Upgrade.SPDatabaseWssSequence.PreUpgrade()
at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.PreUpgrade()
at Microsoft.SharePoint.Upgrade.SPManager.Upgrade(Object o, Boolean bRecurse)
When you run psconfig, you see the count of the successful/unsuccessful configuration settings.  This gives you an idea of how many of these errors you need to fix.
 

image

 

So, what I did was create a synonym in the context of each database as follows:

use [SharePoint_AdminContent_a974ce72-f4c4-43ff-a3bc-fe08e4e0a553]
go
CREATE SYNONYM [dbo].[trace_xe_action_map] FOR [sys].[trace_xe_action_map];
CREATE SYNONYM [dbo].[trace_xe_event_map] FOR [sys].[trace_xe_event_map];
go
use [WSS_Content_RXSP2007_MySite]
go
CREATE SYNONYM [dbo].[trace_xe_action_map] FOR [sys].[trace_xe_action_map];
CREATE SYNONYM [dbo].[trace_xe_event_map] FOR [sys].[trace_xe_event_map];
go
use [SharePoint_Config_RXSP2007]
go
CREATE SYNONYM [dbo].[trace_xe_action_map] FOR [sys].[trace_xe_action_map];
CREATE SYNONYM [dbo].[trace_xe_event_map] FOR [sys].[trace_xe_event_map];
go
use [WSS_Content_RXSP2007]
go
CREATE SYNONYM [dbo].[trace_xe_action_map] FOR [sys].[trace_xe_action_map];
CREATE SYNONYM [dbo].[trace_xe_event_map] FOR [sys].[trace_xe_event_map];
go
 

After creating the synonyms in each database, psconfig ran successfully.

clip_image001[5]

 

And more importantly, the configuration wizard completed successfully!

clip_image002




Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

August 2015
M T W T F S S
« Mar    
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Support Wikipedia

Follow

Get every new post delivered to your Inbox.