jaja714 Posted March 15, 2021 Share Posted March 15, 2021 (edited) My team is tired of typing the same queries over and over again in SQL developer with slight variations in select clauses. I see some posts regarding MS-SQL but I'm not sure if that will work with Oracle DBs. I'd like to start simple with a script that connects to a service name using hard-coded credentials and perform a simple query and consolewrite them. Eventually, I'll put in a true GUI where service names are in a drop down, credentials are collected and a few parameters for the queries and the output is dumped to CSV or something. Can someone point me in the right direction? Edited March 15, 2021 by jaja714 Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted March 15, 2021 Share Posted March 15, 2021 @jaja714 Just an overview of what you can do with ADO and AutoIt Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
jaja714 Posted March 15, 2021 Author Share Posted March 15, 2021 ooohh ... no Oracle Examples! Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted March 15, 2021 Share Posted March 15, 2021 @jaja714Just look for them Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
jaja714 Posted March 15, 2021 Author Share Posted March 15, 2021 This should hold me over for a while ... Thanks! Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted March 15, 2021 Share Posted March 15, 2021 (edited) @jaja714 If you have any problem, don't be afraid to post a runnable script, so we can assist you more Good luck!EDIT: In fact, there are no examples with Oracle DB in the ADO Wiki section Edited March 15, 2021 by FrancescoDiMuro jaja714 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
jaja714 Posted March 15, 2021 Author Share Posted March 15, 2021 I'm getting COM errors probably because I'm not creating the connecting string right. How do I get the connection string correct from, say, right-clicking on connection properties in SQL Developer? I tried: .ConnectionString ="Provider={right-click-properties};Data Source=DVA;User Id={myUserName};Password={myPassWord};" .ConnectionString ="Server={right-click-properties};User Id={myUserName};Password={myPassWord};" Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted March 15, 2021 Share Posted March 15, 2021 @jaja714 I've never used OracleDB, so I can't say what is wrong there but, have you checked this? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Earthshine Posted March 15, 2021 Share Posted March 15, 2021 see this website. Oracle connection strings - ConnectionStrings.com it always worked for me TheXman 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
jaja714 Posted March 15, 2021 Author Share Posted March 15, 2021 I don't see any AutoIT code there or examples. As far as I'm concerned, any of those could work. I'm just not in the mood to try them all with different flavors of case sensitivity and which quotes to use. I tried this and it didn't work. .ConnectionString ="Data Source=myDB.com;User Id=myUsername;Password=myPassword;Integrated Security=no;" Link to comment Share on other sites More sharing options...
Earthshine Posted March 15, 2021 Share Posted March 15, 2021 (edited) First get one that works. Then learn how to construct the string programmatically i can’t be arsed to do it for you just because you don’t feel like doing development. You need to learn and nobody has your Oracle instance installed either Edited March 15, 2021 by Earthshine FrancescoDiMuro and TheXman 2 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted March 15, 2021 Share Posted March 15, 2021 @Earthshine Nice profile picture Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Nine Posted March 15, 2021 Share Posted March 15, 2021 18 minutes ago, FrancescoDiMuro said: Nice profile picture He looks afraid of something FrancescoDiMuro 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Earthshine Posted March 15, 2021 Share Posted March 15, 2021 (edited) 54 minutes ago, FrancescoDiMuro said: @Earthshine Nice profile picture Thanks. My son’s first dog. He took that picture years ago with his phone. He was a great little cockapoo. Edited March 15, 2021 by Earthshine FrancescoDiMuro 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted March 15, 2021 Share Posted March 15, 2021 (edited) That’s him begging nicely lol He was spoiled and once he even grabbed a sandwich out of my hands and ate the rest of it He was loved very much Edited March 15, 2021 by Earthshine FrancescoDiMuro 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
jaja714 Posted March 16, 2021 Author Share Posted March 16, 2021 (edited) 21 hours ago, Earthshine said: First get one that works. i can’t be arsed to do it for you just because you don’t feel like doing development. You need to learn That's what I'm asking for. I'm not an Oracle DBA. I'm just a developer who needs to query some databases. I don't know how the databases were constructed nor do I have access to the braintrust that created them. How do I translate SQL Developer Connection properties into valid connection strings? I've been down the trial and error road all day yesterday and I'm ready to learn the right way ... from a teacher. FYI: I tried many combinations, including: $service = 'mydbname.domain.com' $user = 'myusername' $pass = 'mypassword' .ConnectionString = 'Provider=OraOLEDB.Oracle;Data Source=' & $service & ';User Id=' & $user & ';Password=' & $pass & ';' .ConnectionString = 'Provider=msdaora;Data Source=' & $service & ';User Id=' & $user & ';Password=' & $pass & ';' .ConnectionString = 'Driver={Microsoft ODBC Driver for Oracle};ConnectString=' & $service & ';Uid=' & $user & ';Pwd=' & $pass & ';' .ConnectionString = 'Driver={Microsoft ODBC for Oracle};Server=' & $service & ';Uid=' & $user & ';Pwd=' & $pass & ';' I'm not sure why these are failing. Is it syntax? Edited March 16, 2021 by jaja714 Link to comment Share on other sites More sharing options...
Earthshine Posted March 16, 2021 Share Posted March 16, 2021 (edited) You and your team need to head on over to the people who created the database and get the correct drivers and clients There are no Microsoft SQL developer tools for Oracle that I am aware ofThere are no Microsoft SQL developer tools for Oracle that I am aware of Edited March 16, 2021 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
jaja714 Posted March 16, 2021 Author Share Posted March 16, 2021 So, the answer is no? One cannot derive connection strings from SQL Developer properties? Link to comment Share on other sites More sharing options...
jaja714 Posted March 16, 2021 Author Share Posted March 16, 2021 2 hours ago, Earthshine said: There are no Microsoft SQL developer tools for Oracle that I am aware ofThere are no Microsoft SQL developer tools for Oracle that I am aware of I am using Oracle SQL Developer. Link to comment Share on other sites More sharing options...
jaja714 Posted March 16, 2021 Author Share Posted March 16, 2021 What about %appdata%\SQL Developer\system\connections.xml? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now