NAME
DTS::Credential - credentials to authenticate against a MS SQL Server 2000
SYNOPSIS
use DTS::Credential;
# regular authentication method
my $credential = DTS::Credential->new(
{
server => 'somedatabase',
user => 'user',
password => 'password',
use_trusted_connection => 0
}
);
#trusted authentication mode
my $credential2 =
DTS::Credential->new(
{ server => 'somedatabase', use_trusted_connection => 1 } );
DESCRIPTION
DTS::Credential
implements the authentication scheme expected by MS SQL Server connection depending on the mode that will be used (regular authentication or trusted connection).
This class was created to be able to invoke the DTS Application LoadFromSQLServer
(and others) method in a polymorphic way, since these methods expect a lot of parameters given in the correct order (some parameters are even unused, but one must inform them anyway).
One should not need to use this class directly: it is used by the DTS::Application module and, if you're using this class there is nothing to worry about authentication.
EXPORT
Nothing.
METHODS
DTS::Credential
does not inherients from any superclass. This means that the methods available in DTS are not available.
new
This method creates a new DTS::Credential
object. A hash reference must be passed as a parameter (see SYNOPSIS for examples).
Depending on the authentication method, user
and password
are necessary or not. The Trusted Connection does not need such values, but the new
method will abort with an error if you pass no keys with the necessary values.
A DTS::Credential
object will have the following attributes:
server
user
password
auth_code
auth_code
is defined by the DTS Application object documentation to be defined as explained below:
Constant DTSSQLStgFlag_Default = 0
Constant DTSSQLStgFlag_UseTrustedConnection = 256
to_list
Returns all attributes of the object in a ordered list. This will be used during method invoking to authenticate the request against the MS SQL Server. The list is returned in this order:
SEE ALSO
Win32::OLE at
perldoc
.MSDN on Microsoft website and MS SQL Server 2000 Books Online are a reference about using DTS' object hierarchy. You will need to convert examples written in VBScript to Perl code.
AUTHOR
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Alceu Rodrigues de Freitas Junior
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.