Discussion Forum for StarTeam Users


Re: How to recover a deleted project?


[ Follow Ups ] [ Post Followup ] [ Discussion Forum for StarTeam Users]

Posted by Stephanie Claybrooks on May 04, 2001 at 14:08:31:

In Reply to: How to recover a deleted project? posted by Martin Gramatke on April 23, 2001 at 04:42:55:

: How can I recover a deleted project?

This brief will describe how to undelete a project with an Oracle database backend. StarTeam does not provide a method for un-deleting a project. StarBase Product Support recommends using project access rights to deny users the right to delete a project, to safeguard your projects from accidental deletions. All the same, if a project has been accidentally deleted, the StarTeam database can be manually edited to undelete the project. Editing the StarTeam database is not a recommended practice by StarBase Product Support and can lead to unforeseen future problems. The recommended procedure by product support for this scenario is to restore StarTeam from a previous backup. However, there are situations which can make restoring from a backup undesirable, and in this case you can, at your own risk, manually edit the StarTeam database to undelete a project. Un-deleting a project should only be done by an experienced individual with Oracle experience, preferably an Oracle certified DBA. The StarTeam server must not be running while you edit the StarTeam database.

More Information:
**NOTE**: This procedure will undelete all of the views and objects that were ever contained within the deleted project.

Restoring deleted projects:

1. Make a complete backup of the StarTeam repository, configuration files (.cph & .scg), and the Oracle database, while the StarTeam VirtualTeam Server is shutdown and no one is accessing the Oracle database.

In Oracle, run Sql Plus. Login as "system/manager@OracleService "
**NOTE**: Reference to SchemaUsername below refers to the user associated with the starteam tablespace.

2. Query the database with:
SQL> Select * from SchemaUsername.Project
2 ;

This lists all of the projects so that we can identify the deleted project's ID. Find the deleted project and write down it's ID. We will refer to this ID as ID# in the following SQL statements.

3. Change the database with:
SQL> Update SchemaUsername.Project
2 Set DeletedTime = '0'
3 where ID = 'ID#'
4 ;

This is the first step in undeleting the project id that was deleted.

4. Change the database with:
SQL> Update SchemaUsername.Project
2 Set DeletedUserID = '-1'
3 where ID = 'ID#'
4 ;

This is the second step in undeleting the project id that was deleted.

5. Query the database with:
SQL> Select * from SchemaUsername.StView
2 where ProjectID = 'ID#'
3 ;

This lists all of the views of the deleted project so that we can identify those view's ID numbers. Write each of these view ID numbers down. We will refer to these ID's as ViewID# in the SQL statements starting at step 8.

6. Change the database with:
SQL> Update SchemaUsername.StView
2 Set DeletedTime = '0'
3 where ProjectID = 'ID#'
4 ;

This is the first step in undeleting all of the deleted project's view id's.

7. Change the database with:
SQL> Update SSchemaUsername.StView
2 Set DeletedUserID = '-1'
3 where ProjectID = 'ID#'
4 ;

This is the second step in undeleting all of the deleted project's view id's.

8. Change the database with:
SQL> Update SchemaUsername.StView_Member
2 Set DeletedTime = '0'
3 where ViewID = 'ViewID#'
4 ;

This is the first step in undeleting all of the deleted project's objects per view.

9. Change the database with:
SQL> Update SchemaUsername.StView_Member
2 Set DeletedUserID = '-1'
3 where ViewID = 'ViewID#'
4 ;

This is the second step in undeleting all of the deleted project's objects per view.

10. Repeat steps 8 and 9 for each of the ViewID#'s that was listed in step 5, above.

: Where do I disallow a group of users to delete any project?





Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:


[ Follow Ups ] [ Post Followup ] [ Discussion Forum for StarTeam Users]