Subversion Repositories DevTools

Rev

Rev 4538 | Rev 5709 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4538 Rev 4552
Line 49... Line 49...
49
#
49
#
50
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result);
50
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result);
51
pod2usage(-verbose => 1)  if ($opt_help == 2 );
51
pod2usage(-verbose => 1)  if ($opt_help == 2 );
52
pod2usage(-verbose => 2)  if ($opt_manual || ($opt_help > 2));
52
pod2usage(-verbose => 2)  if ($opt_manual || ($opt_help > 2));
53
 
53
 
-
 
54
$ENV{GBE_RM_LOCATION} = 'jdbc:oracle:thin:@auperaora07:1521:RELMANU1';
-
 
55
$ENV{GBE_RM_USERNAME} = 'release_manager'; 
-
 
56
$ENV{GBE_RM_PASSWORD} =  'release_manager';
54
 
57
 
55
ErrorConfig( 'name'    =>'PLAY24' );
58
ErrorConfig( 'name'    =>'PLAY24' );
56
getInvokeStoredProcedure('core_devl');
59
getInvokeStoredProcedure('core_devl');
57
exit;
60
exit;
58
 
61
 
Line 60... Line 63...
60
{
63
{
61
    my $foundDetails = 0;
64
    my $foundDetails = 0;
62
    my (@row);
65
    my (@row);
63
 
66
 
64
    # if we are not or cannot connect then return 0 as we have not found anything
67
    # if we are not or cannot connect then return 0 as we have not found anything
65
    connectRM(\$RM_DB, 9);
68
    connectRM(\$RM_DB, 0);
66
 
69
 
67
    # First get all packages that are referenced in a Release
70
    # First get all packages that are referenced in a Release
68
    # This will only get the top level packages
71
    # This will only get the top level packages
69
    # From non-archived releases
72
    # From non-archived releases
70
 
73
 
71
    # This select currently works
74
    # This select currently works
-
 
75
    #   Invoke a function and recover its return value
72
    my $pvid = 129265;
76
    my $pvid = 129265;
73
    my $m_sqlstr0 = "SELECT release_manager.PK_RMAPI.return_vcs_tag($pvid)".
77
    my $m_sqlstr0 = "SELECT release_manager.PK_RMAPI.return_vcs_tag($pvid) FROM DUAL";
74
                   " FROM RELEASE_MANAGER.PACKAGE_VERSIONS pv" .
-
 
75
                   " WHERE pv.PV_ID = \'$pvid\'";
-
 
76
 
78
 
77
    # This begin does not yet work
79
    # This begin does not yet work
78
    #   ORA-01008: not all variables bound
80
    #   ORA-01008: not all variables bound
79
    my $m_sqlstr1 =  "begin ? := release_manager.PK_RMAPI.return_vcs_tag($pvid); end;";
81
    my $m_sqlstr1 =  "begin ? := release_manager.PK_RMAPI.return_vcs_tag($pvid); end;";
80
    my $m_sqlstr2 =  "begin aa := release_manager.PK_RMAPI.return_vcs_tag($pvid); end;";
82
    my $m_sqlstr =  "begin aa := release_manager.PK_RMAPI.return_vcs_tag($pvid); end;";
81
 
83
 
-
 
84
    # This works
-
 
85
    #   Invoke a stored proceedure. A true proceedure with no return value
-
 
86
    #   Trick - you MUST have suffiecient privilege in order to execute
-
 
87
    #           May not work on the real database, unless you have the right 
82
    # This begin does not yet work
88
    #           password.
83
    my $m_sqlstr =  "begin release_manager.pk_buildapi.set_resume(); end;";
89
    my $m_sqlstr3 =  "begin RELEASE_MANAGER.PK_BUILDAPI.set_resume(); end;";
-
 
90
 
-
 
91
    #
-
 
92
    #   So far, the limats appera to be
-
 
93
    #       Can call a stored proceedure, but not one that returns stuff
-
 
94
    #       Can call a stored function
-
 
95
    #
84
 
96
 
85
print("$m_sqlstr\n");
97
print("$m_sqlstr\n");
86
    my $sth = $RM_DB->prepare($m_sqlstr);
98
    my $sth = $RM_DB->prepare($m_sqlstr);
87
    if ( defined($sth) )
99
    if ( defined($sth) )
88
    {
100
    {