Quantcast

A short one this time. It seems though that a lot of people using SharePoint Services are not aware of this though and it is actually quite easy.

 

Even though it is not an option in any of the forms, you can have links from the quick-launch or from the Links list and Web-Part open in a new browser window or Tab.

 

The trick is that in the URL Field, you have to add a little piece of JavaScript. here is an example:

 

If you’d like a link to http://www.Microsoft.com open in a new window or tab, write the following in the URL field:

 

javascript:void window.open("http://www.microsoft.com")


Possibly Related:

Water Sentinel WSS-1 Replacement Fridge Filter, 3-PackWater Sentinel WSS-1 Replacement Fridge Filter, 3-PackThis compatible replacement filter for the Samsung DA29-00003B is MADE IN THE USA. This filter was designed and engineered by Water Treatment professi... Read More >

Technorati Tags:

In SharePoint you cannot use the start date column in a calendar to filter entries. This is quite annoying, because a lot of times, you’d like to show entries between two dates.

 

There is a little work-around that you can use to enable this functionality:

 

  • Open your Calendar list settings

  • Add new column, and call it StartFilter (for example)

  • Select ”Calculated” as a the type of new column

  • In the Formula field insert:
    =[Start Time]

  • Select Date and Time as data type of new column

  • Make sure “Add to default view” checkbox is un-ticked

  • Save the new column

You should now be able to use the StartFilter column to filter your calendar list.



Possibly Related:

Technorati Tags:

Many times I find myself struggling with date time values in SQL. I should know this by hart now, but… I don’t.

 

Mostly my problems lie in the fact that an SQL database stores a DateTime value, which I often need. However, most of the times I need to present that value as either just a date, or just a time value (reports, dashboards, etc)

 

Today from our local SQL Wiz, I got a mail with all the important SQL Date-Time conversions. I guess he got tired of me asking. Thanks Chris!

 

There are loads of options, and you could use convert or cast, depending on your requirements. For me most of the time, convert does the job.

 

Syntax for CONVERT:
CONVERT (data_type [ (length ) ] ,expression [ ,style ] )

 

Convert to Date:

 

–MM/DD/YYYY

SELECT CONVERT(char, GETDATE(), 101)

–YYYY.MM.DD

SELECT CONVERT(char, GETDATE(), 102)

–DD/MM/YYYY

SELECT CONVERT(char, GETDATE(), 103)

–DD.MM.YYYY

SELECT CONVERT(char, GETDATE(), 104)

–DD-MM-YYYY

SELECT CONVERT(char, GETDATE(), 105)

–DD MON YYYY

SELECT CONVERT(char, GETDATE(), 106)

– MON DD, YYYY

SELECT CONVERT(char, GETDATE(), 107)

–MM-DD-YYYY

SELECT CONVERT(char, GETDATE(), 110)

–YYYY/MM/DD

SELECT CONVERT(char, GETDATE(), 111)

–YYYYMMDD

SELECT CONVERT(char, GETDATE(), 112)

–YYYY-MM-DD

SELECT CONVERT(varchar(10), GETDATE(), 120)

 

Convert to Time:

 

–00:00

CONVERT(VARCHAR(8) , GETDATE() , 108) AS HourMinute,

–00:00:00

CONVERT(VARCHAR(5) , GETDATE() , 108) AS HourMinuteSecond

 

To give an example of how a query would look:

 

SELECT  convert(varchar, SUM(entryDuration2)/ 60) + ‘:’  + right(convert(char(3), 100 + SUM(entryDuration2)% 60), 2) AS Expr1 FROM TTentries WHERE (entryEndTime IS NOT NULL) AND (UserName = @UserName) AND (entryStartDate = CONVERT (VARCHAR(10), GETDATE(), 111))



Possibly Related:

Technorati Tags: ,

The STSADM command is a very important one for anyone managing a SharePoint 2007 / WSS 3.0 server.

 

The command must be run as an administrator on the server and is (usually) located here : %CommonProgramFiles%\microsoft shared\web server extensions\12\bin or commonly called “the 12 hive”.

 

With this command you can almost completely manage your server, and perform actions or tasks that you are not able to do through the Central Administration site. Examples are: Import /export sites,

 

Tip! You can add this folder to your servers’ environment variables. This way, the command can be run from anywhere on the server.

 

Here are some commands that come in handy:

 

Backup

 

stsadm.exe –o backup –url SITEURL –filename BACKUPFILENAME –overwrite -backupmethod <full or differential>

(where –overwrite and –backupmethod are optional parameters)

 

When the url parameter is used, a backup of the site collection is created. However when the backupmethod parameter is used, a backup of an individual database, Web application, or the entire farm can be created. If you want to overwrite an existing backup file for a site collection only, use the overwriteparameter.

 

* Preferably, only do this when your site is not used. Usage can/could lead to corruption of your database backup.

 

There are a couple of limitations to this command:

  1. A farm backup cannot be used to restore the configuration database or Central Administration content database.
  2. Site collection backups affect performance, and they can cause access errors. They should only be used when the site collection is locked. Site collection backups can be slow when working with collections larger than 15 GB. This problem seems to have been resolved in WSS SP1. the backup command will first lock the site collection.

 

I do suggest that you use SQL Management studio (Express) to backup your content database.

 

Restore

 

stsadm.exe –o restore –url SITEURL –filename BACKUPFILENAME –overwrite –restoremethod <overwrite or new>

 

When the url parameter is used, a restoration of the site collection is performed. However, when the restoremethod parameter is used, a restoration of an individual database, Web application, or the entire farm can be performed. If you want to overwrite an existing site collection, use the overwrite parameter.

 

* Preferably, only do this when your site is not used. Usage can/could lead to corruption of your database backup.

* I do suggest that you use SQL Management studio (Express) to backup your content database.

 

Export

 

stsadm.exe –o export –url SITEURL –filename FILENAME –overwrite -includeusersecurity

(where –overwrite and –includeusersecurity are optional)

 

With this command you exports site and sub site data from your site collection.

 

Import 

 

stsadm.exe –o import –url SITEURL –filename FILENAME -includeusersecurity

(where  –includeusersecurity is optional)

 

Imports site and subsite data into your site collection.

 

Note on backup up:

It is recommended to use import/export and backup/restore in he folowing ways:

Import/export:  Backups of portions of a site

Backup/restore: Full site collection Backups

 

Rename a sub site URL

 

stsadm.exe –o renameweb –url SITEURL –newname NEWSITENAME

 

Careful, this just changes the URL of a subsite

Rename Site

stsadm.exe –o renamesite –oldurl OLDSITEURL –newurl NEWSITEURL

 

This command changes the URL of a host-named site collection to a new URL.

 

Repair Database

stsadm.exe –o databaserepair –url SITEURL –databasename DATBASENAME –deletecorruption

(where –deletecorruption is optional. you should run the command first without, to see if any repairs can be made)

This command detects and removes orphaned items from content databases in Windows SharePoint Services. In some situations, a content database that is used by Windows SharePoint Services may become corrupted. The corrupted database may contain orphaned items.

The databaserepair operation can detect and repair database corruption for only the following types of orphaned items in a content database:

 

  • A Windows SharePoint Services Web site that does not have a parent Windows SharePoint Services Web site

  • A subweb that does not have a parent Windows SharePoint Services Web site

  • A list that does not have a parent Windows SharePoint Services Web site

  • A document that does not have a parent document library

  • A list item that does not have a parent list

  • A Web page that does not have a parent Windows SharePoint Services Web site

Other types of corruption will not be repaired.

 

Add a solution

 

stsadm.ex -o addsolution –filename

 

This command is used to import a WSP solution package. Most of the time these are webparts that you can get from 3rd parties. An example is the RSS ticker web-part from Amrein Engineering.



Possibly Related:

Technorati Tags:

For a few reasons you will need to be able to connect to your SharePoint content database. You cannot do this in a proper way using the tools you get standard with the WSS server.

 

The best (or most logical) way of doing this is using Microsoft’s SQL Management Studio, but you can also use the free Express version.

 

Most people that run a single WSS server do this because of budget limitations and can therefore not afford the licensing cost of a fill SQL server licence. The Express version is free and allows you to do most of the maintenance on your database.

 

There are, however, a couple of problems, or things to know before you can use SQL Management Studio Express SQL MSE on your WSS content database.

 

First, you need to install SQL MSE on the server itself. It does not allow you to connect to the database on your server remotely.

 

Second, once installed, you cannot connect to localhost. This will give you below error:

image

 

You will have to use the following connection string:

\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

 

This will directly open up your local databases.

 

Software downloads:

 

Microsoft SQL Management Studio (Part of full SQL Install, Trial download here)

Microsoft SQL Management Studio Express



Possibly Related:

Technorati Tags:

Page optimized by WP Minify WordPress Plugin