Tag Archive: sharepoint


Logging in today, I noticed something in the Application Log of my SBS 2008. There were three event id’s of 2803 and one of 17137 listed every 5 minutes or so. The viewer could not give me details… figures. There are the three:

Application Log Errors

Application Log Errors

The description for Event ID 17137 from source MSSQL$MICROSOFT##SSEE cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Then the same message with this attached:

1

Bound Trees

So after some digging I found information stating that this is caused by SQL closing the database connection when it is not in use, and then reopening it when it is being used. This is not good, if it is happening every 5 minutes.

So, let’s resolve this error.

First, connect to SQL using Management Studio Express. Connect to the MSSQL instance using the name \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query and Windows Authentication.

Expand Databases.

Right click the database in question, in this case Sharepoint_Admin_Content####, and select properties.

Database Properties

Database Properties

Click on the Options menu on the left. You will see a value displayed in the right windows named AUTO_CLOSE with a value of true. Change this value to false, and save and close SQL Management Studio.

AUTO_CLOSE

AUTO_CLOSE

You should see two more events appear in the event log, focusing on changing AUTO_CLOSE to FALSE. They should be event id 5084.

Event Log 5084

Event Log 5084

Thats it! You have fixed the error. Monitor both the database and the event logs for a few days to see how your system reacts. If you notice side effects, then you can always change the value back yto TRUE using a reverse of the same method.

Sharepoint default can be boring- even with all of the color options they offer you. You can brand it yourself and create a custom theme if you know what your doing with CSS and HTML, or you can download and apply a pre made theme. A pack of 10 were released, and can be found here.

Install them into a folder you can remember- desktop even.

File Location for TopThemeForSharepoint

File Location for TopThemeForSharepoint

Navigate to this folder. TenThemesForSharepoint and you will be looking at all of the theme folders.

We will do the process with one, repeate with the one you wish. Open folder ConstructionSiteTheme. Enter subfolder ConstructionSiteTheme.. Enter Templates.

Your now looking at two folders, Layouts and Themes. Enter the THEMES folder and copy the folder CONSTRUC. Paste it here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\THEMES

Now go back and enter the LAYOUTS folder. Enter folders 1033 and IMAGES. Copy the folder named CONSTRUC.

Now navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\IMAGES and paste the folder.

Almost done.

Go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033 and open SPTHEMES.XML by right clicking it and selecting edit.

You will see a list of templates like this:


 	<Templates>
		<TemplateID>classic</TemplateID>
		<DisplayName>Classic</DisplayName>
		<Description>Classic has a white background with blue control areas and orange highlights.</Description>
		<Thumbnail>images/thclassic.gif</Thumbnail>
		<Preview>images/thclassic.gif</Preview>
	</Templates>
	<Templates>
		<TemplateID>simple</TemplateID>
		<DisplayName>Simple</DisplayName>
		<Description>Simple has a white background with minimal blue highlights.</Description>
		<Thumbnail>images/thsimple.gif</Thumbnail>
		<Preview>images/thsimple.gif</Preview>
	</Templates>

What you are going to do is copy one, starting with the opening <Templates> and ending with the </Templates>

Change the TemplateID to CONSTRUC.

Change the Display name to Construc.

Change the description if you wish.

I generally do not change the preview and thumbnail photos, but that can be done by copying the jpg file out of the TenThemesForSharepoint folder named Construction_Prieview.jpg and putting it into the folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES

Rename the file thconstruc.jpg, and then change the <Thumbnail> and <Preview> tags to thconstruc.jpg.

Now enter Sharepoint, Edit Site Settings. Themes, and you will see your new theme construc listed in the list. Click it and the preview might be off, since it is huge, and click apply. Now your site is themed, takes about 5 minutes.

Construction Theme Preview

Construction Theme Preview

So you create a survey on Sharepoint, and sent out an email to all users. After a week only 5 people have taken it. This is because getting users to do something as simple as a survey if they feel it is not necessary can often be difficult. I will describe a simple way to make the survey much more noticeable, and then describe an alternate way as well.

We will be inserting a content editor web part with an image for users to click. You want the image to be noticable. I picked a RED button, as my site is blue. It stands out like a sore thumb. First, download a picture for your button. I Google searched red button, and came up with a nice looking glossy button here.

Google Button

Google Button at Clker.Com

Now, I will go to a Sharepoint library and upload the image. You can put it in any directory you want.

Sharepoint Button

Sharepoint Button

 

Once it is uploaded, click the link untill you are at a page displaying just that image. Now, copy the internet address of that image.

Go to your home screen. Click Site Actions>Create. Click Survey. Customize the survey as you see fit- I will not describe this process here. For mine, I made a 3 question, radial choice survey asking which design users liked for our site, out of three themes we have recently used.

Now go to the home screen. Click Site Actions>Edit Page. This will make all of your web parts appear. Decide where you want this button to be, and click add web part (you can drag it around after). I replaced the default Image Web Part which is in the right hand column.

Add Content Editor

Add Content Editor

 

Add a Content Editor Web Part.

Content Editor Options

Content Editor Options

Now click the little arrow to modify the shared web part. The editor column appears on the right. Click Rich Text Editor. You are then presented with a blank box. On the toolbar, there is an Insert Picture icon. Click this.

Now paste the button address in the space for the address of your picture. For Alt text, I chose Push Me!

Now the picture is displayed in the text editor box. You can resize it, and add text under it if you wish. I added text saying “Take this one question survey about the design of our site!”.

Exit out of this for a moment. Now you will navigate to your created survey- it’s probably listed in the quick launch on the left. Click Respond To This Survey.

You will be looking at the first page of survey questions. Copy this web address from your browsers address bar.

Now hit home, and then again Site Settings>Edit Page>Modify Content Editor Web Part.

Then in the right column, click Source Editor. You will see the HTML code for your picture and text, it will look something like this:

&lt;a href=&quot;http://companyweb/Lists/Site%20Design/NewForm.aspx?Source=http%3A%2F%2Fcompanyweb%2FLists%2FSite%2520Design%2Foverview%2Easpx&quot;&gt;&lt;img style=&quot;width: 178px; height: 173px;&quot; src=&quot;http://companyweb/All%20IT%20Forms/Pictures/119498475589498995button-red_benji_park_01_svg_med.png&quot; alt=&quot;Push Me!&quot; width=&quot;190&quot; height=&quot;173&quot; /&gt;&lt;/a&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;http://companyweb/Lists/Site%20Design/NewForm.aspx?Source=http%3A%2F%2Fcompanyweb%2FLists%2FSite%2520Design%2Foverview%2Easpx&quot;&gt;Click the Red Button to take a&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;http://companyweb/Lists/Site%20Design/NewForm.aspx?Source=http%3A%2F%2Fcompanyweb%2FLists%2FSite%2520Design%2Foverview%2Easpx&quot;&gt;quick Survey about Site Design!&lt;/a&gt;&lt;/div&gt;

You are now going to add a link to the picture. Do this by adding an HTML link tag just before the beginning of the IMG tag. Remember we just copied it, so paste that address in between the “”.

Exit out of all of this, and you now have a bright red button on the side of your page, and when users click it they are taken directly to the survey.

Survey Look at Finish

Survey Look at Finish

 

Another method that I will briefly describe, is to use a splash page and redirection. Create a simple HTML page, and put a link in the middle. I did a white page with a red text link saying “Take Company Survey”. In the properties of that text link, aim it at the survey like we just did. Upload that site to companyweb using Sharepoint Designer or Visual Web. Now, I regulate users start page in the office, which is set to http://companyweb/default.aspx. Once I uploaded the new page as splash.html, I pointed their new home page at http://companyweb/splash.html.

When users logged in, they got that page with the link, which hinted at taking the survey. While it did not require they take the survey, it is a quick trick to get people attention. You could add validation controls that forced them to that site, and even add a fade page control that took them directly there. You could even set the company start page at the survey page if you wanted too- but this might be confusing.

Tons of options here to get the word out about a survey.

Credit to http://www.clker.com for providing me that image for internal use.

I use this simple script to backup some items on my server, which I would like separated out of the standard Windows SBS 2008 Backup and WSUS 3. It is possible to do a lot with the default server backup, but what if you need just one file? Welol, it’s a pain in the butt to get that out of a full server backup. You could use NTBackup to backup the whole server, but restoring that can be difficult, as SBS 2008 doesn’t recognize NTBackup’s. You could do it with the WBADMIN command, but a lot of people don’t know how to use it. So here is the script. I will post the code, then describe what each part does. Feel free to customize it, or post improvements on it. Im also going to remove all of the echo commands that I have that let me know what each stage is doing. To add a text feedback to this script that will inform you of what’s going on, do the following:

Type Echo
I use ***TEXT*** so that it is visually explicit.


@ECHO OFF
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe"
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set DATE=%%B%%C%%D
for /F "tokens=1-4 delims=:., " %%a in ('time/T') do set TIME=%%a%%b%%c

CHOICE /C:YN /D:N /T:3

%STSADM% -o backup -url "http://companyweb" -filename "\\solaceserver\300GB HP Backup\Companyweb Backup\Companyweb_Backup_%DATE%_%TIME%.dat" -backupmethod differential -item "farm" > "\\solaceserver\300GB HP Backup\Companyweb_Backup_log.txt"

xcopy /y "C:\windows\system32\inetsrv\config" "A:\IIS Backup\" /e > "A:\IIS_Backup_log.txt"
xcopy /y "D:\EZ Claim Data" "A:\EZ Backup\" /e > "A:\EZ_Backup_log.txt"
xcopy /y "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12" "A:\CompanywebStyle\" /e > "A:\Companyweb_Style_Backup_log.txt"

sqlcmd -S .\SBSMONITORING -i "C:\SQL Scripts\sbsmonitoringbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\admincontentbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\sharewebdbbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\spconfigbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\susdbbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\wsscontent_c76dcbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\wsscontent_cb60cbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\wsscontentbackup.sql"
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i "C:\SQL Scripts\wsssearchbackup.sql"

IF EXIST A:\GPO_Backup RMDIR A:\GPO_Backup /s /q
IF NOT EXIST A:\GPO_Backup MD A:\GPO_Backup

FOR /f "tokens=1-3 delims=/ " %%a in ('DATE/T') do set date=%%b-%%a-%%c
FOR /F "tokens=1-5 delims=/: " %%j IN ('TIME/T') do set time=%%j-%%k

cd "C:\GPMC\SCRIPTS"
cscript BackupAllGPOs.wsf A:\GPO_Backup /Comment:"GPO backup on %DATE%_%TIME%" /Domain:solace.local

for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set DATE=%%B%%C%%D
for /F "tokens=1-4 delims=:., " %%a in ('time/T') do set TIME=%%a%%b%%c

ntbackup backup "@A:\Exchange File Backup\Exchange_NTBackup_Config.bks" /a /d "Exchange Server" /v:no /r:no /rs:no /hc:off /m normal /j "Exchange Server" /l:s /f "A:\Exchange File Backup\Exchange_Backup_%DATE%_%TIME%.bkf" > "A:\Exchange_Backup_Log.txt"

:End
Code Description
@ECHO OFF This gags the code from being repeated visually on the script
@SET STSADM=”c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe” This sets the directory for STSADM. This might vary by computer depending upon your install, but the directory you see is the default.
for /F “tokens=1-4 delims=/- ” %%A in (‘date/T’) do set DATE=%%B%%C%%D for /F “tokens=1-4 delims=:., ” %%a in (‘time/T’) do set TIME=%%a%%b%%c This code and the following FOR code sets variables that allow us to put the date into a filename.
CHOICE /C:YN /D:N /T:3 This is a choice command, with a timer, /T:3 is 3 seconds. This doesn’t really do anything but pause- I add the text to it something like Press Ctrl-C to cancel backup now! Ctrl-C breaks the script.
%STSADM% -o backup -url “http://companyweb&#8221; -filename “\\solaceserver\300GB HP Backup\Companyweb Backup\Companyweb_Backup_%DATE%_%TIME%.dat” -backupmethod differential -item “farm” > “\\solaceserver\300GB HP Backup\Companyweb_Backup_log.txt” This runs the STSADM command. It is the command line version of Sharepoint Administration, and command backup without using the GUI in Central Administration. –o backup tells it to backup “http://companyweb”. –Filename tells us the location of the backup.dat. the > xxx.log.txt tells the script to output all the results of that command into a logfile. I have each command in a separate logfile to ease confusion.
xcopy /y “C:\windows\system32\inetsrv\config” “A:\IIS Backup\” /e > “A:\IIS_Backup_log.txt” Xcopy is simply a copy command. I run this on several critical directories, and make a hard backup of the files contained. /y makes the script overwrite, while the following “ are the backup target and backup end directory. /e copies subdirectories and folders.
sqlcmd -S .\SBSMONITORING -i “C:\SQL Scripts\sbsmonitoringbackup.sql” sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i “C:\SQL Scripts\admincontentbackup.sql” I run 10 of these. SQL 2005 Express does not offer native backup scheduling. But you can enter an instance, and manually set up a backup. Then you can script this to file, then you run the file from this script. How to do this is documented here.
IF EXIST A:\GPO_Backup RMDIR A:\GPO_Backup /s /q IF NOT EXIST A:\GPO_Backup MD A:\GPO_Backup This command checks for a directory. If it exists it deletes it and creates it again, empty. This keeps down the size of a directory.
cd “C:\GPMC\SCRIPTS” cscript BackupAllGPOs.wsf A:\GPO_Backup /Comment:”GPO backup on %DATE%_%TIME%” /Domain:solace.local This backups all Group Policy Objects. Download the script files from here. Change this command to match the location you install the .wsf files. Quite handy.
ntbackup backup “@A:\Exchange File Backup\Exchange_NTBackup_Config.bks” /a /d “Exchange Server” /v:no /r:no /rs:no /hc:off /m normal /j “Exchange Server” /l:s /f “A:\Exchange File Backup\Exchange_Backup_%DATE%_%TIME%.bkf” > “A:\Exchange_Backup_Log.txt” This performs an Exchange only backup. You need to create the backup with NTBackup, and save selection as. Then you reference the bks file in this script. The command descriptions are here.

If you are a Sharepoint Administrator, great. SQL Admin, awsome. If you know programming, sweet. But what about those of us that don’t know these things? What if you manage a small Sharepoint site, and don’t know the inner workings of SQL? Extracting content from a database backup after a restore can be a nightmare.

I discovered this post and I had to put it here- this tool is rediculously usefull. Pascal Gill designed a small program with GUI which can be used to extract content from a sharepoint database, and it even keeps directory structure and subfolders. I also used it to extract a custom list with metadata so that I could put it onto my new site. Thanks Pascal!

Sharepoint Exporter

Sharepoint Exporter

The site is here.

The tool is here.

If you have any questions about what to fill in for the database name and server fields, please post here or on Pascal’s blog.
This tool is not my creation, and I can not assure you of the files contents. I can however vouch for the validity of the program and code, as I have used it many times.

%d bloggers like this: