tag:blogger.com,1999:blog-45385128559620102602024-03-16T00:08:03.151-07:00Double PaddleLi Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.comBlogger70125tag:blogger.com,1999:blog-4538512855962010260.post-82354220908748530892013-03-01T12:06:00.000-08:002013-03-01T12:06:14.718-08:00TFS Mirroring failover Checklist<br />
In a mirrored TFS environment, there are quite a few items to verify after the failover from the primary site to the mirrored site. Here is the checklist.<br />
<br />
<br />
<ul>
<li>Verify latest code. Before failover, make some changes. Verify the change after failover.</li>
<li>Verify changesets. Before failover, make some changes to create a new changeset. Verify the changeset after failover. May need to refresh a couple of time to get the latest changeset displayed.</li>
<li>Verify build definition and build history is also up-to-date </li>
<li>Check in new code. Verify TFS functionality.</li>
<li>Verify build configuration from TFS admin console on the build machine. build service, build controller and build agent should all be up and running. May need to unregister the build service and create a new to connect to the new TFS server. For the build agent on the old primary TFS server to function, the TFS on the old server need to be started if not (%TFSInstallRoot%\tools\TFSServicecontrol.exe unquiesce). If want to use build controller on the new primary server, may need to configure build configuration from the new server and create a new controller and agent.</li>
<li>Verify the status of build controller and build agent from client VS -> build. Status should be available. </li>
<li>Start new build using whichever build agent. </li>
<li>Verify TFS web access. http://newserver:8080/tfs. click on links to verify.</li>
<li>Verify reports. http://newserver/reports. Generate at least one report to verify.</li>
</ul>
Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com16tag:blogger.com,1999:blog-4538512855962010260.post-80388260235868169632012-08-13T08:06:00.000-07:002012-08-13T08:06:43.025-07:00Configure SQL Server Mirroring Using Private NetworkThis article covers the steps to change the SQL Server database mirroring to use private network. Two additional NICs are installed on the principal and mirror TFS servers, connecting using cross-over network cable. The IP addresses are configured 10.10.10.1 and 10.10.10.2 respectively. <br />
<br />
The list of databases to configure:<br />
• ReportServer<br />
• ReportServerTempDB<br />
• STS_Content_TFS<br />
• Tfs_Configuration<br />
• Tfs_DefaultCollection<br />
• Tfs_Warehouse<br />
<br />
<b>Step 1. Stop database alerts for both servers if any</b><br />
SQL Server management studio -> SQL Server Agents -> Alerts -> disable all.<br />
<br />
<b>Step 2. Stop mirror job email alert for both servers if any</b><br />
SQL Server management studio -> SQL Server Agents -> Jobs -> Database Mirroring Monitor Job -> Notification -> uncheck email.<br />
<br />
<b>Step 3. Backup the Database to be mirrored</b>.<br />
-- Backup the all databases on the Principal Server <br />
use [master] <br />
go <br />
<br />
backup database [ReportServer] <br />
to disk = 'F:\Backups\TFS1\ReportServer_mirror.bak'; <br />
go<br />
backup log [ReportServer] <br />
to disk = 'F:\Backups\TFS1\ReportServer_Log-mirror.trn'; <br />
go<br />
<br />
backup database [ReportServerTempDB]<br />
to disk='f:\backups\tfs1\ReportServerTempDB_mirror.bak';<br />
go<br />
backup log [ReportServerTempDB]<br />
to disk='f:\backups\tfs1\ReportServerTempDB_Log-Mirror.trn';<br />
go<br />
<br />
backup database [STS_Content_TFS]<br />
to disk='f:\backups\tfs1\STS_Content_TFS_mirror.bak';<br />
go<br />
backup log [STS_Content_TFS]<br />
to disk='f:\backups\tfs1\STS_Content_TFS_Log-Mirror.trn';<br />
go<br />
<br />
backup database [Tfs_Configuration]<br />
to disk='f:\backups\tfs1\Tfs_Configuration_mirror.bak';<br />
go<br />
backup log [Tfs_Configuration]<br />
to disk='f:\backups\tfsfulldbbackups\tfs1\Tfs_Configuration_Log-Mirror.trn';<br />
go<br />
<br />
backup database [Tfs_DefaultCollection]<br />
to disk='f:\backups\tfsfulldbbackups\tfs1\Tfs_DefaultCollection_mirror.bak';<br />
go<br />
backup log [Tfs_DefaultCollection]<br />
to disk='f:\backups\tfsfulldbbackups\tfs1\Tfs_DefaultCollection_Log-Mirror.trn';<br />
go<br />
<br />
backup database [Tfs_Warehouse]<br />
to disk='f:\backups\tfsfulldbbackups\tfs1\Tfs_Warehouse_mirror.bak';<br />
go<br />
backup log [Tfs_Warehouse]<br />
to disk='f:\backups\tfsfulldbbackups\tfs1\Tfs_Warehouse_Log-Mirror.trn';<br />
go<br />
<br />
<b>Step 4. Remove mirroring for every database from Principal server. </b><br />
SQL Server Management Studio -> databases -> select a database -> properties -> mirroring -> remove mirroring<br />
<br />
<b>Step 5. Change endpoints on principal server. </b><br />
-- alter Database Mirroring Endpoint on Principal Server<br />
alter ENDPOINT [Mirroring] <br />
STATE=STARTED <br />
AS TCP (LISTENER_PORT = 5022, LISTENER_IP = (10.10.10.1)) <br />
FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE, <br />
ENCRYPTION = REQUIRED ALGORITHM RC4); <br />
GO <br />
<br />
GRANT CONNECT ON ENDPOINT::Mirroring TO [ad\MYSERVICEACCOUNT]; <br />
GO <br />
<br />
<b>Step 6. Change endpoints on mirror server. </b><br />
-- alter Database Mirroring Endpoint on Mirror Server <br />
alter ENDPOINT [Mirroring] <br />
STATE=STARTED <br />
AS TCP (LISTENER_PORT = 5022, LISTENER_IP = (10.10.10.2)) <br />
FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE, <br />
ENCRYPTION = REQUIRED ALGORITHM RC4); <br />
GO <br />
<br />
GRANT CONNECT ON ENDPOINT::Mirroring TO [ad\MYSERVICEACCOUNT]; <br />
GO <br />
<br />
<b>Step 7. Verify endpoints from both servers</b><br />
-- Verify the Database Mirroring Endpoint Status <br />
SELECT name, protocol_desc, state_desc FROM sys.database_mirroring_endpoints <br />
GO <br />
<br />
<b>Step 8. Copy the back up files from TFS1 to TFS2, using cross-over interfaces</b><br />
<br />
Step 9. <b>Restore the all databases on the Mirrored instance using NORECOVERY option. make sure the TFS_Configuration is the first one to restore</b><br />
-- Restoring the database ReportServer from the backup file <br />
USE [master] <br />
GO <br />
alter database [TFS_Configuration] set partner off<br />
<br />
RESTORE DATABASE [TFS_Configuration] <br />
FROM DISK = 'F:\TFS1_Backups\TFS_Configuration_mirror.bak' <br />
WITH REPLACE, NORECOVERY;<br />
GO <br />
RESTORE LOG [TFS_Configuration] <br />
FROM DISK = 'F:\TFS1_Backups\TFS_Configuration_Log-mirror.trn' WITH NORECOVERY; <br />
GO <br />
<br />
USE [master] <br />
GO <br />
alter database [ReportServer] set partner off<br />
<br />
RESTORE DATABASE [ReportServer] <br />
FROM DISK = 'F:\TFS1_Backups\ReportServer_mirror.bak' <br />
WITH REPLACE, NORECOVERY;<br />
GO <br />
RESTORE LOG [ReportServer] <br />
FROM DISK = 'F:\TFS1_Backups\ReportServer_Log-mirror.trn' WITH NORECOVERY; <br />
GO<br />
<br />
USE [master] <br />
GO <br />
alter database [ReportServerTempDB] set partner off<br />
<br />
RESTORE DATABASE [ReportServerTempDB] <br />
FROM DISK = 'F:\TFS1_Backups\ReportServerTempDB_mirror.bak' <br />
WITH REPLACE, NORECOVERY;<br />
GO <br />
RESTORE LOG [ReportServerTempDB] <br />
FROM DISK = 'F:\TFS1_Backups\ReportServerTempDB_Log-mirror.trn' WITH NORECOVERY; <br />
GO <br />
<br />
USE [master] <br />
GO <br />
alter database [STS_Content_TFS] set partner off<br />
<br />
RESTORE DATABASE [STS_Content_TFS] <br />
FROM DISK = 'F:\TFS1_Backups\STS_Content_TFS_mirror.bak' <br />
WITH REPLACE, NORECOVERY;<br />
GO <br />
RESTORE LOG [STS_Content_TFS] <br />
FROM DISK = 'F:\TFS1_Backups\STS_Content_TFS_Log-mirror.trn' WITH NORECOVERY; <br />
GO <br />
<br />
USE [master] <br />
GO <br />
alter database [TFS_DefaultCollection] set partner off<br />
<br />
RESTORE DATABASE [TFS_DefaultCollection] <br />
FROM DISK = 'F:\TFS1_Backups\TFS_DefaultCollection_mirror.bak' <br />
WITH REPLACE, NORECOVERY;<br />
GO <br />
RESTORE LOG [TFS_DefaultCollection] <br />
FROM DISK = 'F:\TFS1_Backups\TFS_DefaultCollection_Log-mirror.trn' WITH NORECOVERY; <br />
GO <br />
<br />
USE [master] <br />
GO <br />
alter database [TFS_Warehouse] set partner off<br />
<br />
RESTORE DATABASE [TFS_Warehouse] <br />
FROM DISK = 'F:\TFS1_Backups\TFS_Warehouse_mirror.bak' <br />
WITH REPLACE, NORECOVERY;<br />
GO <br />
RESTORE LOG [TFS_Warehouse] <br />
FROM DISK = 'F:\TFS1_Backups\TFS_Warehouse_Log-mirror.trn' WITH NORECOVERY; <br />
GO <br />
<br />
<b>Step 10. Setup the Mirroring sessions on mirror server.</b><br />
-- Adding the database to Database Mirroring Session (Execute it on Mirror Server) <br />
<br />
USE [master] <br />
ALTER DATABASE [ReportServer] <br />
SET PARTNER = 'TCP://10.10.10.1:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [ReportServerTempDB] <br />
SET PARTNER = 'TCP://10.10.10.1:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [STS_Content_TFS] <br />
SET PARTNER = 'TCP://10.10.10.1:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [Tfs_Configuration] <br />
SET PARTNER = 'TCP://10.10.10.1:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [Tfs_DefaultCollection] <br />
SET PARTNER = 'TCP://10.10.10.1:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [Tfs_Warehouse] <br />
SET PARTNER = 'TCP://10.10.10.1:5022'; <br />
GO <br />
<br />
<b>Step 11. Setup the Mirroring sessions on principal server.</b><br />
-- Adding the database to Database Mirroring Session (Execute it on Principal Server) <br />
USE [master] <br />
GO<br />
ALTER DATABASE ReportServer SET PARTNER OFF;<br />
ALTER DATABASE ReportServerTempDB SET PARTNER OFF;<br />
ALTER DATABASE STS_Content_TFS SET PARTNER OFF;<br />
ALTER DATABASE Tfs_Configuration SET PARTNER OFF;<br />
ALTER DATABASE Tfs_DefaultCollection SET PARTNER OFF;<br />
ALTER DATABASE Tfs_Warehouse SET PARTNER OFF;<br />
<br />
USE [master] <br />
ALTER DATABASE [ReportServer] <br />
SET PARTNER = 'TCP://10.10.10.2:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [ReportServerTempDB] <br />
SET PARTNER = 'TCP://10.10.10.2:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [STS_Content_TFS] <br />
SET PARTNER = 'TCP://10.10.10.2:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [Tfs_Configuration] <br />
SET PARTNER = 'TCP://10.10.10.2:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [Tfs_DefaultCollection] <br />
SET PARTNER = 'TCP://10.10.10.2:5022'; <br />
GO <br />
<br />
USE [master] <br />
ALTER DATABASE [Tfs_Warehouse] <br />
SET PARTNER = 'TCP://10.10.10.2:5022'; <br />
GO <br />
<br />
<b>Step 12. On the Database Mirroring Properties change the Operation Mode to High Performance (asynchronous) for every database.</b><br />
SQL Server Management Studio -> databases -> select a database -> properties -> mirroring -> Operation mode -> change to High Performance (asynchronous) <br />
<br />
<b>Step 13. Verify mirroring setting from principal server</b><br />
SQL Server Management Studio -> databases -> select a database -> properties -> mirroring<br />
<br />
<b>Step 14. Verify mirroring by checking database status from both servers</b><br />
SQL Server Management Studio -> databases <br />
<br />
<b>Step 15. Enable database alerts for both servers</b><br />
SQL Server management studio -> SQL Server Agents -> Alerts -> enable all.<br />
<br />
<b>Step 16. Start mirror job email alert for both servers</b><br />
SQL Server management studio -> SQL Server Agents -> Jobs -> Database Mirroring Monitor Job -> Notification -> check email.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com4tag:blogger.com,1999:blog-4538512855962010260.post-57138649631195886812012-02-22T08:18:00.000-08:002012-02-22T08:18:07.767-08:00Change Shelveset owner in TFS 2010Inside TFS database schema, shelvesets are saved in tbl_workspace table with type=1. <br />
use Tfs_defaultcollection;<br />
select * from tbl_Workspace where type = 1 ;<br />
<br />
One of the ways to get ownerID is from a developer's workspace name.<br />
use Tfs_defaultcollection;<br />
select * from tbl_Workspace where WorkspaceName='MYWORKSPACENAME';<br />
<br />
To change the owner of a shelveset, run the following command: <br />
use Tfs_defaultcollection;<br />
update tbl_Workspace set ownerid=5 where type = 1 and WorkspaceName='shelvetest_3';<br />
<br />
This may be useful after a develop leaves the team and his Active Directory ID is revoked.<br />
<br />
Note: It is highly recommended not to modify TFS database directly.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com0tag:blogger.com,1999:blog-4538512855962010260.post-43341342151869876182012-01-05T11:17:00.001-08:002012-01-05T11:41:49.989-08:00Revoke Read Access to ClearCase VOBSay a VOB (VOB tag: VOB1) only allows a group of developers (group id: GRPa) to have read-write access. All other users do not have any access.<br />
<br />
1. Make sure that GRPa is either listed as ownership group or additional group. This privilege defines who can modify the code.<br />
<br />
> cleartool desc -l vob:VOB1<br />
...<br />
VOB ownership:<br />
owner AD\ccadmin<br />
group AD\clearcase<br />
Additional groups:<br />
group AD\GRPa<br />
...<br />
<br />
To add GRPa to the addiontinal group, run command <br />
> clearcase protectvob -add_group GRPa<br />
<br />
2. Make sure that the VOB root directory has 770 and owned by GRPa group. This privilege defines who can see the code under VOB root.<br />
<br />
> cleartool desc -l VOB1<br />
... <br />
Element Protection:<br />
User : ccadmin : rwx<br />
Group: GRPa : rwx<br />
Other: : ---<br />
...<br />
<br />
to change the protection of the VOB root directory, run command<br />
<br />
> cleartool protect -chmod 770 VOB1<br />
<br />
<br />
If another group (group id: GRPb) needs only read access to VOB1, then a third group (id GRPc) needs to be created to include both GRPa and GRPb. The group GRPc need to be the group of VOB root element. To change it, run command<br />
<br />
> cleartool protect -chgrp GRPc VOB1Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-4715321004811313522012-01-05T08:10:00.000-08:002012-01-05T08:23:15.806-08:00How to run cleartool mkattr from ant scriptManaging escape charactor is never a simple task, especially when it involves xml, cleartool, ant exec, and trying to publish a piece of html code on a blog. Here is an example of how to set an attribute to a ClearCase baseline.<br />
<br />
<pre><!-- set baseline with the new build label-->
<exec dir="${clearcase.bin}" executable="cleartool" failonerror="true" >
<arg line="mkattr"/>
<arg line="BuildNO"/>
<arg line="&apos;\&quot;${build.label}\&quot;&apos;"/>
<arg line="${cc.baseline.new}"/>
</exec>
</pre>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com4tag:blogger.com,1999:blog-4538512855962010260.post-27748671294474071502011-10-27T06:47:00.000-07:002011-10-27T06:47:04.678-07:00Delete DLL failed due to "required by other applications" ErrorSometimes, when we try to delete a DLL, it fails due to "required by other applications" error.<br />
<br />
Normally, we can delete a DLL from GAC by gacutil.exe tool shipped with<b> </b>.NET 1.1, or use the newer interface, the Assembly Cache Viewer, integrated into Windows Explorer, located at %windir%\assembly.<br />
<br />
For the assembly initially is installed using msi package, try to use the setup msi to uninstall the DLL.<br />
<div><br />
</div>For msi installed assembly, as the last resort, back up following registry key HKLM\Software\Classes\Installer\Assemblies\Global\. Delete the corresponding entry for the pinned DLL. (for per-machine installations, use HKCU\SOFTWARE\Classes\Installer\Assemblies\Global). Then go back to the GAC to delete the DLL.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com2tag:blogger.com,1999:blog-4538512855962010260.post-61153204703689695292011-09-30T12:59:00.000-07:002011-09-30T12:59:20.696-07:00How to find out SMTP serverIn command prompt, type <code>nslookup</code> and hit enter<br />
<div>> <code><span class="Apple-style-span" style="color: #0b5394;">set type=MX</span></code></div><div><br />
</div>Type the domain name and hit enter, for example<br />
<div>> <span class="Apple-style-span" style="color: #0b5394;">AD</span></div><div><br />
The results will be a list of host names that are set up for SMTP<br />
<div><div>Server: xxx.xxx.com</div><div>Address: xxx.xxx.xxx.xxx</div></div><div><br />
</div><div>or, under nslookup prompt, type</div><div>> <span class="Apple-style-span" style="color: #0b5394;">set q=mx </span></div><div>> <span class="Apple-style-span" style="color: #0b5394;">mailhost</span></div></div>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-32211584079915576512010-08-24T12:35:00.000-07:002010-08-24T12:35:44.736-07:00ClearCase Deliver with "unable to compute base" ErrorProblem Symptoms: <br />
<br />
1. Rebase and deliver operation could not finish on one particular file. Error message:<br />
<span style="font-size: x-small;">>>> Operation started: 8/17/2010 3:29:45 PM</span><br />
<span style="font-size: x-small;">Error from VOB database: "\MidTier".</span><br />
<span style="font-size: x-small;">Element "xxxx\InquiriesRequestVOFactory.java", unable to compute base (to \main\Mainline_i\CBFE17.5_THS\djogo_CBFE17.5_THS\29 from \main\Mainline_i\CBFE17.5_THS\36).</span><br />
<span style="font-size: x-small;">Skipping "xxxx\InquiriesRequestVOFactory.java".</span><br />
<br />
Other related errors.<br />
1. The version tree of the file could not be retrieved from GUI with the following error message. But cleartool lsvtree command ran without error.<br />
<span style="font-size: x-small;">"failed to retrieve version history of the element"</span><br />
<br />
2. db_server_log error message.<br />
% more db_server_log<br />
<span style="font-size: x-small;">2010-08-16T09:17:10-04:00 db_server(15416): Ok:</span><br />
<span style="font-size: x-small;">2010-08-17T12:47:07-04:00 db_server(11335): Error: Database identifier 724419 not found in "../db__obj.c" line 740.</span><br />
<span style="font-size: x-small;">2010-08-17T12:55:13-04:00 db_server(11335): Error: Database identifier 724419 not found in "../db__obj.c" line 740.</span><br />
<span style="font-size: x-small;">2010-08-17T12:57:38-04:00 db_server(11336): Error: Database identifier 724419 not found in "../db__obj.c" line 740.</span><br />
<span style="font-size: x-small;">2010-08-17T13:02:54-04:00 db_server(12862): Error: Database identifier 724419 not found in "../db__obj.c" line 740.</span><br />
<span style="font-size: x-small;">2010-08-17T13:06:08-04:00 db_server(12862): Error: Database identifier 724419 not found in "../db__obj.c" line 740.</span><br />
<span style="font-size: x-small;">2010-08-17T13:06:49-04:00 db_server(12862): Error: Database identifier 724419 not found in "../db__obj.c" line 740.</span><br />
<br />
3. could not merge the file.<br />
>cleartool merge -to InquiriesRequestVOFactory.java -version \main\Mainline_i\CBFE17.5_THS\36<br />
<span style="font-size: x-small;">cleartool: Error: Error from VOB database: "\MidTier".</span><br />
<br />
But the file could be merge with only drawing merge arrows. <br />
>cleartool merge -to InquiriesRequestVOFactory.java -ndata -version \main\Mainline_i\CBFE17.5_THS\36<br />
<span style="font-size: x-small;">Recorded merge of "InquiriesRequestVOFactory.java".</span><br />
<br />
Workaround. <br />
By drawing an merge arrow as above, we can skip the element for deliver/rebase. but it doesnot resolve the problem.<br />
<br />
Diagnose.<br />
1. run command dbcheck.<br />
/etc/utils/dbcheck -r1 -a -k -p32767 vob_db <br />
<span style="font-size: x-small;">...</span><br />
<span style="font-size: x-small;">Processing data file: vob_db.d02(3), total of 1302988 records</span><br />
<span style="font-size: x-small;">Problems at record 1298822:</span><br />
<span style="font-size: x-small;">* key field OBJ_DBID(23) error: has a missing key</span><br />
<span style="font-size: x-small;">...</span><br />
<span style="font-size: x-small;">1 error was encountered in 1 record/node</span><br />
<br />
Solution.<br />
1. Stop ClearCase (or untag and unregister the VOB, stop ClearCase and then start ClearCase)<br />
2. Backup (very import!). Copy the db directory <br />
3. Copy the keybuild utility to the VOB db directory<br />
4. run: keybuild vob_db under the VOB db directory<br />
5. Exit out of the db directory after keybuild completes<br />
6. Start ClearCase<br />
7. Reformat the VOB. Run the following command: <br />
cleartool reformatvob <path-to-vbs><br />
<br />
If these steps are completed successfully and without errors, your VOB should now be healthy. If they did not complete or you received errors, restore the VOB from backup. <br />
<br />
For my VOB with 7.4GB in size and 5 years in history, it took about 3 hours to finish the procedure.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com2tag:blogger.com,1999:blog-4538512855962010260.post-47585060588311176842010-06-10T06:20:00.000-07:002010-06-10T06:21:23.030-07:00Report Server rsInternalError ErrorWhen accessing all the TFS reports from report server, the following message showed up in browser.<br />
<span style="font-size: x-small;">An internal error occurred on the report server. See the error log for more details. (rsInternalError)</span><br />
<br />
Further investigation found more information in the Reporting Service log file and dump log file. <br />
<br />
<span style="font-size: x-small;">ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)</span><br />
<br />
<span style="font-size: x-small;">w3wp!processing!5!06/07/2010-08:48:03:: a ASSERT: Assertion failed! Call stack:</span><br />
<span style="font-size: x-small;">Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Assert(Boolean condition) </span><br />
<span style="font-size: x-small;">Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Initialize(Stream stream) </span><br />
<span style="font-size: x-small;">Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader..ctor(Stream stream) </span><br />
<span style="font-size: x-small;">Microsoft.ReportingServices.ReportProcessing.ReportProcessing.DeserializeReport(GetReportChunk getChunkCallback, ReportItem parent, Hashtable& definitionObjects) </span><br />
<br />
These reports used to work, and there was no known changes to the system. I do notice that the size of chunkData table in the reportserver database became 0 around the same time the problem started.<br />
<br />
To solve the problem, we need to restore the reports. From SQL Server Management Studio, run <br />
<br />
<span style="color: #0b5394; font-size: x-small;">use reportserver</span><br />
<span style="color: #0b5394; font-size: x-small;">go</span><br />
<br />
<span style="color: #0b5394; font-size: x-small;">SELECT </span><br />
<span style="color: #0b5394; font-size: x-small;">itemID, Path, Name, CAST(CAST(Content AS varbinary(max)) AS xml) ReportXML </span><br />
<span style="color: #0b5394; font-size: x-small;">FROM </span><br />
<span style="color: #0b5394; font-size: x-small;">dbo.Catalog </span><br />
<span style="color: #0b5394; font-size: x-small;">where content is not null</span><br />
<br />
The ReportXML column is the report definition. Save it to a <em>name</em>.rdl file, and upload the file to the report site to overwrite the report.<br />
<br />
This can not be the best solution, as I have 900+ reports to recover. But it is the only working one I found so far.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com9tag:blogger.com,1999:blog-4538512855962010260.post-9677070290283367762010-06-02T06:12:00.000-07:002010-06-02T06:12:28.804-07:00Hoxfix KB957196 Install procedure for database-tier mirrored TFS sitesThis procedure also applies to the installation of TFS upgrades SP1 on database-tier mirrored sites.<br />
<br />
1. before start, notify the users and make sure nobody is using TFS.<br />
2. backup Report Server encryption key. Ship the key to site2. The key will not be used in the procedure. It will be used if the primary site needs to recover. <br />
3. open SQL Server Management Studio, connect to site1 and site2. <br />
4. in Management Studio, full database + transaction backup for site1. Ship the backups to site2.<br />
6. in Management Studio, stop mirroring from site1.<br />
7. install hotfix for 750-smart-bld1.<br />
8. backup full database + transaction log. TFSIntegration database is modified during hotfix install. <br />
9. ship the backup set to site2.<br />
10. in Management Studio, restore database (and transaction log) to open status for site2.<br />
11. in Management Studio, set up mirroring from site1.<br />
13. full backup again for site1.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com0tag:blogger.com,1999:blog-4538512855962010260.post-64305543844537124152010-05-31T12:56:00.000-07:002010-05-31T12:57:10.998-07:00Mostly Recently Updated Table for SQL ServerI found a useful query for finding out the most recently accessed/updated table in a SQL Server database (I forgot the original resource). I used the script to find out a table back sceen of Team Foundation Server (TFS), so I could modify the content to configure a particular URL.<br />
<br />
use <em>TfsIntegration</em> <br />
go <br />
select<br />
t.name<br />
,last_user_update<br />
,user_updates<br />
,user_seeks<br />
,user_scans<br />
,user_lookups<br />
,last_user_seek<br />
,last_user_scan<br />
,last_user_lookup<br />
from<br />
sys.dm_db_index_usage_stats i JOIN<br />
sys.tables t ON (t.object_id = i.object_id)<br />
where<br />
database_id = db_id()Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-5551519603685016732010-05-31T08:50:00.000-07:002010-05-31T08:50:04.653-07:00SQL Server database hang in "in recovery" statusProblem. After a failed setting mirror operation (initiated from SQL Server Management Studio from GUI), SQL Server Database stay in "in recovery" status for prolonged period of time (overnight). The database is about 7GB in size. From the primary site, the database showed normal. From the secondary site, the database showed "in recovery".<br />
<br />
There is little that can be done for the secondary database. One option is to stop the SQL services, rename the data files (.mdf & .ldf), start the SQL database again, drop the existing database, rename the data files back, and attached the data files with same database name. After that, we can try to restore database backup and set up mirror. <br />
<br />
On a closer look from primary, it seems that the mirror is broken. However, from the output of some database operation in the secondary database, it seems that the mirror has not be broken yet. Further more, there is no entry in the event log to indicate the progress of the recovery operation.<br />
<br />
Let's try this approach. From the primary site, to break the mirror run the following command.<br />
<span style="color: blue; font-size: x-small;">ALTER DATABASE TfsVersionControl SET PARTNER OFF</span><br />
After the command finished successfully, the database on the secondary site changed to (Restoring…) status immediately. The following operations are straight forward -- copy the full database backup and log, and restore with norecovery option, set mirror for the database.<br />
This is the preferred approach, since only the problem db is touched, no need to re-set the mirror for all other databases.<br />
<br />
There are occasional complains from the internet about this prolonged (or hanged) SQL Server database "in recovery" status. It may worth to take a look whether the database actually started the "recovery", or still in a previous status due to unknown reasons. <br />
<br />
<div></div>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com9tag:blogger.com,1999:blog-4538512855962010260.post-63096676383705994912010-05-31T08:16:00.000-07:002010-06-02T06:19:27.831-07:00Script to Monitor ClearCase licenseHere are the scripts mentioned in my previous post regarding monitoring ClearCase license usage. <br />
<br />
re: <a href="http://doublepaddle.blogspot.com/2008/02/monitoring-clearcase-license-usage.html">http://doublepaddle.blogspot.com/2008/02/monitoring-clearcase-license-usage.html</a> Apperently I am not good at following up my previous posts -- Sorry for the delay.<br />
<br />
<br />
The collection script is as simple as this. <br />
<br />
<span style="color: #0b5394; font-size: x-small;">#!/usr/bin/sh</span><br />
<span style="color: #0b5394; font-size: x-small;">date >> /home/ccadmin/logs/license.log</span><br />
<span style="color: #0b5394; font-size: x-small;">/opt/rational/clearcase/bin/clearlicensegrep "Current active users" >> /home/ccadmin/logs/license.log </span><br />
<br />
The script is scheduled in cron jobs for every 10 mintues. This script can be easily converted to a Windows batch file and added to scheduler. <br />
<br />
Then a perl script is used to load the data and generate the report in excel format. The script can be added as part of the Windows scheduler, or run at the time when you want to view the report. The nice chart in the previous post is also part of the excel report. <br />
<br />
<span style="color: #0b5394;">#!/usr/bin/perl</span><br />
<span style="color: #0b5394;">#Auther: Li Qin</span><br />
<span style="color: #0b5394;">#Date: 2008.02.05</span><br />
<span style="color: #0b5394;">#Function: generate ClearCase license usage report in excel format</span><br />
<br />
<span style="color: #0b5394;">use Spreadsheet::WriteExcel;</span><br />
<span style="color: #0b5394;">use Win32::OLE qw(in with);</span><br />
<span style="color: #0b5394;">use Win32::OLE::Const 'Microsoft Excel';</span><br />
<span style="color: #0b5394;"><br />
</span><span style="color: #0b5394;">$Win32::OLE::Warn = 3; # die on errors...</span><br />
<br />
<span style="color: #0b5394;">$file = "C:\\Li\\SCM\\ClearCase\\report-licns.xls";</span><br />
<span style="color: #0b5394;">$workbook = Spreadsheet::WriteExcel->new("$file");</span><br />
<span style="color: #0b5394;">$sheet = $workbook->addworksheet("data");</span><br />
<span style="color: #0b5394;"><br />
</span><span style="color: #0b5394;">my $format1 = $workbook->add_format();</span><br />
<span style="color: #0b5394;">$format1->set_bold();</span><br />
<span style="color: #0b5394;">$format1->set_size(15);</span><br />
<span style="color: #0b5394;">$format1->set_color('blue');</span><br />
<span style="color: #0b5394;">$format1->set_align('center');</span><br />
<br />
<span style="color: #0b5394;">my $format2 = $workbook->add_format();</span><br />
<span style="color: #0b5394;">$format2->set_bold();</span><br />
<span style="color: #0b5394;">$format2->set_size(11);</span><br />
<span style="color: #0b5394;">$format2->set_color('Black');</span><br />
<span style="color: #0b5394;">$format2->set_align('center');</span><br />
<br />
<span style="color: #0b5394;">my $format3 = $workbook->add_format();</span><br />
<span style="color: #0b5394;">$format3->set_size(11);</span><br />
<span style="color: #0b5394;">$format3->set_color('Black');</span><br />
<span style="color: #0b5394;">$format3->set_align('center');</span><br />
<br />
<span style="color: #0b5394;">$sheet->activate();</span><br />
<span style="color: #0b5394;">$sheet->merge_range('C2:G2', "ClearCase Usage Report", $format1);</span><br />
<br />
<span style="color: #0b5394;">$sheet->set_column(3, 2, 40);</span><br />
<span style="color: #0b5394;">$sheet->set_column(3, 3, 20);</span><br />
<span style="color: #0b5394;">$sheet->set_column(3, 4, 20);</span><br />
<span style="color: #0b5394;">$sheet->write(3, 2, "Date", $format2 );</span><br />
<span style="color: #0b5394;">$sheet->write(3, 3, "Usage", $format2 );</span><br />
<span style="color: #0b5394;">$sheet->write(3, 4, "Max", $format2 );</span><br />
<br />
<span style="color: #0b5394;">open(FILE,"license.log") || </span><span style="color: #0b5394;">die "couldn't open file a.out";</span><br />
<span style="color: #0b5394;">$row = 4;</span><br />
<span style="color: #0b5394;">my @user1, @user2;</span><br />
<span style="color: #0b5394;">$max = 35;</span><br />
<span style="color: #0b5394;">while ($date= <file>) {</span><br />
<span style="color: #0b5394;">chomp $date; </span><br />
<br />
<span style="color: #0b5394;">$line1 = <file>;</span><br />
<span style="color: #0b5394;">chomp $line1;</span><br />
<span style="color: #0b5394;">while ( !($line1 =~ m/Current/) ) {</span><br />
<span style="color: #0b5394;">$user1[$row-4] = 0;</span><br />
<br />
<span style="color: #0b5394;">$sheet->write($row+1, 2, $date, $format3);</span><br />
<span style="color: #0b5394;">$sheet->write($row+1, 3, $user1[$row-4], $format3);</span><br />
<span style="color: #0b5394;">if ( $date =~ m/Fri Feb 1 17/ ) {</span><br />
<span style="color: #0b5394;">$max = 40;</span><br />
<span style="color: #0b5394;">}</span><br />
<span style="color: #0b5394;">$sheet->write($row+1, 4, $max, $format3);</span><br />
<span style="color: #0b5394;">$row = $row +1;</span><br />
<span style="color: #0b5394;">$date = $line1;</span><br />
<span style="color: #0b5394;">$line1 = <file>;</span><br />
<span style="color: #0b5394;">chomp $line1;</span><br />
<span style="color: #0b5394;">}</span><br />
<span style="color: #0b5394;">$pos = rindex $line1, ":";</span><br />
<span style="color: #0b5394;">$user1[$row-4] = substr($line1,$pos+1);</span><br />
<span style="color: #0b5394;">$user1[$row-4]=$user1[$row-4]+0;</span><br />
<br />
<span style="color: #0b5394;">$sheet->write($row+1, 2, $date, $format3);</span><br />
<span style="color: #0b5394;">if ( $date =~ m/Fri Feb 1 17/ ) {</span><br />
<span style="color: #0b5394;">$max = 40;</span><br />
<span style="color: #0b5394;">}</span><br />
<span style="color: #0b5394;">$sheet->write($row+1, 3, $user1[$row-4], $format3);</span><br />
<span style="color: #0b5394;">$sheet->write($row+1, 4, $max, $format3);</span><br />
<span style="color: #0b5394;">$row = $row +1;</span><br />
<span style="color: #0b5394;">}</span><br />
<span style="color: #0b5394;">close(FILE);</span><br />
<span style="color: #0b5394;">$workbook->close;</span><br />
<br />
<span style="color: #0b5394;"># #create chart</span><br />
<span style="color: #0b5394;">my $Excel = Win32::OLE->GetActiveObject('Excel.Application') </span><span style="color: #0b5394;">|| </span><span style="color: #0b5394;">Win32::OLE->new('Excel.Application', 'Quit');</span><br />
<br />
<span style="color: #0b5394;"># open Excel file</span><br />
<span style="color: #0b5394;">my $Book = $Excel->Workbooks->Open("$file");</span><br />
<span style="color: #0b5394;"># select worksheet of data</span><br />
<span style="color: #0b5394;"><br />
</span><br />
<span style="color: #0b5394;">$count = 6;</span><br />
<span style="color: #0b5394;">my $sheet = $Book->Worksheets("data");</span><br />
<span style="color: #0b5394;">my $value = $sheet->Cells($count,4)->{'Value'};</span><br />
<span style="color: #0b5394;">my $len = length($value);</span><br />
<span style="color: #0b5394;"><br />
</span><span style="color: #0b5394;">while ( $len >0 ) {</span><br />
<span style="color: #0b5394;">$count = $count +1;</span><br />
<span style="color: #0b5394;">my $value = $sheet->Cells($count,4)->{'Value'};</span><br />
<span style="color: #0b5394;">$len = length($value);</span><br />
<span style="color: #0b5394;">#printf "At ($count, 4) the value is %s. length is %d\n", $value, $len;</span><br />
<span style="color: #0b5394;">}</span><br />
<span style="color: #0b5394;">print "last row is $count.";</span><br />
<span style="color: #0b5394;"><br />
</span><br />
<span style="color: #0b5394;">$lastRow = $count-1;</span><br />
<span style="color: #0b5394;">my $Range = $sheet->Range("C6:E$lastRow");</span><br />
<br />
<span style="color: #0b5394;">my $Chart2 = $Excel->Charts->Add($sheet);</span><br />
<span style="color: #0b5394;">$Chart2->{ChartType} = xlLine;</span><br />
<span style="color: #0b5394;">$Chart2->SetSourceData({Source => $Range, PlotBy => xlColumns});</span><br />
<br />
<span style="color: #0b5394;">$Chart2->{HasTitle} = 1;</span><br />
<span style="color: #0b5394;">$Chart2->ChartTitle->{Text} = "ClearCase License Usage\n";</span><br />
<span style="color: #0b5394;">$Chart2->Axes(xlValue)->{HasTitle} = 1;</span><br />
<span style="color: #0b5394;">$Chart2->Axes(xlValue)->AxisTitle->{Text} = "License Usage";</span><br />
<span style="color: #0b5394;">$Chart2->Axes(xlCategory)->{HasTitle} = 1;</span><br />
<span style="color: #0b5394;">$Chart2->Axes(xlCategory)->AxisTitle->{Text} = "Date/Time";</span><br />
<br />
<span style="color: #0b5394;">$Chart2->{HasLegend} = 'False';</span><br />
<span style="color: #0b5394;">$Chart2->{Name} = "Chart";</span><br />
<span style="color: #0b5394;">$Chart2->{HasLegend} = 1;</span><br />
<span style="color: #0b5394;">$Chart2->Legend->{Position} = xlBottom;</span><br />
<span style="color: #0b5394;">$Chart2->SeriesCollection(1)->{Name} = "Usage";</span><br />
<span style="color: #0b5394;">$Chart2->SeriesCollection(2)->{Name} = "Max";</span><br />
<br />
<span style="color: #0b5394;"># save and clean up</span><br />
<span style="color: #0b5394;">$Book->Save;</span><br />
<span style="color: #0b5394;">$Book->Close;</span><br />
<span style="color: #0b5394;"># End of create charts</span><br />
<br />
We have upgraded our monitoring using SQL Server Reporting Service, a nice-to-have.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com5tag:blogger.com,1999:blog-4538512855962010260.post-27730295986717259632010-05-17T10:51:00.000-07:002010-05-25T12:52:47.394-07:00Change check-in email notification to TFS Web AccessThere are some very useful articles to change TFS email notifications to link to Team System Web Access:<br /><br /><a href="http://msmvps.com/blogs/vstsblog/archive/2007/08/31/changing-tfs-email-notifications-to-link-to-team-system-web-access.aspx"><span style="font-size:85%;">Changing TFS emails to link to Team System Web </span></a><br /><a href="http://msmvps.com/blogs/vstsblog/archive/2009/01/11/changing-tfs-emails-to-link-to-team-system-web-access-part-2.aspx"><span style="font-size:85%;">Changing TFS emails to link to Team System Web Part 2</span></a><br /><br />The configurable links include:<br />- Work Item notification mails<br />- Build notification mails<br />- Check-in notification mails<br />- Mails sent by Team Explorer<br /><br />However, for check-in notification mails, if your TFS web access is not installed as the default website, and contains a virtual directory as part of the URL, the tfsadminutil tool cannot process the URL correctly, at least not until TFS 2008 SP1. For example, if your TFS web access URL is <a href="http://mytfsserver:8080/tswa">http://myTFSserver:8080/tswa</a>, tfsadminutil tool will set up the links as <a href="http://mytfsserver:8080/">http://myTFSserver:8080/</a> instead.<br /><br />Here we provide a workaround until tfsadminutil tool has that improved. The workaround requires direct modification of the TFS database. Please note that it is NOT recommended by Microsoft.<br /><br />Prerequisite: TFS 2008 + SP1 + TFS web access + Hotfix KB957196<br /><br />Step 1. run the command on the TFS server:<br /><span style="font-size:85%;"><span style="color:#6666cc;">C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools> tfsadminutil configureconnections /TSWAUri:http://myTFSserver:8080/tswa</span><br /></span><br />Step 2. connect to TFS database through SQL Server Management Studio. Run the following query.<br /><span style="font-size:85%;color:#6666cc;">use TfsIntegration</span><br /><span style="font-size:85%;color:#6666cc;">go</span><br /><span style="font-size:85%;color:#6666cc;">select * from tbl_service_interface</span><br /><br /><span style="font-size:85%;"></span><span style="font-size:85%;">output:</span><br /><span style="font-size:85%;">....<br />8 WorkItemEditor </span><a href="http://mytfsserver:8080/wi.aspx"><span style="font-size:85%;">http://myTFSserver:8080/wi.aspx</span></a><span style="font-size:85%;"><br />8 ChangesetDetail </span><a href="http://mytfsserver:8080/cs.aspx"><span style="font-size:85%;">http://myTFSserver:8080/cs.aspx</span></a><span style="font-size:85%;"><br />8 Difference </span><a href="http://mytfsserver:8080/diff.aspx"><span style="font-size:85%;">http://myTFSserver:8080/diff.aspx</span></a><span style="font-size:85%;"><br />8 ViewItem </span><a href="http://mytfsserver:8080/view.aspx"><span style="font-size:85%;">http://myTFSserver:8080/view.aspx</span></a><span style="font-size:85%;"><br />....<br /></span><br />Step 3. Modify the URLs in the table for the above items.<br /><span style="color:#6666cc;">Update tbl_service_interface </span><br /><span style="font-size:85%;color:#6666cc;">Set url='http://myTFSserver:8080/tswa/wi.aspx'</span><br /><span style="font-size:85%;color:#6666cc;">Where name='WorkItemEditor'</span><br /><br /><span style="font-size:85%;color:#6666cc;">Update tbl_service_interface</span><br /><span style="font-size:85%;color:#6666cc;">Set url='http://myTFSserver:8080/tswa/cs.aspx'</span><br /><span style="font-size:85%;color:#6666cc;">Where name='ChangesetDetail'</span><br /><br /><span style="font-size:85%;color:#6666cc;">Update tbl_service_interface</span><br /><span style="font-size:85%;color:#6666cc;">Set url='http://myTFSserver:8080/tswa/diff.aspx'</span><br /><span style="font-size:85%;color:#6666cc;">Where name='Difference'</span><br /><br /><span style="font-size:85%;color:#6666cc;">Update tbl_service_interface</span><br /><span style="font-size:85%;color:#6666cc;">Set url='http://myTFSserver:8080/tswa/view.aspx'</span><br /><span style="font-size:85%;color:#6666cc;">Where name='ViewItem'</span><br /><br />Step 4. After the TFS process is recycled, your check-in email subscription will generate emails linking to TFS web access.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-54728296218454128942010-02-04T08:26:00.000-08:002010-02-04T11:11:43.651-08:00No Views Show up in ClearCase Explorer<p>One developer got problem accessing his view. ClearCase used to work fine on his desktop. Since two days ago, after refreshing the ClearCase Explorer view shortcuts, he found that there were no views showing up on the view panel. He had no problem using ClearCase Project Explorer, except for view related operations, such as list the view property. </p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1lmS8LIddACocM49sFks6R8Fj3tzWwAR7sSLWs4zaFXxNwdRS_Ypl4mNYfhI_ORC_2Q4ZNaK0KYBfnAG4bgUYVhcxgTG_JbssSt5bGYaFUUDS5m4Gv24XkbXfGWGibn6NCQ0Uq87M4e4/s1600-h/err2.bmp"><img style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; FLOAT: left; HEIGHT: 57px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5434460984589153698" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1lmS8LIddACocM49sFks6R8Fj3tzWwAR7sSLWs4zaFXxNwdRS_Ypl4mNYfhI_ORC_2Q4ZNaK0KYBfnAG4bgUYVhcxgTG_JbssSt5bGYaFUUDS5m4Gv24XkbXfGWGibn6NCQ0Uq87M4e4/s400/err2.bmp" /></a></p><br /><br /><p></p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZB_AF_EoV5taMpZoz2DX6DemDtUpVUooi9jq1msMpfZF3gpZypYAajFEf5Jr6brVXdZtxfpc7xxBXw06CicvLdQzJY-mjIG5u9JrtB0mFOgPflsURJfLVNHJf9WTtcJ6cBc8WncBKtGk/s1600-h/err1.bmp"><img style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; FLOAT: left; HEIGHT: 72px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5434460860317122402" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZB_AF_EoV5taMpZoz2DX6DemDtUpVUooi9jq1msMpfZF3gpZypYAajFEf5Jr6brVXdZtxfpc7xxBXw06CicvLdQzJY-mjIG5u9JrtB0mFOgPflsURJfLVNHJf9WTtcJ6cBc8WncBKtGk/s400/err1.bmp" /></a><br /><br /><br /><br /><br />When trying to start the view manually, it showed the following error.<br /><br /><span style="font-size:78%;">H:\>cleartool startview patelsus_VER6.1.5_int</span><br /><span style="font-size:78%;">view_contact call failed: RPC: Unable to receive; errno = [WINSOCK] Connection reset by peer</span><br /><span style="font-size:78%;">cleartool: Error: Error trying to contact view_server for view Tot75xrdtw1027q:C:\CCShare\patelsus_VER6.1.5_int.vws: No such file or directory</span><br /><span style="font-size:78%;">cleartool: Error: Couldn't set view tag patelsus_VER6.1.5_int: No such file or directory </span><br /><span style="font-size:78%;"></span><br /><br />There were errors in the system's event log too, complaining view server died on start up, etc.<br /><br />After rule out other causes, run winmsd from Start -> Run, under the network -> protocal, the first entry should be "<span style="color:#3333ff;">MSAFD Tcpip [TCP/IP]</span>" and the second should be "<span style="color:#3333ff;">MSAFD Tcpip [UDP/IP]</span>". However, the protocal showed: "<span style="color:#ff0000;">SSH Capture over [MSAFD Tcpip [TCP/IP]]</span>" and "<span style="color:#ff0000;">SSH Capture over [MSAFD Tcpip [UDP/IP]]</span>".<br /><br /><br />It turned out that the developer installed SSH Tectia, which conflicts with ClearCase client. After uninstallation, the problem is resolved.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com2tag:blogger.com,1999:blog-4538512855962010260.post-47656167956896232952009-12-09T08:10:00.000-08:002009-12-09T08:22:15.750-08:00Install SQL Server Bussiness Intellegent Development Studio<p>If you have SQL Server Management Studio Express, SQL Server Bussiness Intellegent Development Studio (BIDS) is not installed by default. But you can get BIDS as part of Microsoft SQL Server 2005 Express Edition Toolkit. Microsoft SQL Server 2005 Express Edition Toolkit can be freely downloaded from Microsoft.</p><p>Problem: </p><p>When installing Microsoft SQL Server 2005 Express Edition Toolkit, the installation failed with the following error message in the log file.<br /></p><p><span style="font-size:85%;color:#333399;">Machine : xxxxxx</span></p><p><span style="font-size:85%;color:#333399;">Product : MSXML 6 Service Pack 2 (KB954459) </span></p><p><span style="font-size:85%;color:#333399;">Product Version : 6.20.1099.0 </span></p><p><span style="font-size:85%;color:#333399;">Install : Failed Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0005_TOT75XRDTW1027R_MSXML6_1.log </span></p><p><span style="font-size:85%;color:#333399;">Error Number : 1603<br /></span></p><p>The detailed error message in the log indicates </p><p></p><p><span style="font-size:85%;color:#333399;">Action start 10:34:08: SkipInstallCA.</span></p><p><span style="font-size:85%;color:#333399;">This package is not supported on this operating system.</span></p><p><span style="font-size:85%;color:#333399;">Action ended 10:34:08: SkipInstallCA. Return value 3.</span></p><p>Solution.</p><p>First uninstall the existing version of msxml. If fail to uninstall, use Windows Installer CleanUp Utility to clean up msxml6.</p>After that, re-run SQLEXPR_TOOLKIT.EXE to install BDIS. Everything should be fine.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-33120342844697190072009-10-07T07:01:00.000-07:002009-10-07T07:07:16.967-07:00TFS: Unable to connect to this Team Foundation Server<p>When using Visual Studio 2008 to connect to <span id="SPELLING_ERROR_0" class="blsp-spelling-error">TFS</span> server from a client machine, I got the following error. </p><p><br /><span style="font-size:85%;color:#333399;">Microsoft Visual Studio</span></p><p><span style="font-size:85%;color:#333399;"><span id="SPELLING_ERROR_1" class="blsp-spelling-error">TF</span>31002: Unable to connect to this Team Foundation Server: <span id="SPELLING_ERROR_2" class="blsp-spelling-error">mytfsserver</span>. </span></p><p><span style="font-size:85%;color:#333399;">Team Foundation Server <span id="SPELLING_ERROR_3" class="blsp-spelling-error">Url</span>: </span><a href="http://mytfsserver:8080/"><span style="font-size:85%;color:#333399;">http://mytfsserver:8080</span></a><span style="font-size:85%;color:#333399;">.<br />Possible reasons for failure include:<br />- The Team Foundation Server name, port number or protocol is incorrect.</span></p><p><span style="font-size:85%;color:#333399;">- The Team Foundation Server is offline.</span></p><p><span style="font-size:85%;color:#333399;">- Password is expired or incorrect. </span></p><p><span style="font-size:85%;color:#333399;"><br />For further information, contact the Team Foundation Server administrator.</span></p><span style="font-size:85%;"><p><br /></span>Further <span id="SPELLING_ERROR_4" class="blsp-spelling-corrected">investigation</span> shows that the same user can connect to the server from other machine, and other user can connect to the server from the same client machine. All the users and the server reside in the same domain. It must be the setting for that user on that client machine.<br /></p><p>Because Team Explorer uses IE controls behind the scene, I opened the IE options and found that the LAN setting has configured to use proxy. After <span id="SPELLING_ERROR_5" class="blsp-spelling-corrected">unchecked</span> the setting, VS2008 has no problem connecting to the <span id="SPELLING_ERROR_6" class="blsp-spelling-error">TFS</span> server.</p>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-34266490447577144542009-06-29T12:46:00.000-07:002009-06-29T13:05:43.834-07:00MSI: Uninstall left some files not removed<p>I created a MSI package and tested the installation and uninstallation. Everything looked good except for one file. The abc.exe file could not be removed by the uninstallation process. The INSTALLDIR started clean. And file was not used at the time of uninstallation.</p><p><br />I created the extensive log using /L*v option with msiexec command. After studying the log file and comparing the ComponentId in the msi, I found out that the file was marked "PreviouslyPinned". </p><p><br /><span style="font-size:78%;">MSI (s) (50:C0) [15:22:31:932]: Executing op: ComponentUnregister(ComponentId={4CA897DC-C1DD-1A1D-CA93-FF18DA884529},,BinaryType=0,<span style="color:#ff0000;">PreviouslyPinned</span>=1)1: {2E9A386D-9B96-4E7C-9AE9-B614A86EEFA5} 2: {4CA897DC-C1DD-1A1D-CA93-FF18DA884529} </span></p><span style="font-size:78%;"></span><span style="font-size:78%;"><p><br /></span>Sure enough, I found an entry of the file in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs. </p><p>After deleting the entry, the uninstallation of the MSI worked properly. The MSI package was correct, the problem resided on the testing environment.</p>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com2tag:blogger.com,1999:blog-4538512855962010260.post-52483681848043156712009-06-05T07:13:00.000-07:002009-06-05T07:54:45.447-07:00Configure Cygwin sshd for Build Automation<div align="left">Our build is initiated from a UNIX build server, then invokes the Windows build portion.</div><div align="left"><br />1. create a local build user on the Windows build server. Use the same id as in the UNIX server. Password can be different.</div><div align="left"><br />2. install cygwin on the Windows build server.</div><div align="left"><br />3. set up sshd service.</div><div align="left">There is a very nice <a href="http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html">article</a> about how to set up sshd using cygwin, including which cygwin packages to install, how to install and configure ssh service, how to generate user pulib/private keys, and how to add the user to the password file. </div><div align="left"></div><div align="left">In summary, use the following command.</div><div align="left"></div><div align="left">ssh-host-config</div><div align="left">ssh-user-config</div><div align="left"></div><div align="left">You should be able to find a "CYGWIN sshd" service in Windows machine. Make sure the service is started.</div><div align="left"><br />4. in the ssh client (UNIX build server), login as build id, generate rsa (or dsa) public/private keys. entry cartridge return (empty) for passphrase.</div><div align="left"></div><div align="left"># ssh-keygen -t dsa<br /></div><div align="left">public key is save to ~/.ssh/id_dsa.pub</div><div align="left">private key is saved to ~/.ssh/id_dsa</div><div align="left"><br />5. sftp the public key(id_dsa.pub) to ~/.ssh directory on the ssh SERVER (Windows build server).</div><div align="left"><br />6. create an authorization file in the ~/.ssh directory on SERVER, add the public key in.</div><div align="left"><br />server> cat /id_dsa.pub >> /.ssh/authorized_keys<br /></div><div align="left">7. To verify that you can connect to the target system, log in through from the client. An entry will be created in the ~/.ssh/known_hosts file in the server.</div><div align="left"></div><div align="left">$ ssh <a href="mailto:id@target">id@target</a><br /></div><div align="left">Now you can integrate the Windows build with UNIX build process.</div><div align="left"><br /><span style="font-size:85%;">...</span></div><div align="left"><span style="font-size:85%;">scp /home/cbfebuild/${FILENAME} </span><a href="mailto:ccadmin@winbuild:/cygdrive/e/CBFE_Build/$%7BFILENAME"><span style="font-size:85%;">ccadmin@winbuild:/cygdrive/e/CBFE_Build/${FILENAME</span></a><span style="font-size:85%;">}</span></div><div align="left"><span style="font-size:85%;">ssh -n -o NumberOfPasswordPrompts=0 </span><a href="mailto:ccadmin@scm-750-bld1"><span style="font-size:85%;">ccadmin@winbuild</span></a> <span style="font-size:85%;">"rm -rf /cygdrive/e/CBFE_Build/${RELEASE}"</span></div><div align="left"><span style="font-size:85%;">ssh </span><a href="mailto:ccadmin@scm-750-bld1"><span style="font-size:85%;">ccadmin@winbuild</span></a> <span style="font-size:85%;">"cd /cygdrive/e/CBFE_Build/${RELEASE}; /usr/bin/unzip -u /cygdrive/e/CBFE_Build/${FILENAME}"</span></div><div align="left"><span style="font-size:85%;">ssh </span><a href="mailto:ccadmin@scm-750-bld1"><span style="font-size:85%;">ccadmin@winbuild</span></a> <span style="font-size:85%;">"cd /cygdrive/e;/cygdrive/c/Program\ Files/InstallShield/2009/System/IsCmdBld.exe -p CBFE_Build/IS_Projects/${RELEASE}/CBFE_Common/CBFE_Common.ism -z BUILD_VERSION=${BUILD_LABEL}"</span></div><div align="left"><span style="font-size:85%;">....<br /></span></div>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com0tag:blogger.com,1999:blog-4538512855962010260.post-77588322277426531182009-06-04T12:30:00.000-07:002009-06-04T12:44:51.171-07:00Run InstallShield ISCmdBld.exe under cygwin, ssh<p>After installed and configured cygwin (sshd) in the Windows build server, I tested the ssh connection without any issue. The next step is to launch the InstallShield command line builder ISCmdBld.exe through ssh from my UNIX build box.</p><p><br /><span style="font-size:85%;">ssh </span><a href="mailto:myUserid@myWindowsBuildServer"><span style="font-size:85%;">myUserid@myWindowsBuildServer</span></a><span style="font-size:85%;"> "cd /cygdrive/e;/cygdrive/c/Program\ Files/InstallShield/2009/System/IsCmdBld.exe -p CBFE_Build/IS_Projects/myProject.ism -z BUILD_VERSION=${BUILD_LABEL}"</span></p><p><br />Nothing happened. The command prompt returned immediately. After more testing, I found out that if I logged in to the Windows build server using myUserid, or other id, I had no problem running ISCmdBld.exe in a cygwin session. However, logging in through ssh from other boxes (UNIX or Windows) did not work. It was not X server. And it was not the ACL on the executables. Even power user group is not sufficient.<br /></p><p>Finaly, by adding the user to the Administrator group on the Windows box, the problem solved.</p>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-25491487597478749112009-04-15T11:01:00.000-07:002009-04-15T11:06:24.616-07:00TAS is Gone?TotalNet Advanced Server (TAS) has been IBM's preferred ClearCase interop solution for many years. Yet, we recieved a piece of notification from LSI saying that TAS would be end of support in 60 days. And that was more than one month ago.<br /><br />Many commercial and free software implement file systems sharing from UNIX to Windows. All use one of the two protocols: NFS and SMB. For ClearCase interop, we can either set up a SMB server on the UNIX side, or install NFS clients on every Windows box. For NFS, there are many commercial software, such as Netapp, EMC, Humming Bird Maestro, etc. For SBM, there is TAS. Of course we have Samba, but it is free. Who wants a free software?<br /><br />We use Solaris VOB server in our ClearCase environment. From Solaris 10, Samba is bundled with the OS. Maybe we will use Solaris's native CIFS (Common Internet File System) solution some day.Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com0tag:blogger.com,1999:blog-4538512855962010260.post-88435019646444217622009-03-10T13:38:00.000-07:002009-03-10T14:05:05.487-07:00Execution < guid > cannot be found (rsExecutionNotFound)This happened when running our .Net SCM Reporting web application that accesses SQL reports using Report Viewer. After leaving the web application idle for some time, I got the error message "Execution <> cannot be found". guid can be either empty or a string like 'j4j3vfblcanzv3qzcqhvml55'. This happened on either the local web server/SQL report server, or other clients.<br /><br />Tried to set AsyncRendering="False" in the ReportViewer control as sugguested in some web sources. It did not work.<br /><br />The following solution from John Gallardo's blog makes the problem less often. It modifies the SessionTimeout and SessionAccessTimeout system properties. It sets timeout to be an hour and a half. The setting should be used with caution as temporary session snapshots will not be aged out as often.<br /><br /><span style="font-size:85%;">' sessionTimeout.rss<br />Public Sub Main() </span><br /><span style="font-size:85%;">Dim props() as [Property] </span><br /><span style="font-size:85%;">props = new [Property] () { new [Property](), new [Property]() } </span><br /><span style="font-size:85%;">props(0).Name = "SessionTimeout" </span><br /><span style="font-size:85%;">props(0).Value = timeout </span><br /><span style="font-size:85%;">props(1).Name = "SessionAccessTimeout" </span><br /><span style="font-size:85%;">props(1).Value = timeout </span><br /><span style="font-size:85%;">rs.SetSystemProperties(props)</span><br /><span style="font-size:85%;">End Sub</span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;">E:\_qinl><span style="color:#3333ff;">rs -i sessionTimeout.rss -s </span></span><a href="http://localhost/reportserver"><span style="font-size:85%;color:#3333ff;">http://localhost/reportserver</span></a><span style="font-size:85%;color:#3333ff;"> -v timeout="6000"</span><br /><span style="font-size:85%;">The command completed successfully</span>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com1tag:blogger.com,1999:blog-4538512855962010260.post-83993962674746627932009-02-11T12:18:00.000-08:002009-02-11T12:20:23.704-08:00False Dependency<p>Got the same problem. Resolved by moving the offending change set to a new activity, and deleting the now-empty activity.</p><p><br /><span style="font-size:85%;color:#000000;">Q: When I try to deliver an activity from a stream, sometimes UCM complains of a dependency on another activity in the stream. But when I look more deeply, I cannot find a change-set dependency between the activities! Why? </span></p><p><span style="font-size:85%;"></span><br /><span style="font-size:85%;color:#000000;">When you deliver an activity from one stream to another, a hidden delivery baseline is created on your behalf in the source stream. UCM requires that all subsequent deliveries from this stream contain this baseline (and all its activities). The problem described above usually occurs when you deliver something from one development stream to another, and then later try to deliver another activity somewhere (without including the first delivery's activities). There are workarounds for this. Appendix A of Software Configuration Management Strategies and IBM Rational ClearCase contains a script that can undo an activity. Or, you can resort to moving the offending change-set to a new activity and deleting the now-empty activity that was causing the dependency. </span></p><p><br /><span style="font-size:85%;color:#000000;">From IBM Developerworks </span><a href="http://www.ibm.com/developerworks/rational/library/jul05/reader/bellagio.html"><span style="font-size:85%;color:#000000;">http://www.ibm.com/developerworks/rational/library/jul05/reader/bellagio.html</span></a></p>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com0tag:blogger.com,1999:blog-4538512855962010260.post-29513462441409610282008-10-24T09:52:00.000-07:002008-10-24T10:30:15.862-07:00Rebase Cannot be CancelledA developer got some problem with a rebase operation. After messing around, she ended up manually checked in all the versions in the rebase change set, only to find out later that the rebase could not be cancelled nor resumed. Okay, it was time to call ClearCase admin for help.<br /><br />$ <span style="color:#3366ff;">cleartool rebase -status -stream </span><a><span style="color:#3366ff;">RP_WT_VER5.10@/vobs/Horizon_PVOB</span><br /></a><span style="font-size:78%;">cleartool: Error: The ClearCase version used to start the rebase operation in progress does not match the current version.<br />cleartool: Error: Unable to restore operation.<br />cleartool: Error: Unable to restore from pvar.<br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"></span>The activity contains an empty change set. But it cannot be removed.<br />$ <span style="color:#3366ff;">cleartool rmact </span><a><span style="color:#3366ff;">rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB</span></a><br /><span style="font-size:78%;">Remove activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB"? [no] y<br />cleartool: Error: Activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB" is set in view "<no-tag-in-region>".<br />cleartool: Error: Unable to remove activity r</span><a><span style="font-size:78%;color:#000000;">ebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB</span></a><span style="font-size:78%;"><span style="color:#000000;">.</span><br /></span><br />C:\Li\tmp><span style="color:#3366ff;">cleartool setact -view RP_WT_VER5.10_DDV -none</span><br /><span style="font-size:78%;">cleartool: Error: View "RP_WT_VER5.10_DDV" is set activity to activity"rebase.RP_WT_VER5.10.20081022.172717" which is currently involved in anactive deliver or rebase operation. The set activity of this view may not bechanged until the operation has completed.<br />cleartool: Error: Unable to unset activity in view RP_WT_VER5.10_DDV.<br /></span><span style="font-size:85%;"><span style="color:#000000;"><br /></span></span>$ <span style="color:#3366ff;">cleartool dump stream:RP_WT_VER5.10@/vobs/Horizon_PVOB<br /><br /></span><span style="font-size:78%;"><span style="color:#000000;">RP_WT_VER5.10<br />oid=31df728b.324a44c0.a5b2.70:02:42:d0:06:dc dbid=74825 (0x12449)<br />mtype=activity name="RP_WT_VER5.10" type=85<br />usid=UNIX:UID-9150 gsid=UNIX:GID-8025<br /></span><span style="color:#000000;">...</span><br /></span></span><span style="font-size:78%;"><span style="color:#000000;">work items:<br />user=106 view=ff390327.2f8d4680.83d0.ac:04:d8:db:0a:08<br />user=106 view=65e7f7b0.fb494922.88bf.18:08:1c:40:01:26<br />user=106 view=cddce13f.ac9d41cf.acb4.0d:cd:f0:f5:e1:93<br />user=106 view=5ef30ee5.538b462b.9fa1.b7:6a:4f:41:5c:eb<br />user=106 view=8ebe7608.b1214e8f.9039.07:18:5c:ba:26:3e<br />user=106 view=e1e56bc4.5942465f.81a5.f5:80:cd:d0:74:51<br />user=106 view=5d0175d3.1c984f7e.940c.8a:49:cc:18:c4:21<br /><span style="color:#3366ff;">Process variables</span>:<br />name=SUM_CSPEC_ID value=0:5<br />name=UCM_STREAM_RECBLS value=<recbls><bl>oid:c328a47b.c0694013.b050.70:ec:52:d0:57:7a@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5</bl><bl>oid:9c091eb4.c51b4791.a11a.a2:7e:5b:5b:ba:b8@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5</bl><bl>oid:3546cb0f.09254d4f.bf59.0d:b7:cb:41:78:39@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5</bl><bl>oid:42fc12cb.d1cf4666.9670.48:f1:02:dd:15:5b@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5</bl></recbls><br />name=<span style="color:#3366ff;">UCM_REBASE</span> value=ver=3<br />owner=dantchev<br />start=1224710837<br />act=oid:e1d5538e.b9224182.913d.d7:93:21:a0:b0:4c@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5<br />view=ff390327.2f8d4680.83d0.ac:04:d8:db:0a:08<br />state=reprocess_merging<br />csid=kind:UCM.Stream </span><br /><span style="color:#000000;">...</span><br /></span><span style="color:#000000;"><br /><span style="color:#3366ff;">$ /opt/rational/clearcase/etc/utils/ucmutil<br />ucmutil> setpvar -pvar UCM_REBASE -none </span><span style="font-size:85%;"><span style="color:#3366ff;">stream:RP_WT_VER5.10@/vobs/Horizon_PVOB </span></span><br /><span style="font-size:78%;">You are about to modify internal data. Any mistake will damage the objects.<br />Do you want to continue? [no] y<br />Set UCM_REBASE = "" [cleared]<br /></span><br />The rebase operation is cancelled and the stream is back to normal.<br />C:\Li\tmp><span style="color:#3366ff;">cleartool rebase -status -stream RP_WT_VER5.10@\Horizon_PVOB</span><br /><span style="font-size:78%;">No rebase in progress for stream "RP_WT_VER5.10".<br /></span><br />But the activity is still at a intermediate status. It cannot be unset nor deleted.<br />% cleartool rmact rebase.RP_WT_VER5.10.20081022.17271<br /><span style="font-size:85%;">Remove activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB"? [no] y<br />cleartool: Error: Activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB" is set in view "<no-tag-in-region>".<br />cleartool: Error: Unable to remove activity <a><span style="color:#000000;">rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB</span></a>.</span><br /><span style="font-size:85%;"><br /></span>C:\Li\tmp>cleartool setact -view RP_WT_VER5.10_DDV -none<br /><span style="font-size:85%;">cleartool: Error: View "RP_WT_VER5.10_DDV" is set activity to activity<br />"rebase.RP_WT_VER5.10.20081022.172717" which is currently involved in an<br />active deliver or rebase operation. The set activity of this view may not be<br />changed until the operation has completed.<br />cleartool: Error: Unable to unset activity in view RP_WT_VER5.10_DDV.<br /></span><br />One more variable to go.<br />% <span style="color:#3366ff;">cleartool dump activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB</span><br /><span style="font-size:85%;"><br />rebase.RP_WT_VER5.10.20081022.172717<br />oid=e1d5538e.b9224182.913d.d7:93:21:a0:b0:4c dbid=88924 (0x15b5c)<br />mtype=activity name="rebase.RP_WT_VER5.10.20081022.172717" type=73<br />usid=UNIX:UID-9150 gsid=UNIX:GID-8025<br />master replica dbid=3<br />title="rebase RP_WT_VER5.10 on 10/22/2008 05:27:17 PM."<br />process definition uuid=fc0b3a7f.655011dc.84f7.00:01:83:31:69:b5<br />state dbid=64<br />role dbid=52<br />user dbids: 105<br />view=""<br />planned effort=0.00<br />actual start=10/22/08 17:22:21<br />priority=50<br />dtsm=1224710541<br />mod count=0<br />flags=0x4, Setwork<br />parent dbid=74832<br />work items:<br />user=105 view=ff390327.2f8d4680.83d0.ac:04:d8:db:0a:08<br /><span style="color:#3366ff;">Process variables</span>:<br />name=<span style="color:#3366ff;">UCM_INTEGRATION_ACTIVITY</span> value=ver=1<br />state=1<br /></span><br /><span style="color:#3366ff;">ucmutil> setpvar -pvar UCM_INTEGRATION_ACTIVITY -none</span> <span style="font-size:85%;">activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB<br />You are about to modify internal data. Any mistake will damage the objects.<br />Do you want to continue? [no] y<br />Set UCM_INTEGRATION_ACTIVITY = "" [cleared]<br /></span><br />C:\Li\tmp><span style="color:#3366ff;">cleartool setact -view RP_WT_VER5.10_DDV -none<br /></span><span style="font-size:85%;">Cleared current activity from view RP_WT_VER5.10_DDV.</span><br /><br />% <span style="color:#3366ff;">cleartool rmact rebase.RP_WT_VER5.10.20081022.1727</span>17<br /><span style="font-size:85%;">Remove activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB"? [no] y<br />Removed activity "rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB".<br /><br /></span>Everything is back to normal.<br /></span><br /></span>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com3tag:blogger.com,1999:blog-4538512855962010260.post-72068281297635284392008-09-10T06:57:00.000-07:002008-09-10T08:35:04.042-07:00Baseline vs. LabelWhen comparing elements or versions in UCM, many people use baseline the same way as label in Base ClearCase. For example, to find out all elements changed between two version, use the command:<br /><br /><span style="color: rgb(51, 51, 255);font-size:100%;" >cleartool find -all -element '{lbtype_sub($LABEL1) && lbtype_sub($LABEL2)}' -version '{(lbtype($LABEL1) && ! lbtype($LABEL2)) || (lbtype($LABEL2) && !lbtype($LABEL1))}' -print</span><br /><br />Full baseline name can be used to substitute the LABEL1 and LABEL2 variable in the command in UCM.<br /><br /><br />However, baselines are different from labels. A full baseline labels every elements in the stream, no matter they are visible or not; while label only applies to visible elements selected by the view. This implies that you cannot use two baseline names to find out which elements have been deleted (renamed) between two baselines. The following command will fail to give out the removed files.<br /><br /><span style="color: rgb(51, 51, 255);">cleartool find . -element 'lbtype_sub($BASELINE1) && !lbtype_sub($BASELINE2)' -print</span><br /><br />If you have labeled every elements selected by the two baselines respectively, you can get deleted files by command:<br /><br /><span style="color: rgb(51, 51, 255);">cleartool find . -element 'lbtype_sub($LABEL1) && !lbtype_sub($LABEL2)' -print</span>Li Qinhttp://www.blogger.com/profile/18064964613069680003noreply@blogger.com8