Remote client for oracle on linux - linux

I need to drop remote oracle db with *.sql script from linux env. How i can do that? Before I tried install sqlplus, but I could not install it...
There may be some other linux console client for oracle?

You cannot install sqlplus alone.
You need to install an Oracle client.
Choose you system here, click on See All, and the client is the second link.
After that you sould add an entry in your tnsnames.ora file (located in $ORACLE_HOME/network/admin) and if you have connection to your remote server, sqlplus will work.
PS: Drop a oracle db is a strange operation to do. You need a dba to administration stuff.

Related

Can't connect Excel to Oracle although I already installed the drivers. (Using Excel's PowerQuery)

I have been trying for a while now, to connect Excel to Oracle through PowerPivot, but unfortunately to no success.
I am currently getting this error: An error happened while reading data from the provider. 'Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.'.
I have so far done the following:
1. Installed Oracle Client x64
I installed Oracle Client x64 from https://www.oracle.com/database/technologies/112010-win64soft.html. I used file win64_11gR2_client.zip. In the installation proccess I went for the option InstantClient
2. Installed Oracle's ODBC Instant Client x64
I went to https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html and downloaded both instantclient-basic-windows.x64-19.6.0.0.0dbru.zip and instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip. I 'installed' them by unziping them in the same folder, and running odbc_install.
Then, I added the directory to my path environment variables and then created a new one called TNS_ADMIN and added the same directory.
3. Installed Oracle's ODBC Instant Client x32
Finally I did the same for the x32 files, but I did not add that directory to my environment variables.
I validated the correct installation by finding the drivers here:
x64 Drivers:
x32 Drivers:
Help in Troubleshooting
It is frustrating that besides the error message I can't find any way to troubleshoot this issue. Any ideas on what could it be? Any ideas on how to troubleshoot?
Thanks!
With 32 bit Oracle Instant client
Option 1 with ODBC drivers
Option 2 without ODBC drivers and ODAC client
Option 1: After installing 32 bit odbc drivers try to add only 32 bit instant client to path or if you add both clients to system path make sure 32 bit client is above 64 bit client
If the order is set correctly in system path you can verify from command prompt with where command
C:\WINDOWS\system32>where sqlplus
D:\instantclient_19_6_x86\sqlplus.exe
D:\instantclient_19_6_x64\sqlplus.exe
or with command path
C:\WINDOWS\system32>path
PATH=D:\instantclient_19_6_x86;D:\instantclient_19_6_x64;xxxxx
If set correctly You can connect via odbc File--->From Other Sources --> From ODBC
Option 2: Enables you to connect to database via ODAC Client without ODBC driversFile--->From Database --> From Oracle Database
Download ODAC 32 bit from Oracle ODP.NET_Managed_ODAC122cR1.zip.
Unzip the folder and from elevated command prompt install
D:\ODP.NET_Managed_ODAC122cR1>install_odpm.bat D:\instantclient_19_6_x86 x86 true
Here I set target directory to 32 bit instant client i.e D:\instantclient_19_6_x86
Edit: Add tns name entry in tnsnames.ora and tns_admin system variable
i,e TNS_ADMIN= D:\instantclient_19_6_x86\network\admin

How to start Oracle 11g automatically using script on Fedora 23?

I have installed Oracle 11g on my Fedora 23 Virtualbox ,each time I want to start Oracle I have to start
sqlplus '/as sysdba' then type startup and then exit and then type
lsnrctl start and then again type emctl start dbconsole ...how to automate this using a script or any alternative way but I prefer script once my server start ...I'm also not able to connect to my server from outside the virtual machine.
thanks in advance
The best way is to create a systemd .service unit file. I don't think there is an official one, but this oracle forum post contains an example for Fedora 25 Server. You can find more information about writing .service files here: https://unix.stackexchange.com/questions/15348/writing-basic-systemd-service-files

Sybase 15.7 on Red Hat Enterprise Linux Server release 6.4 (Santiago)

I am migrating to Red Hat from Solaris. Previously on Solaris, we connected to Sybase datasources through Java by passing an interfaces file location to a JDBC library. When I checked the Sybase documentation, they only list interfaces files as an option for UNIX and Windows... Does anyone know what the equivalent is for Linux?
I know our datasources have been transfered over, because when i connect with:
isql -S <server> -U <user> -P <password>
I can connect to the database. Unfortunately the team who installed the software on our new machines is unable to provide any details...
In summary, I know our datasource profiles are listed somewhere, because I can specify a server by name and connect. I need to find out where that information is.
The interfaces file on Linux works the same as on Unix. It should be in the root of the Sybase ASE installation.
Assuming you have the Sybase ASE environment sourced in your shell it should be:
$SYBASE/interfaces
The utilities to edit the file are dscp or dsedit,.
To run dsedit:
$SYBASE/$SYBASE_OCS/bin/dsedit
To run dscp:
$SYBASE/$SYBASE_OCS/bin/dscp

ISQL command result in: can't open lib 'odbcci.so' with unixODBC and Pervasive Client on Ubuntu Linux

I can't figure it out how to connect to a Pervasive DB on a Windows Server machine from an Ubuntu Linux 64bit via ODBC.
I installed unixodbc, then 32bit Pervasive Client 11sp2 from here and after moving the tar content to /usr/local/psql and executing the clientpreinstall.sh and the clientpostinstall.sh I did the dsnadd command, adding the dba source.
Now, if I try to test the ODBC connection with isql -v dba i get the following:
[ISQL]ERROR: Could not SQLConnect
[01000][unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib/odbcci.so' : file not found
odbcci.so exists in that dir.
What should I do to make it work?
This is a similar problem to the one in another question:
Pervasive ODBC on Linux Error [01000][unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib/odbcci.so' : file not found
The answer is that you need to either run as the user psql which was created by the Pervasive install script, or source the .bashrc from that user's home prior to attempting an ODBC connection.

How do I install XAMPP in a remote server?

I recently opened up a webserver in Amazon EC2. I managed to log in to the server using SSH with my mac. I also managed to install the EC2 API tool provided from Amazon. I have the XAMPP installation on my desktop. And I opened up a linux instance. I don't think I have a EBS(Elastic Block Store) mounted to the instance yet, I don't know how to do that. But How do copy the XAMPP installation file from my desktop to the server instance? Pls give me step-by-step instructions
I manage to solve my own question. I was using the scp protocol to transfer the XAMPP installation file. More info on this link: Secure Remote Logins and File Copying. This is the first time I used it, but you just type the command: scp -i ***.pem ec2-user#some_public_DNS /The/file/on/your/desktop. The file will then be transfer in a secure way to the remote server
I'm curious as to why you'd try to put XAMPP on an EC2 instance instead of simply using your system's package management system (e.g., yum, apt-get) to install what you need. This just seems like trying to hammer nails with the back of a screwdriver.

Resources