Store Procedure pegar o IP do computador. (GetIP)

Firebird

30/01/2008

Será que existe algum meio de montar uma Store Procedure que me devolva o IP da estação de trabalho que disparou a SP?


Weber

Weber

Curtidas 0

Respostas

Sremulador

Sremulador

30/01/2008

rdb$get_context(´SYSTEM´, ´CLIENT_ADDRESS´);


Providesread-onlyaccesstothefollowingvariables: •CLIENT_ADDRESS::Thewireprotocoladdressoftheremoteclient,representedasastring.The valueisanIPaddressinform´xxx.xxx.xxx.xxx´forTCPv4protocol;thelocalprocessIDfor XNETprotocol;andNULLforanyotherprotocol. •DB_NAME::Canonicalnameofthecurrentdatabase.Itiseitherthealiasname(ifconnectionvia filenamesisdisallowedDatabaseAccess=NONE)or,otherwise,thefullyexpandeddatabasefile name. •ISOLATION_LEVEL::Theisolationlevelofthecurrenttransaction.Thereturnedvaluewillbe oneof´READCOMMITTED´,´SNAPSHOT´,´CONSISTENCY´. •TRANSACTION_ID::ThenumericIDofthecurrenttransaction.Thereturnedvalueisthesame aswouldbereturnedbytheCURRENT_TRANSACTIONpseudo-variable. SESSION_ID::ThenumericIDofthecurrentsession.Thereturnedvalueisthesameaswouldbe returnedbytheCURRENT_CONNECTIONpseudo-variable. •CURRENT_USER::Thecurrentuser.Thereturnedvalueisthesameaswouldbereturnedbythe CURRENT_USERpseudo-variableorthepredefinedvariableUSER. •CURRENT_ROLE::Currentrolefortheconnection.ReturnsthesamevalueastheCUR- RENT_ROLEpseudo-variable.


:wink:


GOSTEI 0
POSTAR