Find out more about Enterprise Project Management with Microsoft Project Server and Microsoft SharePoint

Friday, August 18, 2006

Change the name of a user in Windows SharePoint Services

If your company runs Project Server 2003 with Windows SharePoint Services enabled you benefit from all the great functionality provided by WSS such as risk, issue and document management for all your projects. But if you ever have to change the name of a resource in the Project Server resource pool you will first find it strange that the name will not be updated on the SharePoint sites. Confusion will grow even more if you try deleting the user from the specific SharePoint site and expect the name to change once you added the user again. This article will help you on what you need to do if you encounter this problem.

The key to solving this issue is knowing that SharePoint has its own table storing user information. This table is called 'UserInfo' and can be found in the WSS content database that is created when installing WSS.

Connect to the computer running SQL Enterprise Manager and navigate to the WSS content database. Run the following query against the 'UserInfo' table:

UPDATE UserInfo SET tp_title = 'new name' WHERE tp_title= 'old name'

This will change the user's name for both objects that are already existing and objects that are created.

Stay tuned for more helpful tips & tricks...

Thursday, August 10, 2006

Useful Project Server tools: The View Backup and Restore Tool

In the series of useful Project Server tools today's post is about the View Backup and Restore Tool. This is a very helpful little tool especially if your company is in the process of modifying and/or adding views. Unlike for example the Rename Project Tool this tool has no GUI (Graphical User Interface), it is a traditional command line program. ViewBackup.exe works with the XML file format.

Downloading and launching the tool
The View Backup and Restore Tool is a free download from Microsoft. You can download it directly by following this link. Once you have downloaded and unpacked the program open a MS DOS command box and then drag and drop the ViewBackup.exe file into the command box. Now you are ready to enter the parameters required to work with the tool.

Backing up views
These are the mandatory parameters you must set if you want to backup views

  • /b
    indicates that you want to backup views from Project Server rather than restore views.
  • /s "server name"
    where " " is the placeholder for the name of your SQL Server, not Project Server
  • /d "database name"
    where " " is the placeholder for the name of database from which you want backup views.
  • /n "name of backup file"
    where " " is the placeholder for the name and location of the backup file

These are the non-mandatory parameters

  • /u "user name"
    where " " is the placeholder for the SQL user name. When leaving out /u ViewBackup.exe will try to authenticate against the SQL server with the current user.
  • /p "password"
    where " " is the placeholder for the password of the SQL user. When leaving out the user name password is not required
  • /i "view id"
    where " " is the placeholder for the unique ID of the view to be backed up. When leaving out this parameter all views will be included in the backup file.
  • /v "view name"
    where " " is the placeholder for the name of the view. When leaving out this parameter all views will be included in the backup file.
  • /t "view type number"
    where " " is the placeholder for the type of the view.
    0 = Project
    1 = Project Center
    2 = Assignment
    3 = Resource Center
    4 = Portfolio Analyzer
    5 = Timesheet
  • /f
    will force ViewBackup.exe to overwrite an existing backup file with the same name. If this parameter is not set existing backup files won't be overwritten.

Finally, press the return key to execute the command.

Notes:

  • Without specification of either the i/ or /v and /t parameters ViewBackup.exe will backup all views from the specified database.
  • If you want to backup a single view you can either specify the respective view with the unique view ID (parameter /i) or the combination of view name (parameter /v) and view type (parameter /t).
  • The order of the parameters in the command is not relevant

Example: ViewBackup.exe /b /s msepm01 /d projectserver /n c:\temp\backup_all_views.xml

Restoring views

If you want to restore one or several views you want ViewBackup.exe to work with the following mandatory parameters

  • /r
    indicates that you want to restore views from the XML backup file to Project Server
  • /s "server name"
    where " " is the placeholder for the name of your SQL Server to which you want to restore the views
  • /d "database name"
    where " " is the placeholder for the name of database to which you want retore views.
  • /n "name of backup file"
    where " " is the placeholder for the name and location of the backup file that you want to restore

The non-mandatory parameters for restoring are the following

  • /u "user name"
    where " " is the placeholder for the SQL user name. Again, when leaving out /u ViewBackup.exe will try to authenticate against the SQL server with the current user.
  • /p "password"
    where " " is the placeholder for the password of the SQL user. Again, when leaving out the user name password is not required
  • /o
    indicates that you want to overwrite existing views with the same name on the database with the version from the backup file. If this parameter is not set already existings views in the database will not be overwritten, you will receive an error message instead.

To execute the command press the return button.

Example: ViewBackup.exe /r /s msepm01 /d projectserver /n c:\temp\backup_view1.xml /o