"Item in Use Errors" after Database Copy

Knowledge Base Articles by the T-Plan Support Team.
Post Reply
SClaydon

"Item in Use Errors" after Database Copy

Post by SClaydon » Thu May 24, 2007 9:15 am

Item in Use Errors after Database Copy

After copying T-Plan data from one database to another, using the Copy and Paste function with the T-Plan Administrator application, you cannot add new Nodes in Analyse and Design; attempting to add new items always results in "Item In Use" errors.

DETAILS
This problem can have one of two possible causes:-

A Mandatory, Predefined Attribute has more than one Default set.
It is possible that, during a copy, a mandatory predefined attribute can end up with more than one default. This causes the error because a referential constraint in the database is violated when you try and add a new node.
If this is the cause, it can be rectified as follows:-

1. Log onto T-Plan Professional as an Administrator.
2. Identify the exact Entity type that you cannot add; for example Test Condition.
3. Using the Entity Definitions window, identify any Mandatory Predefined Attributes associated with that Entity type.
4. Open the Attribute Definitions window, and repeat steps (5) to (7) for each Attribute identified in (3) above.
5. Select the tab to open the list of values for the Attribute.
6. For each value in the list, right click and select "Make Default" from the menu.
7. After making each value a default in turn, restore the desired default.

You should now be able to add Nodes of the Entity type identified in (2) above. You may need to repeat this for other entity types.

This has been identified as an issue with the Copy component of the T-Plan Administrator and will be fixed in a future release.

The source database has previously been migrated from early version(s) of T-Plan (3.2), and the target database uses the SQL Server or Oracle performance extension.
In order to tell if this is the cause of the errors, you need to run an SQL query directly to the database.
If you do not have access to the database in this manner, you will need to arrange to have a dump of the database sent to T-Plan Ltd for repair. In this instance, contact T-Plan Support.

If you have access to the database, the following query can determine whether this is indeed the cause of the errors:-

Code: Select all

[i]select tpParentInst,tpEntityId,tpSeqNo from TPEntityInstance
		group by tpParentInst,tpEntityId,tpSeqNo having count(*) > 1[/i]
If any results are returned, then the sequencing is broken and needs repairing. This repair should be performed by T-Plan Ltd, so please contact T-Plan Support in order to make arrangements for sending a dump of the database to T-Plan Ltd.

Utility
If there are still problems on MSSQL and Oracle then please download and run the following utility: DbIntegrityChecker.

When you have run the Integrity Checker please check the output for any errors - Fix the errors and re-run the application until all the errors have been fixed.
This utility can be used to provide T-Plan support staff with basic information about your T-Plan Professional databases.

If you are having problems with T-Plan Professional, and you suspect that the database may be the cause, this utility may help in identifying the problem.

Double click on the icon to open the application - you will initially be prompted with a T-Plan Professional login dialog. Enter the relevant credentials for the database you want to check (T-Plan Professional only at this time, IMS is not currently supported).

When the application starts, simply press the Run Test button. The app will respond with some text output into its output window. Copy and paste this information into an e-mail, and send that to support@t-plan.co.uk or as directed.

The TPCheck application makes no modification to the database - the queries it uses are specifically targeted at database conditions that are known to cause problems.
Internal Ref: PRB-1736[/url]

SteveJenkin

Item in user error fix

Post by SteveJenkin » Thu Jan 24, 2008 11:14 am

Hi Michael,

We are aware of this problem and below are the precise procedures you need to follow to resolve it:

1. Ensure you have made a backup of your database.
2. Make sure everyone is logged out of T-Plan.
3. Execute the attached script on the database.
4. Run the Inheritance Rebuild tool on the database.
5. Run T-Plan Professional, open the Extensions window (Administration tab -> Extensions), right click and append the SQL Server Performance Extension to reinstall it.

This should now resolve the ‘Item in user’ error you are getting.

I look forward to your reply.

Kind regards,
Attachments
purge_sqlserver_perfextension.zip
Sql Server Performance Extension Purge
(479 Bytes) Downloaded 631 times
InheritanceRebuild.zip
Inheritance Rebuild Tool
(28.36 KiB) Downloaded 647 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest