CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: db

SQL Server delete backup history

Exactly what I needed today.

use msdb
sp_delete_backuphistory '2013-01-30'

See more details on sp_delete_backuphistory stored procedure on msdn

Shrink sharepoint database

A Sharepoint Database can become big and have unused spaces. To shrink database go to CA-> Health Analyzer:


See if there is a list item about unused space in db under the Availability. Click on Repair Automatically in the opened Modal Dialog:


MongoDB shell, learn directly in browser

Are you also curious about NoSQL databases. Well, MongoDB is one of the most known ones. MongoDB has a javascript syntax (json), I like it. Try out the interactive shell at the mongodb site.


Quickstart on Ubuntu

To test it on Ubuntu, just install an existing apt-package:

sudo apt-get install mongodb

Create the default folder and change permissions:

sudo mkdir -p /data/db/
sudo chown `id -u` /data/db

Then jump directly into mongo db shell:


Here are some useful and self explaining commands:

show dbs
show collections
show users
use <db-name>

Återskapa koppling till login i DB efter restore

Om du har kört restore på en databas, så kan det hända att det inte går att ändra rättigheter, och den login du använt inte kan se databasen. SQL Server spottar ut felmeddelandet med kod 15023:

The database is not accessible. (Object Explorer)

Om det är WebService som i sin tur anropar databasen, kan det komma ett sådant felmeddelande:

The underlying provider failed on Open.

Lösningen är att uppdatera kopplingen. Hämtat från denna blog.

EXEC sp_change_users_login 'Auto_Fix', 'your_login', NULL, 'YoUrPaSsWoRd'

Eller bara:

sp_change_users_login 'auto_fix', 'your_login'

Det här är hämtat från forumet:

När du har kört det kommer det stå i Messages:

The row for user 'your_login' will be fixed by updating its login link to a login already in existence.
The number of orphaned users fixed by updating users was 1.
The number of orphaned users fixed by adding new logins and then updating users was 0.
Daniel Chronlund Cloud Tech Blog

News, tips and thoughts for Microsoft cloud fans

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Architect, Speaker, Author

Microsoft 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Mai Omar Desouki

PFE @ Microsoft

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders


Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant


SharePoint for everyone


Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know and share about...