Need expertise on VSS

venu.madhav48@gmail.com created the topic: Need expertise on VSS
Currently we are migrating VSS to ClearCase.iam facing few problems.

Iam trying to do sink up activty across the environments

I have merged all the files and folders which are missing in the Lower environments.Since we dont have any cm team in our organization for code movements they dint follow the SCM process.

Now iam facing problem in Comparing the files in VSS with case sensitive.

EG:Dev env has VENU.CS file which is in upper case

SIT env has venu.cs file which is lower case.

So when iam trying to compare iam not able to distinguish betwn upper case and lower case.

manually it will be huge task to check in each and every env.

Anybody can suggest on this please.

Regards
Venu
Report This
Quick Reply Action Moderate Thank You

Tagged :

How to copy VSS project from one VSS database to another one without loosing history

copy-vss-project-from-one-vss-database-to-another-one-without-loosing-history

If you have any of the following questions in your mind, then this article is the perfect destination for you.

  • How to copy VSS project from one VSS database to another one without loosing history
  • How to move VSS project from one location to another location
  • Moving Visual SourceSafe projects or databases to a new location?
  • Moving a project or projects from one database to another, while preserving the project’s history?

The procedures within each scenario may vary depending on the version of Visual SourceSafe you are running.

APPLIES TO

Microsoft Visual SourceSafe 5.0 Standard Edition

Microsoft Visual SourceSafe 6.0 Standard Edition

NOTE: This process is for Visual SourceSafe 5.0 or greater only.

Requirement:

1.   Use the SSARC and SSRESTOR utilities included in Visual SourceSafe 5.0. With these utilities, you can archive projects, preserve their histories, and restore them to a new database.

2.   You must have SourceSafe Admin privileges to use these utilities

3.   In order to restore a project successfully your archive must include the latest versions all the files in the project. If you use the -v switch with SSARC to archive off earlier versions of your files, you will not be able to restore that archive to a different database because it needs the later versions.

4.   Because the physical file names get renamed when you restore a project to a new database, it may be necessary to reconnect projects that are integrated with Visual SourceSafe.

Warning:

1.   always be very careful when archiving and deleting files

2.   Backing up source files is like voting, do it early and often (warning, this may not be legal in your jurisdiction).

3.   Test your backups out before you actually need them, avoid permanent deletes and keep copies in multiple locations.

 

There are two ways to Archive and Restore Project/Files from one database to another.

To Archive:

1.   Using To archive a database using Visual SourceSafe Administrator

2.   SSARC

Archival of a database allows you to:

* Save disk space on the Visual SourceSafe server or other machine hosting the database.
* Make the Show History command work more quickly.
* Transport files and projects between Visual SourceSafe databases, keeping history information intact.
* Provide a compressed file backing up all or part of a database.

How to Archive Visual SourceSafe (VSS) Project?

Method1: Using Visual SourceSafe Administrator:

The Visual SourceSafe Administrator program allows you to archive your databases using the Archive Projects command, and to restore them from backup using the Restore Projects command.

To archive a database using Visual SourceSafe Administrator:

1. Ensure that no one is using the database and that the ANALYZE utility will not run during the archive operation.
2. Open the database for which you want to archive information.
3. On the Archive menu of Visual SourceSafe Administrator, click Archive Projects.
4. In the Archive wizard, select the project(s) to archive, and click OK.
5. If there are additional projects to be archived, indicate this in step 1 of the wizard, and click Next when finished.
6. In step 2 of the wizard, specify how you want the project(s) to be archived, and click Next when finished. For each choice, you can use Browse to search for and select an archived file to overwrite the existing file.
7. In step 3 of the wizard, specify the versions for the data to archive, using the Version box.
8. Add a comment to the Comment box to document the archive operation.
9. Click Finish to complete the wizard. The archive is written to a *.ssa file in the directory that you have specified.

Method2: Using SSARC: –

Another way of making an archive is to use the Visual SourceSafe SSARC utility from the command line.
Examples

SSARC -d- -yadmin,password archive.ssa $/
Backup the entire default Sourcesafe database to archive.ssa, leaving the database exactly as it is.

SSARC -d- “-vlProduction Release” -yadmin,password -olog.txt archive.ssa $/Test

Backup everything since the version labelled ‘Production Release’ and create a log file with the results of the archiving process.

SSARC -d -x -yadmin,password archive.ssa “$/Project Global Domination” $/OtherProject

Description:  Archive, and delete the deleted files from two projects.

SSARC -i -yadmin,password -olog.txt “-cArchive Everything” archive.ssa $/

Description:  Archive the entire Sourcesafe database, while creating a log file, adding a comment, and running non-interactively, suitable for a scheduled task.
To Restore Project/Files from one database to another.

To Restore:

1.   Using To archive a database using Visual SourceSafe Administrator

2.   SSRESTOR

 

How to Restore Visual SourceSafe(VSS)Project?

Method 1: Using Visual SourceSafe Administrator

Visual SourceSafe Administrator supports restoration of a database from an archive using its Restore Projects command.

To restore a database using Visual SourceSafe Administrator

1. Make sure that no one is using the database and that the ANALYZE utility will not run during the restore operation.
2. On the Archive menu of Visual SourceSafe Administrator, click Restore Projects.
3. In the Restore wizard, enter or locate the archive file from which to restore, and then click Next.
4. In step 2 of the wizard, you can choose the items to restore to the database, and click Next to proceed.
5. Use step 3 of the wizard to specify options for restoring the selected items to the database.
6. Add a comment to the Comment box to document the restore operation.
7. Click Finish to complete the wizard.
8. Verify the database directories carefully to make sure that the restore operation has put the restored items where you intended.

Method 2: Using SSRESTOR Utility

Restores information from a previously created archive. If the restore operation attempts to create a duplicate file or project name, the operation fails. Visual SourcSafe also implements restore operations through its Restore wizard, available in Visual SourceSafe Administrator.
Examples

SSRESTOR -la -yadmin,password archive.ssa $/

Display a list of all of the files archived in archive.ssa.

SSRESTOR “-p$/Test 2” -sD:\newfolder\ -yadmin,password backup.ssa $/Test

Restores project $/Test to the database to a new location, $/Test 2, from the archive file backup.ssa, in a different Sourcesafe database.

Tagged : / / / / / / / / / / / / / / / / / / /

Considerations for Multiple VSS Databases – Pros and Cons

multiple-vss-databases

Microsoft recommends against using multiple VSS databases in simple cases. The support that was in some earlier versions of the product using Data Path doesn’t seem to work at all well in some cases. And at first it can seem that VSS isn’t even capable of operating with multiple databases. On the other hand, there are sometimes good reasons for using multiple VSS databases. And mechanisms for accessing multiple databases ­­sometimes better than the original Data Path mechanism­­ are available in every case (although often poorly documented).
Considerations for Multiple VSS Databases

Pro

  • Quicker maintenance (ANALYZE, backup, etc.) You can for example do detailed maintenance on a different database each day of the week rather than having to do the whole thing all at once.
  • Smaller granularity (In other words you can take a damaged part of VSS down without taking having to take the entire VSS system down.) The current “all or nothing” behavior of VSS is a real thorn in the side of many VSS administrators. In fact this shortcoming alone seems such a “scalability problem” that it makes VSS less than desirable for use in any organization larger than ten people. Multiple VSS databases mitigates this.
  • Perhaps slightly (but not significantly) better performance.
  • Slightly less risk of running into VSS bugs that tend to show up when VSS is stretched beyond its testing and its design center to handle a single very large database.
  • If you have to “restore” a whole database, you at least don’t lose all your organization’s recent work.

Con

  • Potentially a separate list of users for each database, with each user having a separate SS.INI for every database. (One of the configuration recommendations below negates both of these limitations, but maintenance will not be fully automatic. You definitely will have to “add” new users to each database separately, and you may also have to “just remember” to do a few additional manual steps whenever you add or change a VSS user.
  • Separate “user rights” for each database. (It’s very difficult to work around this limitation as the VSS tools for maintaining “user rights” are poor. In fact there’s not even a way to “dump” a “user rights” database to text so you can scan or manipulate it yourself with your own text editing tools.) You could easily wind up facing a maintenance nightmare. One of the configuration recommendations below negates this limitation by simply “not using” user rights at all. You should seriously consider the option of not using “project security”.
  • Microsoft support may blame some hard problems on the multiple databases and say “we told you so”, even if multiple databases really don’t have anything to do with the problem you’re asking them to help with.
  • You cannot “share” files between multiple VSS databases at all. All you can hope for is that your source can be divided into multiple VSS databases along fairly natural project boundaries in such a way that there is virtually no need to “share” files between the multiple databases.
  • It is difficult to bring your multiple databases into one centralized system. The configuration recommendation below of having one unified grand project hierarchy makes this easier. But you will still need to use the Archive and Restore utilities if you need to move a project from one database to another.

 

Tagged : / / / / / / / / / / / / / /

SSARC Utility & SSRESTOR Utility – Archive, Restore VSS Project – Guide

ssarc-utility-ssrestor-utility

Question: 

How to Archive VSS Project in Visual Source Safe (VSS)?

How to Restore VSS Project in  Visual Source Safe (VSS)?

What is SSARC Utility?

What is SSRESTOR Utility?

SSARC Utility

Allows you to archive files, projects, or old versions from a Visual SourceSafe database. Each time you run SSARC (Ssarc.exe), the utility asks only once before it deletes the files/projects. Visual SourceSafe also implements archive operations through its Archive wizard, available in Visual SourceSafe Administrator.

The utility SSRESTOR is used for restoration of archived files. Use of SSARC and SSRESTOR together allows wide-area Visual SourceSafe installations to move files and projects among databases.

Limitation: SSARC cannot create an archive file that is greater than 2 GB. If you try to archive a project larger than this, you will receive an Out of Memory and/or a CRC mismatch error message. To work around this limitation, you will need to archive each subproject.

 

Syntax

ssarc [-C][-D][-I-][-O][-S][-V][-X][-Y] <archive file to create> <files/projects to archive>

If you are not familiar with the syntax conventions used, < and > are used to delimit arguments. The < and > characters are not typed in. The | means a choice of options. Items enclosed in square brackets, [] are optional, and items not enclosed in square brackets are mandatory.

 

Utility Options

The following table describes options available with SSARC.

-C

Specifies a comment (standard Visual SourceSafe parameter). The comment is inserted into the Visual SourceSafe history if the items are deleted from the database as part of the archived record. The comment is also inserted into the archive file itself, if there is one.

-C-

Specifies no comment.

-D

Deletes the archived items from the database.

Specifiying the -d option will delete from your project the items that you are archiving. This will delete your project from Sourcesafe if you use it! Of course, you can restore from your backup file, but for normal use, and for smaller projects I don’t recommend this. This function obviously has its uses, but be sure you want to do this.

-D-

Controls whether Visual SourceSafe actually deletes anything from the database. If this option is not used, the default is to ask.

If the -d- option is used, then SSARC will not delete the projects the items you are archiving. The default is to prompt the user interactively, so if you want to run this from a script, you will need to choose one of the options, or use the -i- flag

-I-

Specifies no prompt for input (standard Visual SourceSafe parameter).

-O

Paginates or redirects output (standard Visual SourceSafe parameter).

-S<srcsafe.ini path>, <data path>

Specifies a path to Srcsafe.ini and the Data directory. The full syntax looks like -Sc: \VSS, OldDB. The item before the comma is the full path to Srcsafe.ini, and the item after the comma is the string in parentheses in a Data_Path setting. If there is no comma, a Srcsafe.ini path is indicated, but no data string. If the first character after the –S is a comma, a data string is specified, but no Srcsafe.ini path.

 

-V[D|L]<version>

Specifies a version number to archive (standard Visual SourceSafe parameter). Enter the version number in standard Visual SourceSafe format (number, date, or label). If this option is not used, SSARC operates on entire files or projects, instead of all versions up to and including a certain version.

Note that SSARC is generally inclusive. That is, if you type –V9, you create an archive file that contains version 9.0 and everything before it. The delete pass is also inclusive, that is, version 9.0 is actually deleted unless it is in the label format. In the latter case, the label is stored in the archive file but is not deleted. If –V is specified, you never delete the current version, even if you specify -D9/9/99. If you are using a version the label format, and the label has a space in it, you must place the entire option in quotation marks, for example, “-VThisOne”.

-X

Archives only deleted items in the specified files and projects. Deleted items are still stored in the Visual SourceSafe database unless the Destroy Permanently option is selected when performing a Delete command.

-X-

Archives all items in the specified files and projects.

-Y<user>,<pwd>

Specifies the user name and password (standard Visual SourceSafe parameter). An example is -YAdmin,Bunny.

archive file to create

Specifies the name of the archive file to create during the archive operation.

files/projects to archive

Specifies files and projects to back up.

Examples

SSARC -d- -yadmin,password archive.ssa $/
Backup the entire default Sourcesafe database to archive.ssa, leaving the database exactly as it is.
SSARC -d- "-vlProduction Release" -yadmin,password -olog.txt archive.ssa $/Test
Backup everything since the version labelled ‘Production Release’ and create a log file with the results of the archiving process.
SSARC -d -x -yadmin,password archive.ssa "$/Project Global Domination" $/OtherProject
Archive, and delete the deleted files from two projects.
SSARC -i -yadmin,password -olog.txt "-cArchive Everything" archive.ssa $/
Archive the entire Sourcesafe database, while creating a log file, adding a comment, and running non-interactively, suitable for a scheduled task.

SSRESTOR Utility

Restores information from a previously created archive. If the restore operation attempts to create a duplicate file or project name, the operation fails. Visual SourcSafe also implements restore operations through its Restore wizard, available in Visual SourceSafe Administrator.

Limitation: SSRESTOR cannot restore a project that is larger than 2 GB. A project larger than this cannot be archived.

 

Syntax:

ssrestor [-C][-I-][-L][-O][-P<project>][-S][-T][-X][-Y]

<archive file to restore> [files/projects]

 

Utility Options

The following table describes options available with this command.

-C

Specifies a comment (standard Visual SourceSafe parameter). The comment is applied to the history entry for restored item(s).

-C-

Specifies no comment.

-I-

Specifies no input (standard Visual SourceSafe parameter).

-L

Specifies a list only, without any restoration.

-LA

Specifies a list of all files and subprojects listed under a project, for example, project $/A.

-O

Redirects output (standard Visual SourceSafe parameter).

-P<project>

Specifies a project to which to restore content. For instance, if you archive $/A/BAR.C and then restore it, it will be restored as $/A/BAR.C.

-S<srcsafe.ini path><data path>

Specifies a path to Srcsafe.ini and the Data directory.

-T

Tests the archive file for corruption, but does not actually restore from the archive.

-X, -X-

Identifies an item that you want to restore, for example, $/a/b. This option distinguishes between deleted projects and undeleted projects that have the same names. For example, if you have deleted $a/b and specify the -X option, SSRESTOR restores the deleted $/a/b. If you specify -X-, SSRESTOR restores an undeleted $/a/b. Even though they have the same name, note that these are two different projects that the utility treats differently.

-Y<user>,<pwd>

Specifies user name and password (standard Visual SourceSafe parameter). An example is -YAdmin,Moggy.

archive file to restore

Specifies the name of the archive file from which to restore the database.

files/projects

Specifies files and projects to restore.

Examples

SSRESTOR -la -yadmin,password archive.ssa $/
Display a list of all of the files archived in archive.ssa.
SSRESTOR "-p$/Test 2" -sD:\newfolder\ -yadmin,password backup.ssa $/Test
Restores project $/Test to the database to a new location, $/Test 2, from the archive file backup.ssa, in a different Sourcesafe database.

Miscellaneous tips

  • Putting the path to the <VSS PATH>\win32 folder in your PATH environment variable makes shell commands a lot easier
  • If you get a message “Only ADMIN can run this utility”, it means that you are either not specifying the admin account, or the password is incorrect. Use "-yadmin,password" if the admin password is “password”, or "-yadmin," if the admin password is not set (not recommended!).
  • If you are using an option that has a space in the argument, enclose the whole thing with quote marks, i.e. “-p$/Project A”
  • A daily archive is easy to do with a Windows shell script, maybe something like this. Then use Scheduled Tasks to have this run every day.
    function q (str)
    	' to make the command a bit more readable, I hope
    	q = """" & str & """"
    end function

    PROJECT = “$/”
    USERID = “admin”
    PASSWORD = “admin”

    ‘ location of SSARC program
    SSARCPATH = “C:\program files\microsoft visual studio\common\vss\win32\ssarc.exe”
    ‘ folder of srcsafe.ini
    SRCSAFEINIPATH = “”
    ‘ prepended to filename in case you’re doing more than one.
    LABEL = “ARCHIVE”
    ‘ destination of archive files
    BACKUPFOLDER = “C:\BACKUPS\”

    ‘ generate a name based on the time.
    today = now()
    backupfilename = LABEL & “-” & formatdatetime(now,2) & “.ssa”

    cmd = q(SSARCPATH) & ” ” & _
    q(“-s” & SRCSAFEINIPATH & “,”) & ” -i- ” & ” -d- ” & _
    q(“-y” & USERID & “,” & PASSWORD) & ” ” & _
    q(BACKUPFOLDER & backupfilename) & ” ” & q(PROJECT)

    Set WshShell = WScript.CreateObject(“WScript.Shell”)
    wscript.echo cmd
    WshShell.run cmd
    set wsshell = nothing

Tagged : / / / / / / / / / / / / / / / / / / / /