Oracle ODBC : Driver's SQLAllocHandle on SQL_HANDLE_ENV failed - oracle

I have message Oracle ODBC : Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
when try to open oracle connection in excel.
I'm working in virtual machine via citrix.
Could you please give tips why it is appear and how avoid problem ?

The problem appears to be a permission issue during the installation of both Oracle 9i and 10G.
If you navigate Oracle home you will find that the directory has different permissions then the root of the tree. In the case of 10G the path is C:Oracleproduct10.1.0Client_1. Open the properties for the Client_X directory, and you will see that "Authenticated Users" should have Read and Execute, List Folder Contents, and Read. To fix the problem, do the following....
-Select Authenticated Users
-Uncheck Read and Execute
-Press Apply
-Check Read and Execute
-Press Apply

One item that can cause this error is not having the ORACLE_HOME bin directory in your Windows OS path.
Open a command prompt and type either PATH or SET to see if the directory is included. Adjust as required.

Do the following to resolve the issue:
Select Administration Tools , Local Security Setting and Local Policy.
Then select "User Rights Assignment"
Double click on "Create Global Objects"
Select Add User or Group.
Make sure Object Types Group Box is checked.
Select Locations and highlight the name of the server you are working on (Not the Domain).
Enter "Remote Desktop Users" or "Everyone" (without the quotes) into the Object Names Box.
Select OK.
Add the same users to the group "Power User".
If this does not work, after step 8 a reboot may be required.

Related

Can't remove ACL entry that refers to orphaned SID

I’m (still) running Win-7 Home Premium. I understand the risks and, for a number of reasons, still DO NOT want to upgrade to Win-10 or to rebuild my win-7 installation to correct this problem. The system was built 8 years ago and, over the years, I have created and deleted numerous user accounts. I currently have three user accounts:
Administrator (SID 500)
AdminUser (SID 1003)
NormalUser (SID 1007)
Somewhere along the way, I deleted the original user account that Windows created during its original install which I believe was assigned SID 1000.
On the current system, things generally work as desired. But I occasionally encounter strange behavior and failures. During troubleshooting, I discovered that many folders retain ACL entries that refer to the now-orphaned SID 1000. For example, the command
icacls c:\ProgramData /save output.txt
produces the following
ProgramData
D:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;S-1-5-21-xxx-yyy-zzz-1000)
The above indicates that NT AUTHORITY\SYSTEM and BUILTIN\Administrators have Full Control permissions. It also lists the full SID for the now-orphaned 1000 user account. I'd like to remove these references to the bogus SID, but the command:
icacls C:\ProgramData /remove S-1-5-21-xxx-yyy-zzz-1000
does nothing when run from an elevated command prompt, reporting Successfully processed 0 files. When using File Manager, the Remove button is grayed-out on the Advanced Security Settings dialog of the Security tab of the Folder’s Properties. So I cannot remove the permission that way either.
How do I remove the reference to this orphaned SID? Or change it to refer to a legitimate SID?
Alternatively, how do I change the SID associated with the existing 1003 user to 1000 so that references to SID 1000 get properly resolved to an active user account?
Any suggestions would be appreciated.
No sooner did I post my question, than I found an answer:
Right-click a File Explorer shortcut pinned to my TaskBar
Select Run as Administrator
Browse to the desired Folder, right-click and select Properties
Select the Security Tab
Remove the undesired User
Not sure why I didn't think to use an elevated File Explorer earlier. But it successfully updated the ACLs and now the references to the bogus SID are gone. :-)
There was a tool subinacl.exe that was provided by Microsoft until 2004. It is a bit hard to find now (see https://answers.microsoft.com/en-us/windows/forum/all/i-wanted-to-download-subinacl-but-i-cant-find-it/a8bf4c50-1d43-4f03-b6f9-f62deab010fb ).
With this tool you can remove all invalid SIDs from a folder and subfolders.
subinacl /subdirectories "C:\folder\*.*" /cleandeletedsidsfrom=<domain>
It was helpful for me, but the output seems to be corrupt. So I bypassed the output to a file by >logfile.txt

oracle home user

I have windows 10 64 bit
I try to re install oracle database 12c
i delete all files .. from directories .. from services. from regedit .. from temp.. from c disk .. from everywhere i remove oracle files all also i run ccleaner but when i try to install oracle database12c again
then in this step this show oraclehomeuser1 already exist :O
i dont why where it is located
any solution please
It seems that as part of the Oracle 12c installation process, you created an 'Oracle Home User' account. This user account is used to run all database services. You haven't done anything wrong here: I've created Oracle Home Users for Oracle 12c databases I've set up.
Evidently as part of your uninstallation you didn't remove this user account.
Remove this user account, using this Super User question if the user doesn't appear in Control Panel, and try again.
press WIN+R , Type lusrmgr.msc, press enter, double click users in left pane, delete the Oracle home user you create during instalatiom –
Tayyab Mazhar
Thanks Tayyab.. this is perfect answer.

Permission denied when trying to import a CSV file from PGAdmin

I'm using PGAdmin 1.14.3.
When I try to execute an import command:
COPY grad(country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy)
FROM 'C:\\Users\\denis\\Desktop\\BP2Project\\USA\\US.txt';
I get a
ERROR: could not open file
"C:\Users\denis\Desktop\BP2Project\USA\US.txt" for reading:
Permission denied SQL state: 42501
I did look up other similar questions and none of them solved my issue.
I logged in as user "postgres" who is the superuser. I don't see why I'm missing permissions. I'm on Windows 7.
The permissions article mentioned in the answer by Houari and Flimzy is a good reference material, but a direct answer (the quick fix I used) is:
Right click the folder containing the data file(s) that permission was denied to and then click Properties.
In the Folder's Properties window, select the Security tab.
Click the Edit button.
In the "Permissions for the folder" window that opened, click the Add... button.
Type Everyone into the "Enter the object names to select" text area box.
Click OK and the window will close.
Verify that the default Read & Execute permissions were set to Allow via the check checkbox in the previous window.
As JLB notes, Write permission is needed if dumping from PostgreSQL, opposed to copying into it.
Click OK and the window will close.
Click the Apply button in the Folder Properties window.
Now you can run the SQL COPY statement that needs to access those files.
Once done, return to the Folder's Properties window.
Click the Edit button.
Select the Everyone entry in the "Group or user names:" field.
Click the Remove button.
Click OK on the remaining open windows.
The permissions have now been returned to what they were.
The user Postgres must have read access on the file from which you are about to copy.
Look at this article to see how to modify files' security access on Windows.
Ok, this is how got COPY command working,to export a table to CSV, step by step.
Pls note that I am using pgAdmin 111.
Create the target folder you want to export a table to. E.g C:\myExports
Set a read/write permission on this folder following the steps below :
Right click the folder containing the data file(s) that permission was denied >to and then click Properties.
In the Folder's Properties window, select the Security tab.
Click the Edit button.
In the "Permissions for the folder" window that opened, click the Add... button.
Type Everyone into the "Enter the object names to select" text area box.
Click OK and the window will close.
Verify that the default Read & Execute permissions were set to Allow via the >check checkbox in the previous window.
Click OK and the window will close.
Click the Apply button in the Folder Properties window.
This is the tricky part, inside myExports folder create a blank CSV file with your desired name.E.g employee.csv
Then run the Copy command like this :
copy employee to 'C:\myExports\employee.csv' delimiter ',' csv;
employee is the table name in this example..
Hope this helps.
If you don't want to give permissions to Everyone, you can add permissions to the account that started the service. In the Control Panel - Administrative Tools - Services, copy the account name in the 'Log On' tab. (On my system the account is called 'Network Service'.) Then share the folder with the CSV-file with this user as shown in the answer above.
To solve this problem you must give permission to the CSV file because that CSV file present in a COPY command are read directly by the server, but not client application. So to make this file accessible to a server we must give full read-write permission so that Postgresql user can read and write on that file.
Reference: article showing step by step procedure.
I just ran into this error and even after adding postgres to permissions on the file folder and the file itself, it still didn't work. So, I put the file in a public folder. On Windows this was the path: "C:\Users\Public\Documents\census.csv." It worked!
Responses to this problem on different threads go something like this
1. "Tell me exactly what command you used"
2. "Make sure you have right permissions"
3. "Just use /copy"
I just tried giving permissions to Everyone on the cvs file I am trying to copy from, and it is still giving me the permission denied error. I think this functionality is broken and has been broken for multiple consecutive releases over multiple consecutive versions of Windows.
for me and I've just spent some long hours on this.
I have a central db residing on a HP box running 14.04 postgresql-9.5 pgAdmin3 postgis-2.2, shares are made through a tweeked Samba share. My clients are using a mixture of windows 10.1, 7, 8.1 and I have one ubuntu 14.04 desktop.
I'm working with large tables updating records and normalising data and have built the routines around SQL copy statements from CSV files which were made from the core COPY public.table_1 TO (the share folder I'd set up in Samba https://www.youtube.com/watch?v=ndAYZ0DJ-U4) '/srv/samba/share/[filename].csv'
I can then update the database once the tables have been amended with COPY table_1 from '/srv/samba/share/test.csv' USING DELIMITERS ',' WITH NULL AS '' CSV HEADER; from any of my clients.
The key as far as I have been able to determine is that the clients doing the updating must be superusers, also everything must tie up in terms of users as there are 4 servers working together here Postgresql, Samba, UNIX and WINS
All of my users are registered on each of the servers with the same username and password homogeneity is the main factor.
I had tried for a long time moving things about and trying various naming conventions but in the end it was http://www.postgresql.org/message-id/CFF47E56EA077241B1FFF390344B5FC10ACB1C0C#webmail.begavalley.nsw.gov.au that sorted me out it was like a big switch clicking in. chown 777 on your shares and group management was an important learning curve but., the hours I've spent on this will reap rewards down the line... Loving Ubuntu loving life and loving the spirit of open source but that just might be sleep deprivation kicking in... IT WORKS
I am trying to execute SQL commands directly from a file in psql 14, and landed the same error.
The reason is that "postgres" user is different from the 'admin' or the main user of the operating-system. So, this main user denies "postgres" to access files from its file system.
Although there is a way to bypass it.
Windows lets any user access the files in 'C:\Users\Public' and Linux distros allow files in '/tmp' folder to do the same.
So, whatever files you are trying to access from postgres' terminal, keep the files in
'C:\Users\Public' for Windows
'/tmp' in Ubuntu
Read from the orginal source of this answer
use \copy command from psql instead with this config:
sudo psql -U postgres -d <your-db> -c "\copy <your-query-or-table> TO '<pat-to-save-file>' WITH (FORMAT CSV)"

Unable to create database using DBCA

I have installed Oracle 11g on Windows 7 successfully. But, when I am creating a database using DBCA, it says init.ora (access denied), at the last step, and stops. I logged into the system using admin.
I have manually changed the settings of that directory where the DB file is created. But have had no success. Does anyone have a solution?
This is in Oracle 12c running on my Windows 10 PC.
Right click on the "CMD" before opening the command prompt and
Click on "RUN AS ADMINISTRATOR" so the command prompt opened with Full Administrator privileges
Call the "DBCA" assist by typing DBCA in this command window
The database creator assistant opens, and everything after this step goes very well.
Sounds like you haven't followed the installation guide. A typical error if you have not added the user to the domain group.
I jumped into the same issue today. The issue will keeping come out no matter you're logged in as admin or not (in most cases, we logged in as admin, same as me).
I get pass the issue as : press Windows key to open Start Menu, type in 'dbca', when dbca.bat shows up in Programs, right click and select 'Run as administrator', everything goes fine now !

ASP.NET -The current identity (Machine\ASPNET) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'

I am having this issue on my Win XP Professional Development Machine. My application is on Virtual Directory.
The current identity (MachineName\ASPNET) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
I have done following so far.
1. Must Not Use Simple File Sharing. After Changing Settings, Pls Reboot.
Open your My Computer, the on menu, select Tool >> Folder Option the Select View Tab,
Uncheck Use Simple File Sharing
2 Adding User Permission
When you create virtual directory on IIS, the actual folder you used with it must have access permission
To do this, follow:
select the properties of your actual folder, then select Sharing Tab
select option Share This Folder
specify the ShareName (commonly folder name itself)
then select Security tab, you will see the Group and Username listed there.
to add ASPNET just click ADD
pop up window will appear "Select User or Group"
Click Advance and Click Find Now
All Users and Group will be listed there, try to find ASPNET and select OK
you will going to back on Security tab and select something like "RAD/ASPNET", under that you will see "Permission for ASP.NET"
for the last step, check Full Control under Allow Column, then OK
3 I Have tried, the aspnet_regiis exe in the framework folder!
Still does not work, Any other options or suggestions please..
Update:
My Hard disk is completely encrypted. Does it have any impact?
Encrypted shouldn't affect.
Try going to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files in a file windows explorer and give all access to your ASPNET and Network accounts.

Resources