Oracle moving / transferring schemas from one server to another - oracle

I am having to move databases from one server to another.
Oracle on Server A has died so I can't back up the existing databases in order to move them across.
I was wondering if there is another way to move databases across servers in Oracle.

There is a way of coping some data and control files and installing them in a new server.
See: User-Managed Backup and Recovery Guide
http://download.oracle.com/docs/cd/B10501_01/server.920/a96572/toc.htm
( but look for the correct version of your database)
For example something like:
% cp /disk1/oracle/dbs/*.dbf /disk2/backup
% cp /disk1/oracle/dbs/*.cf /disk2/backup
% cp /disk1/oracle/network/admin/*.ora /disk2/backup
% cp /disk1/oracle/rdbms/admin/*.ora /disk2/backup

If the old database shut down relatively cleanly you should be able to just copy the db files over to the new host. "db files" includes datafiles, tempfiles, control files, and online redo logs (off the top of my head). If you can make the directory structures on the new host the same as the old ones, you should then just be able to source the correct environment (including ORACLE_SID) and then issue a startup from SQL*Plus. You use the phrase "Oracle service" in your answer to my question, so I'm guessing you are on Windows - I don't know how you go about re-registering it as a Windows service.

If the servers are the same os then yes. You can create the same directory structure on the new server as the old. Install the oracle software and patch it to the same version as on the old window server. Copy all the datafiles, control files, spfile , etc to their respective location on the new server. Using the account you install oracle which has administrator privelege and belonging to the dba group, run oradim to add the service to windows to start oracle, point it to the spfile of your database.
ORADIMxx -NEW -SID -INTPWD -STARTMODE
-PFILE
or with newer database version:
ORADIM -NEW -SID | -ASMSID [-SYSPWD password]
[-STARTMODE auto | manual] [-SRVCSTART system | demand]
[-PFILE filename | -SPFILE]

Related

Oracle ODAC 18.3 for Windows Server 2019 Installation Errors

I am trying to install Oracle ODAC 18.3 on a Windows Server 2019 Standard so that I can create a data source connection to an Oracle database from a SQL Server 2019 instance, either by using Polybase or a Linked Server connection. The only components that I need installed are the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP. During the Perform Prerequisite Checks stage of the install, there are errors.
The errors are as follows:
PRVG-1901 : failed to setup CVU remote execution framework directory "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ on nodes ""
Please select a different work area for the framework
[hostname] : PRKN-1014 : Failed to execute remote command "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\\exectask.exe" on node "[hostname]". Failed during connecting to service
[hostname] : Failed during connecting to service
Notes regarding error message above. [username] refers to my username that I am logging in with to Windows. It is an Active Directory account. [hostname] refers to the computer name that I am trying to install ODAC on. Also, I have tried installing this a few different times, all with the same error messages. On the second and third time installing I verified that during the installation the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory is getting created, so this should not be a permissions issue.
In the PRKN-1014 error message, I did notice that there is an extra backslash in the path, CVU_18.0.0.0.0_\[username]\\exectask.exe, so my suspicion is that there is an issue with the installer not being able to identify the correct path to find the exectask.exe. If I traverse to the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory I indeed find the exectask.exe file.
I have found a few different solutions online for others that worked for them, but none have worked for me. One solution was to add in the System Environment Variables the _JAVA_OPTIONS variable with a value of -Xmx512M. A second solution was to change the Environment Variables user variables TEMP and TMP to C:\TEMP. Neither of these worked and resulted in the exact same errors. I did in fact confirm that the Oracle Universal Installer extracted the files to the C:\TEMP directory.
Any and all suggestions would be very much appreciated!
I wasn't able to get the Oracle "Universal" Installer to work, like you. However, I was able to install the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP (same as you were trying to get) using the ODAC Xcopy installer.
I downloaded the ODAC Xcopy installer from here:
https://www.oracle.com/database/technologies/dotnet-odacdeploy-downloads.html
After downloading the installer, I ran the install batch file to install those two components. An extra undocumented step is that you must update the PATH environment variable on your system to include your install location and bin folder. In my case, "C:\Oracle" and "C:\Oracle\Bin".

SQLPlus - Data Pump (expdp and impdp)

some time ago, I installed Oracle SQLPlus without full Oracle database package.
Now I need expdp and impdp utility. Is it possible to copy important files from a full Oracle installation and pasting them into SQLPlus directory?
Or maybe is there any other option to install only expdp and impdp? (Windows)
Regards,
Kamil
Not really.
But, you don't have to actually 'Install' the full client.
Our latest distribution includes an Instant Client with sql*loader and data pump utilities.
Grab this one
Instant Client Package - Tools: Includes Data Pump, SQLLoader and Workload Replay Client*
There's no installer. Just unzip it, and add the directory to your PATH. You should be good to go then.
I wouldn't dump the files into your existing directory where you have SQLPlus though, just put it in a fresh directory and use that instead of your old one.

Installer installing on two machines

I need to create one installer which will install components on two different machines.Windows services and web services on "APP Server" and database part on "DB Server". SQL Server 2005/2008 will be already present on DB SERVER. But it may use different port than default port for sql server.
What things I will require in order to implement this ?
Thanks in advance.
It is simply a matter of bundling a SQL script with the installer and executing the script by calling sqlcmd with ExecWait.
We can run a script using a trusted connection via:
sqlcmd -S _SERVER\_INSTANCE_ -d _DBNAME_ -i _SCRIPT_FILE_
Or with a SQL Login:
sqlcmd -S _SERVER\_INSTANCE_ -d _DBNAME_ -U _USERNAME_ -P _PASSWORD_ -i _SCRIPT_FILE_
For performing actions on remote SQL Server engine native driver is required.In SQL Server 2005 or later the command line client is called sqlcmd.
I suggest to create 2 radio buttons:
(o) Install - App Server
( ) Install - DB Server
User select one item and appropriate components will be installed. (like .dlls, .exes, ... on app server and data files or sql scripts [also scripts can be executed] on db server).
Everything packed into single installer.
Also there should be some custom page(s) (created using nsDialogs) where user can set parameters(port, server name, name of db, path to db, ...)

ora-12154 could not resolve... with oracle instant client

Here are the details:
I installed the oracle instant client 11.2.0.2.0 from the OTN download page on a windows 7 64 bit vm (vmware).
I am trying to to connect to a remote oracle database, and I can successfully connect with one program using TNS, but not with SQL*Plus and other applications.
Trying to connect with SQL*Plus, using schema#servicename, password, etc, gives the above error.
To connect via SQL Developer, normally I would use the basic connection info and not rely on tnsnames, but trying a normal connection gives me: io error: unknown host specified. SQL Developer can successfully connect and query database if i use the TNS protocol.
Trying from other programs gives me the same error I got with SQL*Plus. Same when trying with the service name from tnsnames.
This is obviously quite frustrating for it to work one way and not the other. I followed all the normal instructions for using the instant client, the directory with instantclient has been addded to the PATH, a TNS_ADMIN entry has also been created, with the directory to the tnsnames.ora file
Well, on a whim, I went to changing everything in my setup to match an windows 2003 server that i had setup with instant client before. The main changes were putting the instant client in a folder at the root of the drive (not program files/oracle/etc), but c:/oracle, i know ive seen other posts saying that oracle was particular about characters in the directory path, maybe spaces are a no-no too?
I also add a bunch more environmental variables, anythign that was on the other machine, ORACLE_HOME (to root of instance), SQL_PATH (same), and added the root of the directory to the PATH system variable, not just the folder with the instantclient files. Anyways, I'm happy its working, anyone one of these changes could have been it though-
You may use ProcessMonitor and look at what your sqlplus process is doing. In my case TNS_ADMIN was correctly defined but, by mistake, my tnsnames.ora and sqlnet.ora had a stupid ".txt" extension, added by default by notepad when I created those files. And because "Windows Explorer" has the "Hide extensions for known file types" option set by default, the naming error wasn't obvious at all.
I installed the 12.1 instant client. For me, the problem was solved by creating \network\admin\tnsnames.ora file. Here's the PowerShell I used:
$source = "C:\Users\USER1\Desktop\tnsnames.ora"
$target = "C:\oracle\product\12.1.0\client_1\network\admin"
mkdir $target
copy-item $source $target

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error:
could not start OracleOraHome92TNSListener
when i got to services and try to start it, it says that the file doesnt exist. the service file is C:\oracle\ora92\BIN\TNSLSNR (TNSLSNR is a file not a directory)
C:\oracle\ora92\BIN\TNSLSNR doesn't exist on my machine at all. do you know how to get it?
Could not start the Oracle Ora92 Listener service on Local Computer.Error 2: The system cannot find the file specified
Here's a couple of issues I see. You say you installed 10g but the error is a 9.2 error. It could be that your computer already had an Oracle 9i on it that was mis-configured or uninstalled and that is leading to the error.
You need to check your disk and find the ORACLE_HOME (directory) where Oracle 10g was installed. Once you find that you can adjust the PATH and ORACLE_HOME and TNS_ADMIN environment variables to point to the right place. This should allow you to start the database and the listener.
If you need to install the Oracle Client for 10g then this information below will be helpful as well.
The Oracle client can be installed separately. Just go to this address, download the client and unzip it into a subdirectory and then run the Oracle Universal Installer by running setup.exe from the directory.
Oracle Downloads Page

Resources