Unable to Archive partitions using SDM after upgrade to 5.1.3

  • 3370117
  • 19-Oct-2006
  • 26-Apr-2012

Environment

Versions:
Sentinel 5.1.3
MS SQL 2000
MS SQL 2005
Windows 2000
Windows 2003

Situation

SDM, (Sentinel Data Manager), fails to Archive partitions, using the command line or the GUI, after upgrading to Sentinel 5.1.3

Error: Archiving data unable to bcp out file

Error: Exception trying to archive.; Exception unable to bcp out file ; esecurity.base.exceptions.DBException; ; Caused by unable to bcp out file

Cause by:
The migration of the database performed by the patchdb in 5.1.3 upgrade introduced a bug in the Stored Procedure esec_bcpout. The problem only affects systems where Windows Authentication is used, (SQL Authentication systems will not be affected). The bug is related to an incorrect parameter being passed to the bcp command in the esec_bcpout Stored Procedure. If Windows Authentication is used, the -T parameter, (Use Trusted Connection), should be passed to the bcp command. The bug is that the esec_bcpout Stored Procedure is instead passing the bcp command -E parameter.

Resolution

A hotfix will be released shortly for this. The hotfix will be available at Novell's Support web site under Download Patches. The Hotfix with be for 5.1.3.

If there is urgent need to archive partitions, ie: space requirements, you can manually replace the esec_bcpout Stored Procedure with the following data;

IF EXISTS (SELECT name FROM sysobjects
WHERE name ='esec_bcpout' AND type = 'P')
DROP PROCEDURE esec_bcpout
PRINT 'PROCEDURE esec_bcpout DROPPED.'
GO

CREATE procedure esec_bcpout

@p_tablename varchar(100),
@p_archive_path varchar(2000),
@p_username varchar(64),
@p_passwd varchar(64),
@p_sep varchar(1)

as
/*****************************************************************

Purpose:Only read one partition table output to one file

Date:03/17/2004


******************************************************************/
declare

@l_string varchar(2000),
@l_return int,
@l_err_msgvarchar(1000),
@l_errint,
@l_serverName varchar(100)

--don't know if we should put some batch or packet parameters here
set @l_serverName = cast(SERVERPROPERTY('ServerName') as varchar)
if ((@p_username is null) OR (LEN(@p_username) = 0))
set @l_string = 'bcp '+ @p_tablename + ' out ' + @p_archive_path + ' -S '+@l_serverName+ ' -T -b 10000 -c -t '+ @p_sep;
else
set @l_string = 'bcp '+ @p_tablename + ' out ' + @p_archive_path + ' -S '+@l_serverName+' -U ' + @p_username + ' -P ' +
@p_passwd + ' -b 10000 -c -t '+ @p_sep;

exec @l_return = master..xp_cmdshell @l_string;

SET @l_err = @@ERROR

IF @l_err <> 0
BEGIN
SELECT @l_err_msg = 'Found errors while archiving table ' + @P_tablename + ' with file path: ' + @p_archive_path

RAISERROR(@l_err_msg,16,1,@l_err)
RETURN (-1)
END

return @l_return;
GO

IF EXISTS (SELECT name FROM sysobjects
WHERE name ='esec_bcpout' AND type = 'P')
PRINT 'PROCEDURE esec_bcpout CREATED.'
GO



Additional Information

The following are definitions for the bcp parameters referred to in this TID;

-T
Specifies that bcp connects to SQL Server with a trusted connection, using the security credentials of the network user. login_id and password are not required.

-E
Specifies that the values for an identity column are present in the file being imported. If -E is not given, the identity values for this column in the data file being imported are ignored, and SQL Server 2000 automatically assigns unique values based on the seed and increment values specified during table creation. If the data file does not contain values for the identity column in the table or view, use a format file to specify that the identity column in the table or view should be skipped when importing data; SQL Server 2000 automatically assigns unique values for the column. For more information, see DBCC CHECKIDENT.



Feedback service temporarily unavailable. For content questions or problems, please contact Support.