Here is the guide to install ClearCase Remote Client 7.0.1 for Visual Studio 2008.
- If Visual Studio 2005 wasn't already installed, you have to create in the registry, under the node HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0, a string with name InstallDir and value the install path of Visual Studio 2008, tipically C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE.
- After that, install the client, downloaded from https://YourCCRCServer/ccrc/update/ccrcvsi_win32.zip
- Download the updates to the registrations specific for Visual Studio 2008 from ftp://ftp.software.ibm.com/software/rational/clearcase/7.0.1/VS2008_support/CC-CQ-VS2008.zip for 32 bit and from ftp://ftp.software.ibm.com/software/rational/clearcase/7.0.1/VS2008_support/CC-CQ-64_BIT-VS2008.rar for 64 bit.
Extract the zip file, open with Notepad the file reg_VS2008.bat and change the initial assignements so that CC_for_VS=0 and CQ_for_VS=0 (but keep CCRC_for_VS=1).
- From the command prompt, go the folder with the extracted files and execute the file reg_VS2008.bat.
If all went fine, from Visual Studio 2008 the top menu ClearCase should appear.
And here are the adjustments necessary for Visual Studio 2010.
- Download and extract the file from ftp://ftp.software.ibm.com/software/rational/clearcase/7.0.1/VS2010_support/CC_7.0.1_VS2010.zip.
- Modify the reg_VS2010.bat file so that CC_for_VS=0 and CQ_for_VS=0 (keep CCRC_for_VS=1).
- From the command prompt, go to the folder with the extracted files and execute the file reg_VS2010.bat.
If all went fine, from Visual Studio 2010 the to menu ClearCase should appear.
Sometimes, from SQL Server you need to execute a command line application and retrieve its output in a variable.
When you want to to this, you have to consider:
- Enabling the execution of the xp_cmdshell stored procedure
- Saving the output of the command (maybe more lines) in a temporary table
- Taking the first row a putting it in a variable
Finally, here is a complete example. In this case I take the first user in Active Directory whose distinguished name starts with Damiano:
EXEC sp_configure 'show advanced options', 1
EXEC sp_configure 'xp_cmdshell', 1
CREATE TABLE #TEMP (
INSERT INTO #TEMP EXECUTE master..xp_cmdshell 'dsquery user -name Damiano*'
EXEC sp_configure 'xp_cmdshell', 0
EXEC sp_configure 'show advanced options', 0
DECLARE @MYVAR nvarchar(512)
SELECT TOP 1 @MYVAR = LINE FROM #TEMP
DROP TABLE #TEMP