I'm working on a university assignment where I am trying to work with PHP and Oracle 11g database. I've downloaded Oracle 11g in to my PC, and I'm actually accessing the databases I made at university I am also able to use the service name, hostname and SID set by my university.
However, what I'm slightly puzzled by is how can I work with Oracle database and PHP? I have XAMP installed in my PC which enables me to work with MySQL and PHP, but was wondering If I can also use this with oracle.
Thanks
Try the underground PHP and Oracle manual here
http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html
From the "Who should read this book" section
This book is designed to bridge the gap between the many PHP and the
many Oracle texts available. It shows how to use the PHP scripting
language with the Oracle database, from installation to using them
efficiently.
The installation and database discussion in this book highlights the
Oracle Database 10g Express Edition, but everything covered in this
book also applies to the other editions of the Oracle database,
including Oracle Database 11g. The PHP you write for Oracle Database
10g Express Edition can be run, without change, against all editions
of the Oracle database as well.
The book contains much unique material on PHP's Oracle OCI8 and
PDO_OCI extensions. It also incorporates several updated installation
guides previously published on the Oracle Technology Network web site.
There is also an tutorial of connecting PHP with Oracle here http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/oow10/php_db/php_db.htm
and some further tutorials in the Oracle+PHP cookbook here
http://www.oracle.com/technetwork/articles/index-091900.html
Related
I'm trying use Microsoft SSMA for Oracle to migrate a database onto Azure SQL, but I can't get it going. I've double checked the server name, server port, Oracle SID, password... everything. No matter the type of entry screen I use, I can't get it to connect to the on-premise Oracle instance.
I'm pretty sure the login information is all correct, and I should have a working connector to Oracle since I connect to it from TOAD on a daily basis. I tried installing Oracle libraries per previous posts but not sure if I did it successfully because the issues still remains.
What are the troubleshooting steps I should take in order to make this work?
Log in screen:
Error 1:
Unable to find specified provider.
Compatible Oracle Data Access Connectivity libraries were not found on the machine. You can install them from Oracle product media or download it from Oracle web site.
Error 2:
Connection to Oracle failed.
ORA-01017: invalid username/password; logon denied
Error 3:
Connection to Oracle failed.
Network Naming: No LDAP server detected or configured
After a few more days of debugging, I was finally able to get SSMA to work. This answer helps to document my solution for personal use, as well as hopefully answer anyone else's question in the future.
After looking at the list of prerequisites to have SSMA running, I saw that I needed to have a correct Oracle client running. After some internal discussion, it was likely that the Oracle client SSMA needed was different than the one my computer already had for TOAD. The .Net provider for the TOAD connectors was probably not useful for SSMA.
We run Oracle 11g but I had to install Oracle 12c because 11g did not support Windows 10 apparently. Not too much of a roadblock here.
I found this guide to install Oracle client 12c pretty helpful. Shoutout to my alma mater.
Unfortunately the installer kept freezer, but using this former post, I was able to bypass it with the windows command:
setup.exe -ignoreprereq -J"-Doracle.install.client.validate.clientSupportedOSCheck=false"
After that, I saw different error messages when trying to connect SSMA. I kept trying different options with my logins until it worked. Provider: OLEDB Provider, Mode: Standard.
After being granted the appropriate permissions, I was finally able to access our internal tables and objects.
It was a pretty annoying question with a lot of rabbit holes along the way, but it was definitely worth it, being able to translate all our Oracle schemas to Azure SQL with a few clicks. Hope this helps!
Make sure to validate all steps mentioned below before going to install Microsoft SQL Server Migration Assistant for Oracle.
Make sure you have already installed SQL Server instance that will host the migrated database. Also keep in mind that you are not installing SQL Server Express edition to host the migrated database.
You must have sysadmin account to install SQL Server Migration Assistant for Oracle.
Make sure to install SSMA for Oracle on the server that will host newly migrated database on SQL Server.
It is recommended to install Oracle client software on your target system where SQL Server Instance is running.
Make sure your windows server has Microsoft Windows Installer 3.1 or a later version. Port 1434 should be open.
For more details, You can reference: How to Install SSMA for Oracle to Migrate Oracle Database to SQL Server.
Here's the Azure Database Migration Guide: Migrate Oracle to Azure SQL Database. As you prepare for migrating to the cloud, verify that your source environment is supported and that you have addressed any prerequisites. This will help to ensure an efficient and successful migration.
Connect to Oracle with Oracle Client Provider.
Azure also has other way can help you migrate Oracle database to Azure SQL database, such as with Azure Data Factory. If you still has the connect error. I think you can try to use it. Please reference this tutorial: Copy data from and to Oracle by using Azure Data Factory.
Hope this helps.
I've spent 2 days to sync postgresql database to oracle. Read few books, googled many times..
1. I have setup PostgreSQL on CentOS 6.5 (A) also installed oracle database on this VPS. copied GoldenGate to it.
2. I have already setup 2 oracle VPS using Goldengate and setup as Source (B) and Target (C). I'm trying to sync PostgreSQL to Target VPS.
3. GoldenGate runs on A server without error.
The problem is when I setting up it requires ODBC config (page 14). I'm new to PostgreSQL so little confusing for this..
Also when I google i find only to postgresql from oracle.
Main doc I'm following is http://docs.oracle.com/cd/E35209_01/doc.1121/e29642.pdf
Actually I have found Oracle Golden Gate new features https://blogs.oracle.com/dataintegration/resource/2013-DIFamily/OGG_WinUnix_Rel_Notes_11.2.1.0.7.pdf
Oracle Golden Gate don't support what I want to do.
They say:
Oracle GoldenGate introduces support for PostgreSQL. This support includes the mapping, manipulation,
filtering, and delivery of data from other types of databases to a PostgreSQL database. Oracle GoldenGate
does not support the capture of data from PostgreSQL to other PostgreSQL databases or to other kinds of
databases.
GoldenGate does not support Postgres as a source - only target.
Check out Attunity for what you are trying to do.
Postgres support was only for delivery in Oracle GoldenGate 12.2. Oracle is working on a full capture/delivery support for Postgres. It will be out in a later release post 19c. Please check the OTN website for versions.
My work uses Oracle 10G and is planning on installing Apex. In the meantime, I have downloaded Oracle XE and have taught myself APEX on it; however, I can only access users/tablespaces that I have made in the XE database. What I would like to do is use the XE's Apex to access the users/tablespaces in the production databases of my work.
My colleague says that this should be possible because my workstation is connected to the server, and that there should be a way to configure access from my XE's Apex to the 10g's databases, such as by setting up an appropriate DAD.
I see nothing in the Apex user interface to allow this. I've read every word of the Apex documentation but nothing registered.
XE uses the embedded PL/SQL gateway, as opposed to 10/11G which uses either an Apex Listener or an HTTP Server with the mod_plsql plugin.
Thank you,
Matthew Moisen
I have done this before where we didn't have access to the actual database hosting the data to be worked with save for the standard port 1521 listener access. Apex at the time was new enough to the organization that the DBA's also had a voodoo taboo on using their database server as a webserver gateway as well. You can use your database instance with APEX installed as a "middle tier" or app server with the following steps:
Set up an account on your 10g database that is accessible remotely via dblink.
Set up dblinks to your 10g database table on your workstation with XE installed, use the account and connection information for the 10g database as set up in (1). Note, you may have to update a TNS names file or explicitly indicate your host/networking settings within the dblink itself.
For simple sanity and simplicity in coding your apex projects, set up synonyms for all your dblinked objects (i.e., table1 for table1#dblink) so you're not referencing the dblinks directly in your apex code. Making changes later will be easier if you adhere to this.
That's it. One proviso is that you need to know that LOBs will not work with the out-of-the-box functionality of APEX driven DML operations while using dblinks. This may have changed with the newest version. One workaround you may consider is trying to use a stored procedure which passes your LOB data as a input parameter which will do your DML operation for you.
Otherwise, this approach works nicely. The place where I implemented this model has several production level apps, a test and a development tier all using servers hosting APEX separately from the actual data sources. We used Oracle Standard Edition One (for the support), but Oracle XE should work as well since APEX is the platform in common between either Oracle version.
Does the SQL syntax differ in any way for SQL Plus and apex.oracle.com
From this article I can assume that it doesn't, but I want to be sure. Is SQL Plus only an environment that is able to connect to an Oracle server ?
I'm asking this because I just started learning Oracle's SQL syntax and I don't have access to my faculty's server from home. The only solution I found so far is Apex since I'm not planning to install a server on my laptop.
Is SQL Plus only an environment that
is able to connect to an Oracle server?
Yes, SQL*Plus is not very useful unless you can connect to an Oracle database server.
I'm asking this because I just started
learning Oracle's SQL syntax and I
don't have access to my faculty's
server from home. The only solution I
found so far is Apex since I'm not
planning to install a server on my
laptop.
If you cannot connect to your faculty's database server from home, you have no choice but to install your own server somewhere. Apex only runs on an Oracle database server.
However, it's not too difficult nowadays, as long as you follow the installation instructions carefully.
Another option is to get a free account at apex.oracle.com. You'll be able to use Apex's SQL interface. I don't think you can connect to it using SQL Developer, though.
Alternatively, you can start up a simple pre-prepared Apex instance on Amazon's EC2. With this option, if you open the relevant port (1521) you'll be able to connect to it using SQL Developer.
The SQL commands are identical. They are all passed directly to the database engine for execution.
SQL*Plus has a bunch of extra commands (mostly for formatting output, but also stuff like dealing with variables and database startup/shutdown).
[Very old versions of SQL*Plus from the Oracle 7 era don't recognize the MERGE command as SQL and would refuse to do anything with it. But I'd hope those versions are all dead and buried by now.]
SQLPlus commands are to manage the SQLPLus environment and have really nothing to do with SQL. They are mostly for formatting output or taking in data that is used with SQL to send to the server.
SQLPlus is a proprietary Oracle product for connecting to Oracle server and issuiung commands. It is being replaced (officially) by SQL Developer.
I strongly suggest you download the free SQL Developer program from oracle:
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
it's a great tool for working with sql, pretty easy to get started (install, create a new db connection and start typing sql_ plus does fill in for columns once it know the tablenames.
Also, it can run most sqlplus commands if you want to format output, etc.
A nice visual intro to the oracle schema and useful if you want to write plsql.
I just want to know whether Oracle forms 11g supports other databases like DB2, SQL Server etc.
Also does Oracle forms 11g supports Oracle database 9i or 10g apart from 11g?
According to the Oracle middleware certification spreadsheet (once you have opened the spreadsheet, click "Current System (Server and Client) Certification" and then search for Oracle Forms) you will see that Oracle Forms is certified against the following database versions:
Oracle 10.2.0.4+
Oracle 11.1.0.7+
Oracle 11.2.0.1+
Oracle Forms may work with earlier versions than what have been listed but if you run into problems you won't be able to get support from Oracle.
Oracle Forms 11g can be used against non-oracle datasources. To get started look in the Forms help, Google, and the Oracle Forms forum on OTN for transactional triggers.
However my personal opinion is whilst Oracle Forms is a great tool with Oracle Database you should seriously think about whether it is the right tool for working with other datasources.