Monthly Archives: January 2007

7 Comments

This blog describes how you can setup your Team Foundation Server environment using a FQDN. For a full explanation about what a FQDN is, you can read my previous post about Hosting Reporting Services on a fully qualified domain name (FQDN). Since TFS is based on Reporting Services, as well on WSS it's also advisable to read my last post about Hosting SharePoint on a fully qualified domain name (FQDN).


For this example I will modify the host file to use sharepoint.mikeglaser.com for SharePoint and Reporting Services and teamfoundation.mikeglaser.com for TFS as a FQDN. On Windows-based computers, this file can be found in the systemrootSystem32DriversEtc folder. Trough Microsoft Internet Information Services (IIS) you configure the sites, so their only accessible through sharepoint.mikeglaser.com and teamfoundation.mikeglaser.com. This can be done by changing the default identification and adding the FQDN as a host header value.


 
As you can see in the picture I'm using WSS V3 for TFS. How to setup a configuration like this, you can read on my blog in the Upgrade TFS V1 to WSS 3.0 Guide.


After configuring SharePoint and Reporting Services to use a FQDN it's now time to configure TFS. To use TFS with the newly created host header names, there are several steps to fulfill.


Step 1 Configure Team Foundation Server to use a FQDN SharePoint Server



Microsoft wrote an excellent article about setting up a Remote SharePoint Server. In my case it doesn't have to be a remote server, but just a server with a FQDN. Besides this I don't like TFSReg, it's to complex for such a simple job. Instead a hack my way in SQL Server directly. The table tbl_service_interface of the TfsIntegration database to be precise. I'll change all URL's to use sharepoint.mikeglaser.com instead of the name of mine server.



Warning: WSSAdminService is a separate Web Site and doesn't have to have the same FQDN as the SharePoint Web Site.


Step 2 Fix the Reporting Web parts and lists on the Team Foundation Server portal sites



TFS adds an aspx file (tfsredirect.aspx) to the layouts folder of WSS which can be found in %Program Files%Common FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS or %Program Files%Common FilesMicrosoft Sharedweb server extensions12TEMPLATELAYOUTS, depending on which version of WSS you're running. This file request the registry where the Report Server can be found. Open the registry and browse to HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio8.0TeamFoundationReportServer hive. Change the content of 'key' to use your FQDN of Reporting Services.



Step 3 Modify web.config of Team Foundation Server



Before each services on TFS starts it check the web.config of the root website on which URL TFS is running. A strange way to build a config like this, because each services is running on the TFS web site. Either way open the web.config of TFS, which can be found in %Program Files%Microsoft Visual Studio 2005 Team Foundation ServerWeb Services. Change the TFSNameUrl key and use your FQDN (e.g. http://teamfoundation.mikeglaser.com:8080) instead.


Step 4 Clear Team Foundation client cache



Before opening Team Explorer, make sure you clean the cache of it. Else you can't connect to the new FQDN environment and red cross marks will appear in your Documents and Reports sections.


Open the local settings from the current user. Within the application data of Microsoft open the Team Foundation folder and clear the cache in 1.0 folder. To do so, just remove the cache folder or the folder beneath it.



Step 5 Open your Team Explorer and connect to the new Team Foundation Server



Add the new FQDN (e.g. teamfoundation.mikeglaser.com) to the list of servers and connect to your preferred team project. Make sure all sections are connecting to a new FQDN site.


 


Summary
As you can see again it's not that hard to use a FQDN with Team Foundation Server, but you gotta know how. As I hope to show you in my last couple of posts, it's easy and advisable to setup FDQN's for your environments. This way you can easily add lots of web site and applications on machine only. Besides you don't have to setup IIS environments all over the place.


 


Technorati tags: ,

17 Comments

This blog describes how you can setup your SharePoint Services environment using a FQDN. For a full explanation about what a FQDN is, you can read my previous post about Hosting Reporting Services on a fully qualified domain name (FQDN).

For this example I will modify the host file to use portal.mikeglaser.com as a FQDN. On Windows-based computers, this file can be found in the systemrootSystem32DriversEtc folder. Trough Microsoft Internet Information Services (IIS) you configure the Default Web Site, so it's only accessible through portal.mikeglaser.com. This can be done by changing the default identification and adding the FQDN as a host header value.

After doing so, I open the my SharePoint Services sites using the FQDN. All WSS V2 sites works like a charm, but the WSS V3 sites gives me all kinds of errors.

WSS V2
SharePoint WSS V2 can run in host header mode. After installing WSS but before doing anything in the Administration pages, go to the command prompt and navigate to the Program Files/Common Files/Microsoft Shared/web server extensions/60/bin folder. Run the stsadm.exe tool to create the database using this syntax:

stsadm.exe -o setconfigdb -ds <database server name> -dn <database name> -hh

Once the configuration database has been created, you can then create the sites. Make sure the server's hosts file is updated to specify the domain names you would like.

stsadm.exe -o createsite -url http://portal.mikeglaser.com -ownerlogin <domain><username> -owneremail <email address>

In this example I'm not interested in host header mode and a normal installation of WSS does not require this to run. This way its possible to approach all your sites on a IIS web site using a FQDN, after configuring the host header value in IIS.

WSS V3
Host header mode in SharePoint V3, allows you to create multiple domain-named sites in a single Web application. In Windows SharePoint Services version 2, when scalable hosting mode was enabled, you could extend only one Microsoft Internet Information Services (IIS) Web site. Now, with host header mode, you can have host header-based site collections on multiple Web applications, so you're no longer limited to extending just one IIS Web site. In fact, you can have a mix of path-based and host header-based site collections in the same Web application. In addition, you do not need to specify whether you want to use host header site collections when creating the configuration database. Instead, you can now specify whether site collections should be host header-based or path-based when creating the site collection.

stsadm.exe -o createsite -url http://portal.mikeglaser.com -ownerlogin <domain><username> -owneremail <email address> -hhurl http://www.mikeglaser.com

This allows you to then host both host header sites and normal corporate mode sites on the same web application and same farm.

In this example I'm not interested in host header mode, but a normal installation of WSS does require some configuration steps to run. This way its not immediately possible to approach all your sites on a IIS web site using a FQDN, after configuring the host header value in IIS.

When I open portal.mikeglaser.com in Internet Explorer and profiling my SQL Server, WSS V3 executes the following statement.

exec dbo.proc_getSiteIdOfHostHeaderSite @HostHeader=N'portal.mikeglaser.com'

This stored proc will give a result of 0, because SharePoint isn't configured to use this FQDN. To do so, open your Central Administration web site and change the Alternate Access Mappings of your Web Application. This option can be found under operations.

You can change the default URL to notify WSS or add an additional URL to the list.

When you finished doing the previous steps, SharePoint Services will function with a FQDN.

Summary
As you can see it's not that hard to use a FQDN with SharePoint Services, but you gotta know how.

 

6 Comments

This blog describes how you can setup your Reporting Services environment using a FQDN. A FQDN is an unambiguous domain name that specifies the node's position in the DNS tree hierarchy absolutely. To distinguish an FQDN from a regular domain name, a trailing period is added. ex: somehost.mikeglaser.com. An FQDN differs from a regular domain name by its absoluteness; a suffix will not be added.

For example, given a device with a hostname of "myhost" and a domain name of "mikeglaser.com", the fully qualified domain name is "myhost.mikeglaser.com". It therefore uniquely defines the device — whilst there might be many hosts in the world called "myhost", there can only be one "myhost.mikeglaser.com".

Host name resolution is the process of resolving a host name to an IP address before the source host sends the initial IP packet.

Step 1 Local host name

The configured host name for the computer as displayed in the output of the Hostname tool. This name is compared to the destination host name.

Step 2 Hosts file

A local text file in the same format as the 4.3 Berkeley Software Distribution (BSD) UNIX etchosts file. This file maps host names to IP addresses. For TCP/IP for Windows XP and Windows Server 2003, the contents of the Hosts file are loaded into the DNS client resolver cache. For more information, see "The DNS Client Resolver Cache" in this chapter.

Step 3 DNS server

A server that maintains a database of IP address-to-host name mappings and has the ability to query other DNS servers for mappings that it does not contain.

For this example I will modify the host file to use www.mikeglaser.com as a FQDN. On Windows-based computers, this file can be found in the systemrootSystem32DriversEtc folder. As with all virtual directories, you can further customize the report server and Report Manager virtual directories through Microsoft Internet Information Services (IIS). Besides this I will also configure the Default Web Site, so it's only accessible through www.mikeglaser.com. This can be done by changing the default identification and adding the FQDN as a host header value.

After doing so, I open the both Reporting Services applications using the mine FQDN. 

The first URL will still work, but second URL will give you the following error, "The request failed with HTTP status 400: Bad Request." as you can see in the next picture. This error will not occur if you didn't configured the IIS Web Site to work with a host header value.

To configure the report server or Report Manager to use a FQDN, you must also edit the configuration files.

  1. Open RSReportServer.config in a text editor.
  2. Append the port number to the UrlRoot setting in the rsreportserver.config file. For example, if Urlroot is set to http://server/reportserver server, set it to http://www.mikeglaser.com/reportserver instead.
  3. Open RSWebApplication.config in a text editor.
  4. Set ReportServerUrl to the same URL you specified in UrlRoot.
  5. Delete the value (but not the tags) for ReportServerVirtualDirectory.
  6. Save both files.

When you finished doing the previous steps, Reporting Services will function with a FQDN.

Summary
As you can see it's not that hard to use a FQDN with Reporting Services, but you gotta know how.

 

6 Comments

If you want to shrink the size of the transaction log, which you think has become much larger than you would like, there are a two options.

Detach and Attach
First I will explain a trick for quickly remove the log file by detaching and automatically recreate a new log file by attaching the database. Remember that this would not work if the database has more than one log file. When you detach the database using sp_detach_db or using the UI in SQL Server Management Studio, SQL Server will know that the database was cleanly shutdown. This will ensure that the log file does not need to be available to attach the database again, so you could delete it. When you attach the database again, SQL Server will create a new log file for you, which will be of the minimum size.

The following are the steps to do:

  1. Detach the database using SP_DETACH_DB procedure (Ensure no processes are using the database files.) 
  2. Delete the log file
  3. Attach the database again using SP_ATTACH_DB procedure

or

  1. Open SQL Server Management Studio
  2. Open content sensitive menu of the database
  3. Choose Tasks > Detach
  4. Delete the log file
  5. Open content sensitive menu of the server
  6. Choose Attach
  7. Select the the database .mdf


    Note: Make sure you remove the the log file from the database details, as you can see in the upper screenshot.

Since you are detaching and attaching the database within the same server you will not have the problem of broken logins.

Backup and Shrink file
This option is not a trick, but the official way to shrink the transaction log file. Before you will use it, I will like to mention this option not always result in the way you want it. I haven't found out why, but sometimes the size of the log file will not result in the size you requested.

The following are the steps to do:

  1. Backup the the transaction log using BACKUP LOG database WITH TRUNCATE_ONLY. Where database is the name of the database.
  2. Shrink the file using DBCC SHRINKFILE(database_log, 50). Where 50 is the preferred size in MB of the log file.

or

  1. Open SQL Server Management Studio
  2. Open content sensitive menu of the database
  3. Choose Tasks > Back Up
  4. Choose Back up type - Transaction Log
  5. Open content sensitive menu of the database
  6. Choose Tasks > Shrink > Files
  7. Choose File type - Log
  8. Choose Shrink Action (it's good to leave some empty space. e.g. 50 MB)

Summary
For shrinking the log consisting of one or more log files, you can find very good documentation by searching the article kb256650 (for SQL 7.0) and article kb272318 (for SQL 2000) in Microsoft Knowledge Base. Another interesting article is How to stop the transaction log of a SQL Server database from growing unexpectedly, which applies to SQL 2000 and 2005.

 

Technorati tags:

Dennis tagged me to do this thing and as Alex mentioned in his blog "With all the big names and blog-gurus tagged, eventually the less known/unknown ones had to be reached." Besides this I'm wondering, like everybody else, when has this game started and how long can this go on. So, this meme is all about the five things you wouldn’t know about me.

  1. I got my first official diploma when I was 23 (swimming and snare laces excluded). I then graduated at a Dutch polytechnic (HTS) and became an IT-engineer. Before then I had never finished an other school, which frustrated my parents. The first school I skipped, because most of the students had to redo the same year, which in mine opinion wasn't a good idea. The second I didn't finish because it looked at the time it was taking to much time. Luckily for me, everything sorted out perfectly, but it could have been the other way around as well.
  2. When I was 14 and 15 I injured myself very badly. On the age of 14 I ran true a glass door. It sounds kind of silly, but you had to be there to understand it. I have scarves al over my body but the most of them you can't see that easily anymore (aging is perfect thing). A few stitches are just above my eyes, so I could have been blind forsake. On the age of 15 I wounded my right foot in France in the middle of nowhere. I had an arterial bleeding and cut four out five of my tendons. I stayed for two weeks in a France hospital where almost nobody spoke English accept one doctor. I never have learned so much France in such a small period of time.

  3. In 2000 I married Esther in the Caribbean, to be precise in Bridgetown, Barbados. Just the two of us, without any friends or parents. My mum still calls it a black day in her life, but for me and Esther it was a great experience. We had to find our own witnesses and found ourselves some great friends from Wales, who still meet each year. I love to have some kids a soon as I met Esther, but she persuaded me to have some kids when we were married. Justin and Loïs are now 5 and 3 years old. By the way I'm 32 and Esther is 33.
  4. At the age of 22 I wanted to impress my current wife by playing soccer. Both of her brothers played in the first team of our local soccer team. I stopped playing soccer at the age of 11, but I was confident that I could play at the same level as her two brothers. Within a couple of weeks I got injured at my left upper leg, but I didn't spend much time on that issue then. A few weeks later I had to quit, because a clot stopped me from playing. Nowadays I still can't play soccer, but other sports are no problem anymore.
  5. My last item is maybe the funniest one. I didn't play computer games till last Christmas. My wife bought my son a second-hand psone. And to comfort him, I downloaded some games from the Net. I played Gran Turismo, Fifa (I do can play soccer again) and some other games. Maybe I'll buy him a PS3 ;-).

My turn to tag people: