SQL*Plus editor in 10g - oracle

I have installed Oracle 10g on my machine but not able to run ed for edit option error:
SP2-0110: Cannot create save file "afiedt.buf"
Please, help me out to solve this. I have already tried so many options for fix it.

Check the file path where you are trying to save, check if the folder structure exists and you have write permission

Related

Docker: Oracle database 18.4.0 XE wants to configure a new database on startup

I'm trying to configure an Oracle Database container. My problem is whenever I'm trying to restart the container, the startup script wants to configure a new database and failing to do so, because there already is a database configured on the specified volume.
What can I do let the container know that I'd like to use my existing database?
The start script is the stock one that I downloaded from the Oracle GitHub:
Link
UPDATE: So apparently, the problem arises when /etc/init.d/oracle-xe-18c start returns that no database has been configured, which triggers the startup script to try and configure one.
UPDATE 2: I tried creating the db without any environment variables passed and after restarting the container, the database is up and running. This is an annoying workaround, but this is the one that seems to work. If you have other ideas, please let me know
I think that you should connect to the linux image with:
docker exec -ti containerid bash
Once there you should check manually for the following:
if $ORACLE_BASE/oradata/$ORACLE_SID exists as it does the script and if $ORACLE_BASE/admin/$ORACLE_SID/adump does not.
Another thing that you should execute manually is
/etc/init.d/oracle-xe-18c start | grep -qc "Oracle Database is not configured
UPDATE AFTER COMMENT=====
I don't have the script but you should run it with bash -x to see what is the script looking for in order to debug what's going on
What makes no sense is that you are saying that $ORACLE_BASE/admin/$ORACLE_SID/adump does not exist but if the docker deployed and you have a database running, the first time the script run it should have created this.
I think I understand the source of the problem from start to finish.
The thing I overlooked in the documentation is that the Express Edition of Oracle Database does not support a SID/PBD other than the default. However, the configuration script (seemingly /etc/init.d/oracle-xe-18c, but not surly) was only partially made with this fact in mind. Which means that if I set the ORACLE_SID and/or ORACLE_PWD environmental variables when installing, the database will be up and running, with 2 suspicious errors, when trying to copy 2 files.
mv: cannot stat '/opt/oracle/product/18c/dbhomeXE/dbs/spfileROPIDB.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/18c/dbhomeXE/dbs/orapwROPIDB': No such file or directory
When stopping and restarting the docker container, I'll get an error message, because the configuration script created folder/file names according to those variables, however, the docker image is built in a way that only supports the default names, causing it to try and reconfigure a new database, but seeing that one already exists.
I hope it makes sense.

How to excute java file from remote desktop(mstsc)

I logged into my remote desktop location from cmd by mstsc command. Made some changes in java file and saved it. But I am not sure how can I execute the java file from remote location. Can someone help me out.
Thanks and Regards,
Sm.Aslam.
I assume that you mean an uncompiled .java file. In that case, it is as easy as typing the following in Command Prompt:
javac file.java
Note that this requires Java to be installed on the remote computer. If this is not the case, you will have to install it.
Regards,
Gabe

ERROR: could not open file for reading: Permission denied. SQL state: 42501

I am trying to copy an existing CSV file in a SQL table in pgAdmin4 1.5.
I am running the following query to copy the data from the CSV file:
COPY console_games FROM '/users/user1/Desktop/ConsoleGames.csv' DELIMITER ',' CSV HEADER;
And I get this result:
********** Error **********
ERROR: could not open file "/Users/user1/Desktop/ConsoleGames.csv" for reading: Permission denied
SQL state: 42501
I have changed the permissions of this file for all users to be read and write, but I still get the error.
I faced the same problem and here is how I solved
On Mac-
Open 'System Preferences'
Select 'Security and Privacy' option
Select 'Full Disk Access' from the list
Give access to PgAdmin AND postgres
Then, close and reopen your pgadmin
Use PgAdmin4's bulk-load features to import the CSV. This will do a COPY ... FROM STDIN behind the scenes. PgAdmin4 will access the file with your user's permissions, not those of the postgres server like a direct COPY from file will.
I solved this problem by creating a folder named Database in the PostgreSQL bin where I save all the data files that I want to work on. I use pgAdmin4 on both Mac and Windows. Whereas it is rather straightforward to find the bin on Windows, it is a bit tricky to find it on Mac because the Library where the bin is kept is hidden. Try to save your files on C:\ProgramFiles\PostgreSQL\10\bin\Database if you are using Windows and /Library/PostgreSQL/10/bin/Database/if you are using Mac. The Library can be found by pressing command+shift+g and type ~/Library on the go to folder. Your Mac will require your password to make changes in the Library. After saving your data files here, your code on pgAdmin4 should be like this:
COPY console_games FROM 'C:\ProgramFiles\PostgreSQL\10\bin\Database\ConsoleGames.csv' DELIMITER ',' CSV HEADER;
or
COPY console_games FROM '/Library/PostgreSQL/10/bin/Database/ConsoleGames.csv' DELIMITER ',' CSV HEADER;
On a Mac
Close PGAdmin
Open 'System Preferences'
Select 'Security and Privacy' option
Select 'Privacy'
Select 'Files and folders' from the list
Grant PgAdmin access for Documents-folder
Reopen PGAdmin

Error querying Oracle database from CGI Perl script

I have a CGI Perl script that will run a select statement from a Oracle Database to get records. This scripts runs on Apache with cgi-bin linked. It was running fine.
Due to failover we moved the hard disk to the backup server with similar setups. When we run the script however, the following error is shown:
install_driver(Oracle) failed: Can't load '/u02/system/perl/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /u02/system/perl/usr/lib64/perl5/DynaLoader.pm line 200.
I had checked my ORACLE_HOME and LD_LIBRARY_PATH variables and they both pointing to the correct oracle client. Also try locate libclntsh.so.11.1 and managed to find the file in the correct directory, with permission granted.
Also added a oracle.conf file that has the path to oracle lib directory in /etc/ld.so.conf.d
All these and still it's showing the same error. Am running out of ideas....
Any pointers or suggestion are appreciated. Thank you.
You've covered the basics already which is good: make sure the libraries exist, make sure your program has read/execute permissions, and setting environment variables for ORACLE_HOME and LD_LIBRARY_PATH.
You many need to check the dependencies recursively.
ldd /u02/system/perl/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so
should show you any dependencies of the .so that can't be loaded. DBD::Oracle is also version sensitive to the Oracle client. If the version or location of the Oracle client has changed (or when all else fails), you may need to recompile DBD::Oracle.

[Microsoft][ODBC Visual FoxPro Driver]Cannot open file C:\users\aleer\locals\locals~1\temp\6uu0004.tmp?

Okay I checked this out and C:\users\aleer\locals\locals~1\temp\6uu0004.tmp is actually point to C:\Users\aleer\Local Settings\temp where the 6uu0004.tmp file does not even exist.
I guess it's possible that this file is being created and then it disappears once I get to the command prompt.
I'm not sure what the problem is...
Discovered the directory the temp file was being created in wasn't owned by my user. Changed the owner of the directory and now it works.

Resources