Skip to main content

When I migrate user data to a new TDS 3.0 no shared queries are visible, even after running the PreferenceNameSubstitution API?


Technote (FAQ)


Question

When I migrate user data to a new TDS 3.0 no shared queries are visible, even after running the PreferenceNameSubstitution API?

Answer

In TDS 3.0 Shared queries are stored with a pseudo user by name _SHARED_PREFERENCES so we would need to get all the preferences for this pseudo user.

In order to import all the preferences we would need to dump and load all the preferences for this pseudo user. Below is the example of dump script for the user _SHARED_PREFERENCES to dump all the preferences to a text file by name file.txt
--------------------
use Telelogic Change::csapi;
my $csapi = new Telelogic Change::csapi();
eval
{
my $globals = new Telelogic Change::Globals();
$csapi->setUpConnection("http", "<hostname>", <port>);
my $aUser = $csapi->Login("<admin_user>", "<password>", "Admin", "<db_path>");
my $report = $csapi->DumpAUsersPreferences($aUser, "_SHARED_PREFRENCE");
open(OUTPUT, ">file.txt");
print(OUTPUT $report->getResponseData());
close(OUTPUT);
if ($@)
{
print $@;
}
};
----------------------
The contents of dump file (i.e file.txt) would look some thing like this..
-----------------
_PROFILE_VERSION = 4.7
_USER_CFG__SHARED_PREFERENCES_SHARED = [CCM_PROBLEM][NAME]column_cr1161292968468.19439937801161293377531.1886251136[/NAME][MAIN_TEMPLATE]user_framework/column_rpt.html[/MAIN_TEMPLATE][HDR_TEMPLATE]user_framework/common_bulk_hdr.html[/HDR_TEMPLATE][ATTR_TEMPLATE]user_framework/column_attr.html[/ATTR_TEMPLATE][LABEL_TEMPLATE]user_framework/custom_label.html[/LABEL_TEMPLATE][AUTO_LABEL_TEMPLATE]user_framework/custom_auto_label.html[/AUTO_LABEL_TEMPLATE][AUTO_ATTR_TEMPLATE]user_framework/column_auto_attr.html[/AUTO_ATTR_TEMPLATE][SPAN_ATTR_TEMPLATE]user_framework/custom_span_attr.html[/SPAN_ATTR_TEMPLATE][FTR_TEMPLATE]user_framework/common_bulk_ftr.html[/FTR_TEMPLATE][ATTRS]problem_number:0:false|crstatus:1:false|problem_synopsis:2:false[/ATTRS][SORT_ORDER]problem_number:intb:A[/SORT_ORDER][/CCM_PROBLEM]
----------------------
To load the content we have dumped use the below example script.
---------------------------------
use Telelogic Change::csapi;
my $config ="<input from the file file.txt>"
my $csapi = new Telelogic Change::csapi();
eval
{
$csapi->setUpConnection("http", "<hostname>", <port>);
my $aUser = $csapi->Login("<admin_user>", "<password>", "Admin", "<db_path>");
my $tmpData = $csapi->AddAPreferenceForAUser($aUser, "_SHARED_PREFERENCE","_USER_CFG_", $config, "true");
$tmpData->getResponseData();
if ($@)
{
print $@;
}
};
----------------
Now restart the Change services, then log in as a User to verify all shared queries and reports back.
4.6, 4.6.1, 4.7AnswerProduct versionPartner ContentInternal ContentCategoryReference IDAuthor

Historical Number

11227

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

Rational Change

General Information


Software version:
Version Independent


Operating system(s):
Platform Independent


Reference #:
1324121


Modified date:
2011-03-16

Translate my page

Content navigation