Configure Oracle 19c to manually start up - oracle

I installed Windows 10 on my Lenovo T540p laptop. Nothing special of course. I work as a developer, so I also installed Visual Studio 2019, SQL Server 2019 and Oracle 19 c.
Now, most of my work is done on SQL Server, but I do have 1 or 2 clients which use Oracle, requiring me to have a working Oracle instance on my machine.
But... I only need it like 10% of the time, so ideally I would like to configure the Oracle services so I can manually start them when I need it.
Been playing around with this in the past, but it appears simply putting the services on manual isn't enough.
Googling this question gave me a couple of ideas on how to manually start up a db, but besides 1 question here I didn't actually found anything (even partialy) usable. Anyone here who can tell me how to best pull this off?

Related

Is there an editor out there that allows me to test PL/SQL scripts without a connection?

I work at a facility that does not allow me access to a Oracle Database offsite. So I can't connect to the server through a Oracle client connection right now, because of COVID I'm forced to work from home.
I'm required right now to write a PL/SQL script that will update records across the entire database, however I don't know anything about setting up a test environment on my home computer so that I can run the script in a controlled environment to test it before I bring it back on site.
At one of my previous jobs, they had a PROD, PREPROD, and so forth copies of Oracle databases that one could run the script on before I sent it up the chain to production. The setup we're using doesn't have that, just the production database and thus we have the problem with our workflow that we have one shot to get it right.
So my question is, is there an editor out there for Oracle that will allow me to create a test database, so that I can run the script on that, see the results, edit it to make it work right, before I bring it back to work and run it on our production server? I'm opposed to installing a full Oracle database implementation on my own computer for licensing reasons and/or honestly I don't know what I'm doing setting up an Oracle server on my own (Tried it, couldn't even find documentation on it).
Oracle Express Edition (XE) is free so - no licensing reasons here.
If you want, you can download pre-configured Virtual Box machine which has the database already installed, along with SQL Developer GUI tool to access it so you're up and running in a matter of minutes.
Alternatively, create an account on https://apex.oracle.com/en/; it is also free, gives you certain quota (was 25MB, don't know how much is it now, possibly somewhat more than that) which is enough to try your queries.
Or, use https://dbfiddle.uk/
As you can see, there are various options; pick the one that suits you best.

error 3706 provider cannot be found. it may not be properly installed

All.
I have used a DLL approach explained on How to securely store Connection String details in VBA
This code is running very well on windows 10 64 bit and MS Office 64 bit. But same copy of the files i am not able to use on Wndows 8.1 Pro and MS Office 64 bit.
DLL generated is converted to host machnines environment by using
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\regasm c:\windows\syswow64\OraConnection.dll /tlb /codebase
But still same error i am facing. About environment variables care has been taken.
My Connection string is
"Provider=OraOLEDB.Oracle; Data Source = ; User ID =; Password=";
In the Succesfull machine i was using Release 12.2.0.1.0 for ODAC 12.2c Release 1 as oracle client.
But saw a latest version of the oracle client as 64-bit ODAC 12.2c Release 1 (12.2.0.1.0) for Windows x64 which was released on 1st June 2017.
Installed the same. And my error was resolved. When i observed system environment variables i saw few things added into it.
E:\app\client\Admin\product\12.2.0\client_1;E:\app\client\Admin\product\12.2.0\client_1\bin;C:\Users\Admin\Oracle\;
I dont know actually what they did. But error was resolved.
Can anybody throw highlight on this?
I'm not sure what the DLL buys you beyond simple obfuscation. All you're doing is making it a bit harder to get to but not actually protecting the privacy of it in any meaningful sense. My normal advice for management of connection strings is to simply don't save user/password. Instead, require the users to input the username/password at runtime and ensure that you have Persist Security Info=false in your OLEDB connection. That way, once it's opened, the full connection string is now inaccessible and there's no reference to a password. That's much more secure than sticking it in a variable in a DLL and crossing your fingers nobody knows how to read a memory dump or attach a debugger.
That said, that's not germane to your question, not able to the use the provider. First thing I'd do is to rule out whether the DLL is causing a problem that you didn't expect by removing it and using the provider directly. If it likewise fails, then you know the DLL has nothing to do with it and you need to work out with Oracle's provider documentation to get to the bottom of the issue.

Oracle ODAC(with ODT) + VS2012

I installed Oracle 12 ODAC(with ODT) on two computers.
I notice two things :
The program doesn't appear in the "Windows program list" mainly used to remove/modify installed applications (only 40MB for documentation). Bad stuff, but why not...
Visual Studio is not aware about the installation and when I want to add a database connection by Tools/Connect to Database...", the new Oracle providers is not showned. VS asks for at least an Oracle 7, none is registered ! Like before to install Oracle product :(
My needs are basic, I'm quite surprise the Oracle setup has a strange behavior and doesn't seem to be fully registered.
Any idea about a missing stuff ?
Thanks by advance all,
Nd.
PS : I need a rest tonight, I'll be back tomorrow :)
I remember vaguely struggeling with the same issue. I went back to download and install the Oracle ODP.NET. That provided a setup to handle Visual studio integration and works fine for me. (Currently using ODP11.2.320)

DAO 3.6 on Windows Server 2008

For historical reasons,we have some legacy vb6 server side code running on two identical Windows 2008 server boxes that uses dao 3.6 to get to the back end MS access databases. This has worked fine for years, and we are currently in the process of migrating all the code. However, one of the servers the code is running on is getting flakey, so we need to move the code to a new server as the migrated solution will not be ready for a while.
The server that works ok is running Windwos Server Web 2008 Sp1 64 bit. The new server is Windows Server Standard 2008 R2 Standard Sp1.
In running tests on this new server, we started getting random freezing in the application. There is a simple loop that runs a select query on every table in the database.After adding a bunch of logging, it was freezing on a call to the OpenRecordset method of the DAO.Database object. Sometimes it would freeze for a few seconds, other times up to 10 - 11 minutes and then carry on. The queries being run are of this format, and should all return 0 records :
SELECT * FROM BlahBlah WHERE WriteTime > #25 Oct 2012 10:09:43#
When run directly on the database (i.e. in Access), they return fine. It's not the same query that locks up each time either. I thought that it might be something specific to our software that I hadn't managed to track down until I found a very similar post here (unfortunately with no reply except mine!)
http://www.vbforums.com/showthread.php?653166-Using-Dao-3.6-on-Windows-server-2008&highlight=dao+3.6+server+2008
The only thing I have found so far is that the version of DAO360.dll on the server that it runs on is 3.60.9704, and the version on the server with problems is 3.60.9756 (i.e. a newer version of Dao). I did not install or register anything manually, but installed Access 97 and Access 2003 on the new server, the same as the old server. I should also point out that If i move the back end code as-is to the old server, then the tests work fine, so I'm pretty sure it is not the code.
Now I know that DAO is outdated and all that, but I'm stuck with this codebase until the migrated solution is available and thoroughly tested, so any thoughts of where to look would be very welcome indeed. In the meantime, I'm going to try and manually register the 3.60.9704 version on the new server and run more tests to see if that is the issue, but it would be kind of weird if it is...
Aha ! Although we are only using DAO, not full blown access, this seems to be the answer
http://social.technet.microsoft.com/Forums/en-US/officesetupdeployprevious/thread/2a34fc07-0a1e-4248-b866-2b1c60aabba2
When I looked a bit more into it, the server that the code is running on fine is Windows 2008 webserver, which, although it is 64 bit, is a completely different beast to the OS on the new machine which is Windows Server 2008 R2. Solution seems to be to go back to an older OS on the server, rather than re-writing the whole app, which is an easy thing to do for us.
Luckily, this only has to run for another few months or so, as the whole thing is being re-written.

Cognos 8.3 failing to connect to data source. Why?

I have installed Cognos BI 8.3 on my machine, which has a Windows 7 OS 64-bit. In IBM's supported environment list for Cognos 8.3, Windows 7 is not listed. On top of that, it says the product will only integrate with 32-bit 3rd party libraries. So, you can already see that I'm already starting on a bad foot. But anyways, this is the machine I have and that is the software I got, so I decided to see if they would work together..
I installed Oracle 10g Express database also in my machine and Apache 2.2 server. Up to there no problems.
Before moving further, I copied ojdbc14.jar to cognos/.../webapps/p2pd/WEB-INF/lib and added the Oracle database in Cognos Configuration. Tested, passed.
With the database started, the Apache server started, and Cognos started, I was successfully able to start Cognos Connection on the computer. So, it looks like the OS is not an issue.
(You can see everything I did by following the steps on this site, which since two days ago seems to be down but I'm thinking will eventually come back up)
Then I decided to try the samples, so I tried to create a data source connection from Cognos to the Oracle database. So, in the admin config console (i.e. Administer Cognos Contents > Configuration), I decided to create a new Oracle data source. I put the credentials, but BAM.. testing fails.
Fail Message:
QE-DEF-0285 The logon failed.
QE-DEF-0323 The DSN(ODBC)/ServiceName is invalid. Either the DSN is missing or the host is inaccessible.
RQP-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
testDateSourceConnection
UDA-SQL-0031 Unable to access the "testDataSourceConnection" database.
UDA-SQL-0532 Data Source is not accessible: "XE".
ORA-12154: TNS:could not resolve the connect identifier specified
RSV-SRV-0042 Trace back:
...
From what I have researched, it could be a number of things, but nothing seems to work. Here is what I tried:
Adding ODBC driver. Added the Oracle XE driver, even making sure it was done in the 32-bit ODBC manager (i.e. Windows\SysWOW64\odbcad32.exe). That didn't work.
Added ORACLE_HOME, LD_LIBRARY_PATH, and TNS_ADMIN to my environment variables.
tnsping'ed the XE database and it the ping returned ok.
There are no tnsnames.ora duplicates in the computer.
I tried and I am able to connect to the database via sqlplus. Did I mention that Cognos Config database test also passed?
Installed Oracle XE client. But didn't do much with it because the Oracle server is installed in the computer and also has a client component.
Has anyone come across this problem? I haven't been able to diagnose the problem or make even the slight progress for days. If you would like me to provide more information on any of the solutions I tried, please do ask. If you have a potential solution or, even better, if you have been able to solve this problem before, please let me know how!
Thanks!
One thing to keep in mind : certain portions of Cognos BI are implemented via Java and other portions are implemented via native C++ processes (the BI Bus processes)
Cognos connects to the content store database from the Java process using JDBC.
The BI Bus processes will connect to Oracle using a native oracle client.
So based on your description, I'd say that the problem area is in the native oracle client configuration (or the Cognos service's perspective of it).
You mentioned adding the ORACLE_HOME, LD_LIBRARY_PATH, and TNS_ADMIN environment variables in windows, and the fact that Oracle Utilities like SQLPlus and TNSPing are working for you.
When you added the environment variables, did you add them to the SYSTEM area for environment variables or the User area...?
If you're running Cognos as a service, its going to be a child process of SERVICES.EXE, which is run as system (this process is also not restarted unless you reboot the machine).
I'd try this :
make sure the above environment variables are defined for the SYSTEM user (in the system area, not the user area)
once you've done this, reboot the machine
See if you can create the database connection now.
If that doesn't work, I'd suggest doing a "run as" of SQLPlus or TNSPING as the SYSTEM user (and see if that works).
In order to use oracle as data source, you must install 32 bit client.
64 bit client will not work.
So if you installed oracle express 64 bit, and you don't want to uninstall it,
you can just install additional 32 bit client, and make sure to set it as your default home.

Resources