Search This Blog

Wednesday 26 February 2014

SQL: Drop SQL Connections

Hi,

Trying to restore a SQL DB or getting the message that there are active connections

Run these scripts to drop the connections:

This will set it offline, Before you can restore you will need to take it online again, if i remember correctly...
USE master
GO
ALTER DATABASE YourDatabaseName
SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
Ok, here is one way to do it fr now, will add some more when/if i need it.

Wednesday 19 February 2014

Add Multiple Document Templates to a Library

Hi,

Here is how to add multiple document templates to a library.

Select Yes for Allow Management of Content Types under:
Library Settings -> Advanced




Then Go to Site Settings -> Site Content Types -> Create
Type a Name and description.
Under "Select parent content type from" select -> "Document Content Types"
Under Parent Content Types select "Documents"
i Prefer to use a Existing group called "Custom Content Types" under groups.


Click OK.

Then you can set the Document template.
Go to Advanced under the Site Content Type page which opens after you clicked OK in the last step.
The you can upload your new template on this screen.


Then go to Library Settings  -> Content Types and select "Add from Existing Site Content Types"

Select the Content type you just created and click Ok
And that is it. You will now have an additional Template under the new document Drop Down.









Monday 17 February 2014

How to identify a site template

Hi,
To Export and Import a Site you need to create the destination site with the same template as the source.
Run this to find out what template the source is.

$web = get-spweb http://your url
$web.WebTemplateId
Your site template will be here
$web.WebTemplateId
The Template ID will be here


Here is a list of the templates
http://blogs.technet.com/b/araviraj/archive/2008/06/18/sharepoint-templates-types.aspx
Thanks Araviraj

Thursday 13 February 2014

Add SharePoint Version Number to a Word Document

Hi,

Here is how to add a Document Version number to the footer of a document.

Go to your SharePoint Document Library.

Here you click on documents and enable Labels.
Under "Label  Format" type in {Version}

Now you need to open your template for your document library (Library Settings -> Advanced settings -> Edit)

In your word doc go to where you want the Version Number, Click on insert, Quick Parts, Document Property and then down to "Label"

Save your doc and that is it. (Yes there is no Label in this screenshot but i just open a blank word doc for this screenshot.)