Archive for the 'Uncategorized' Category

09
Jan
15

“The database principal owns a schema in the database, and cannot be dropped” Error Running the SharePoint Configuration Wizard

I was applying some CUs to SharePoint 2013 and running the configuration wizard was failing.  You may or may not know this, but the configuration wizard will write a log file to the SharePoint hive as well as an error log.  This error log is the one you want to look at.

 

image

 

In my case, I was receiving

The database principal owns a schema in the database, and cannot be dropped.  User, group, or role ‘SPDataAccess’ already exists in the current database.

When looking at the error log, it was apparent this had something to do with the SPDataAccess principal within the SP15_UsageAndHealth database. 

01/09/2015 15:39:43.99    OWSTIMER (0x359C)    0x2838    SharePoint Foundation Upgrade    SPUpgradeSession    ajxnm    INFO    SPUsageDatabase Name=SP15_UsageAndHealth    012dde9c-16ee-b0ba-8634-adb34afb8eb1
01/09/2015 15:39:43.99    OWSTIMER (0x359C)    0x2838    SharePoint Foundation Upgrade    SPUpgradeSession    ajxnm    ERROR    Upgrade [SPUsageDatabase Name=SP15_UsageAndHealth] failed.    012dde9c-16ee-b0ba-8634-adb34afb8eb1
01/09/2015 15:39:44.01    OWSTIMER (0x359C)    0x2838    SharePoint Foundation Upgrade    SPUpgradeSession    ajxnm    INFO    SPUsageDatabase Name=SP15_UsageAndHealth    012dde9c-16ee-b0ba-8634-adb34afb8eb1
01/09/2015 15:39:44.01    OWSTIMER (0x359C)    0x2838    SharePoint Foundation Upgrade    SPUpgradeSession    ajxnm    ERROR    Exception: The database principal owns a schema in the database, and cannot be dropped.  User, group, or role ‘SPDataAccess’ already exists in the current database.    012dde9c-16ee-b0ba-8634-adb34afb8eb1

SharePointgotchas (https://sharepointgotchas.wordpress.com/2014/04/17/postsetupconfigurationtaskexception-was-thrown-when-installing-sp1/) gave me the hint I needed and Pinal Dave (http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/) had some more details about this issue.

If you look at SQL Server Management Studio and navigate to the offending database, you can navigate to the Schemas node and investigate who owns each of the schemas by looking at each Schama’s properties.

image

In my case, the schema owner was set to SPDataAccess.  I’m not sure how it got this way, but upon further inspection, this was also true for SP15Farm and SP15MyAppPool.

image

For each of them, I set the schema owner to be the same as the schema name.

image

Now, running the configuration wizard was successful!  All is well in SharePoint land again.

22
Aug
14

SharePoint 2013: The server was unable to save the form at this time. Please try again.

I got this message, “The server was unable to save the form at this time. Please try again.” when trying to create a folder on a document library.  A quick search found this article where I found that restarting the "Sharepoint Search Hosting Controller" service fixed the problem.  That was weird!

image

06
Mar
13

Reordering and Hiding Fields and Passing URL Parameters on a New Item Form in SharePoint 2010

Let’s say you are creating a new item form using SPD 2010 and you don’t have InfoPath because the company didn’t purchase the Enterprise version of SharePoint.  Your goal is to pass a URL parameter to the new item form from some other part of the SharePoint application you are building.  Perhaps the link that contains the URL parameter was created by a workflow (hint hint).

image

You insert the custom list form like this.

image

The goal is to move this field down to the end of the form to get it out of the way.

image

You select the row and cut it for repositioning to the end of the form.

image

Now you’ve got it at the bottom of your form.

image

Now you test your form (before adding the parameter to pass) and it "works" but it doesn’t correctly save the data in the field you relocated.

The correct way to do this is to delete the field row at the top, add a new row at the bottom and insert a new text field and bind it to the column.

image

Bind the Data field to the column and format it as a Text Box.

image

Under Options, select Parameters and add a New Parameter, giving it a name that is memorable for you.  Then, bind it to the Query String variable of your choice.

image

With your text box selected, find the text property and change it from @Fieldname to $Parametername.

image

If you don’t get the name correct, you’ll see an error displayed instead of your form.

image

If you want to hide the field completely on the form to eliminate any human intervention, add class=ms-hidden to the table row.

image




Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

January 2015
M T W T F S S
« Oct    
 1234
567891011
12131415161718
19202122232425
262728293031  
Support Wikipedia

Follow

Get every new post delivered to your Inbox.