Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 686

VBScript Connection oracle in sys

$
0
0
hello
I need to connect in sysdba on Oracle from Vbs. For retrieve the state of the database (Open mount ...) because the user system can not connect when the database is on mount.

I use this command to connect on my database when she is open

Code:

Set env = WshShell.Environment("PROCESS" )
computername = env("COMPUTERNAME" ) 
set cn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
                                                               
ConnectionString ="Provider=OraOLEDB.Oracle; Data Source=" & _
"(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="&computername&")(PORT=1521)))(CONNECT_DATA=(SID="&SERVICE &")(SERVER=DEDICATED)));" & _
"User Id=system;Password="&PASSWORD &";"

cn.Open connectionString

can you help me please ?

thanks

Galene

Viewing all articles
Browse latest Browse all 686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>