Bonjour,
je voudrais executer des commandes sqlplus du genre startup, shutdown ... par vb.net, j'ai essayé de passer par oracle.dataaccess en utilisant le code :
ce code me retourne une exeption :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 oradb = "Data Source=(DESCRIPTION=(ADDRESS_LIST=" _ & "(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))" _ & "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));" _ & "User Id=application_orcl;Password=pass;DBA Privilege=SYSDBA;" Dim conn As New OracleConnection(oradb) Dim cmd As New OracleCommand cmd.Connection = conn cmd.CommandText = "startup" cmd.CommandType = CommandType.Text Try cmd.ExecuteNonQuery() MsgBox("startup ok") Catch ex As Exception MsgBox(ex.message) End Trydans la mesure ou ce code marche si on utilise dans cmd.commandText une requette sql, et que l'utilisateur application_orcl dispose du privilege sysdba,ORA-00900 invalid sql statement
j'en arrive a constater que j'ai loupé une configuration quelquepart...
je vous remercie d'avance pour votre aide.
Partager