Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
Is there any way I can get the server name from the database handle itself without doing "SELECT @@SERVERNAME" on the handle?

I'm working with MS SQL Server 2005.

Thanks,
Nikhil

Replies are listed 'Best First'.
Re: Get server name from database handle
by Anonymous Monk on Jul 13, 2009 at 11:38 UTC
    use DBI::Const::GetInfoType ; print $dbh->get_info( $GetInfoType{SQL_SERVER_NAME} );
      Thanks :-)