SQL & PL/SQL :: Connect To Oracle Database From Log4net.config File?
Apr 26, 2012
Need to know how to connect to Oracle (11g) database from Log4net.config file. As I need to wright the logs to the Oracle (11g) database when any user logon to the web application.
Note: I am succesfully able to wright the logs to the text files but not able to wright the logs to the Oracle (11g) database.
working on setting up connection between a Windows 2008 server and a pair of Oracle 11g DBs in a RAC Cluster. One Database (let's say DatabaseA) is in one data center, and the other (DatabaseB) is an a secondary, backup database. The RAC Cluster is all set up, working fine, etc. However, I Need to set up the machine.config file on my Windows Server, to go only connect to DatabaseA, unless it fails, in which case, we want it to connect to DatabaseB. Think we could do this if the host app server was Linux/Unix, but it is windows, and I just don't have the background as to the parameters to set up in the machine.config file. They are similar, but different, and we want a very specific behavior (use DatabaseA, unless fails, then DatabaseB). Application is .NET 4.0 app.
Acer laptop, Intel Processor w/ Windows 7 Professional (64-bit) Delphi 2010 Professional Oracle XE (+ the Oracle XE client that comes with it)
I cannot can't to the Oracle database from Delphi. The error I keep getting is:
Alias is not currently opened. [Oracle][ODBC][Ora]ORA-12154:TNS: could not resolve the connet identifier specified.
Here's what I've done:
1. Create an ODBC connection to my Oracle database
- run C:WindowsSysWOW64odbcad32.exe to open the ODBC administrator. - Data source name: bt_user - TNS Server Name: localhost/xe - user bt_user - Clicked "test connection" -- Success.
2. Open Delphi and drop a TDatabase component on my main form.
- Set the Alias Name property to "bt_user" (the alias I set up in ODBC) - Set database name to "bt_user". - Checked "connected".
Alternatively, I tried using the Delphi ADO components (the dbGo components).
- Drop TADOConnection component on my form. - Select "connection string" and open the dialog. - Click "build string". - Select "Microsoft OLE DB Provider for ODBC Drivers" from the selection. - In "use data source", select "bt_user" from the drop-down list (my ODBC connection from #1) - Click "test connection".
Again the same error.
My questions are:
1. Can Delphi work with Oracle XE (Express Edition)?
2. If so, then do I need to install the "Instant Client"?
3. Will the instant client for Oracle 10g work with Oracle 10g XE?
4. Do I need to install any additional ODBC driver(s)?
5. Why was I successful in creating the ODBC connection in Windows, but it failed in Delphi?
6. Will Visual Studio.NET (C#) work with Oracle XE, and what are the steps for setting that up?
We've all heard the news about the new 12c capability to have a container database hosting multiple pluggable database instances.
This obviously will provide significant reduction in overhead on systems (like Exadata) where we'd like to host multiple databases, but can't consolidate them due to conflicts that prevent them running under the same instance (public synonyms / dblinks, schema name collision, etc). Not to mention the effort required to get different application databases to co-exist on the same DB instance ... which in and of itself can be a major project.
My question - does the container database need to have the same character set as the pluggable databases?
If not, this still presents a limitation, as there are numerous vendors of COTS applications that don't (or won't) support ALT32UTF8, which is what we're building all our bespoke applications on.
I am trying to develop a web application with C # VS.net, my application is to connect to an Oracle database on a server (LAN), the problem I want to connect to the database without install oracle or ODP on my client machine.
When I created the database the connection I used was s7s but whether or not I include that name or just use the ID/password that script will not connect.
I am attempting to connect to an Oracle 8i database via the Oracle 9.02 ODBC driver and I am receiving the following error message upon testing the connection in WinXp's ODBC Data Source Administrator dialog box: "Unable to connect SQLState=IM004 [[Microsoft]][[ODBC Driver Manager]] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed" .
I am running Oracle Client 9.2 on a P4 machine running winXP.
I have created two database one for production and another one for test.I created both database in shared_server mode(by using dbca),after than I did not change anything.My problem is when i connect to test database from outside lan through static ip its working well,but when i connect to production database which is not connected. I checked and compared two databases,then I find there are some changes in dispatcher and mts_ dispatcher parameters.And I used this query to check the shared_server status,
ie.select * from v$shared_server,
the output of this query is attached with this post.
i tried for 3 days to setup a connection between my oracle database 11.2 (resides on 2003,64 bit Microsoft windows) and a mysql database (resides on 2003,32 bit Microsoft widows).
i used dg4odbc 64 bit which was installed on oracle server, my steps was as follows :
1- configure ODBC driver (MYSQL 3.51 odbc) on oracle server that connect to mysql database and the connection was tested successfully (the name of odbc dsn is DG4ODBC).
2- configure the listener.ora file (which resides on dg4odbc installation path) that contains the following :
4- configure that initdg4odbc.ora file that resides on the dg4odbc installation.
HS_FDS_CONNECT_INFO = DG4ODBC HS_FDS_TRACE_LEVEL = off
5- restart the gateway listener.
6- test DG4ODBC service by tnsping which was successful .when i try to get some data from mysql database by SELECT * FROM MDL_COURSE@DG4ODBC query,the query take some time (15 second !!) and return
ORA-12154: TNS:could not resolve the connect identifier specified
In fact I have around 50 excelbooks that are connect with oracle via ODBC/or any other way. My task is to build the login screen on form 10g. This form will validate the user via .dll after successfully validation, Form will connect to specific oracle user. This Login Screen will call the new form that will execute the query for the list of excel sheet [table that will keep the name, description and path of the excelbook]. User will select the one excelbook to open. As user will select Excelbook should be open. Now this excel book should be connected with specific oracle user.
Question 1: How to open the excelbook, that excelbook should be connected via form 10g login screen. After connection excel has its own micros to run he query from oracle database.
Question 2: How I can create the mirco into form 10g to run into excelbook/excelsheet.
Question 3: How I can pass the query or function/procedure to the excelbook/excelsheet.
all of the client cann't connect the db,and using sqlplus / as sysdba also cann't login there are many error of TNS-12535 and in the listener.log
alert.log: Sun Apr 29 18:10:36 2012 opidcl aborting process unknown ospid (42992060) as a result of ORA-604 Sun Apr 29 18:10:54 2012 opidcl aborting process unknown ospid (26280196) as a result of ORA-604
I have created a batch for silent DB Creation through DBCA. I want to add a script to also create the Network Service after. I was told it can be done only with Response File.
Is a response file a script also that can be executed after the DBCA scripts? Where can I find a manual with the available commands so I can produce what I need? On the internet I find only examples for Silent DB installation.
edit-solution Complete Solution posted as New article
I'm struggling with my configuration to be able to run some external procedures.I'm under 11gR2 and RHEL5 64bits. Following is my extproc.ora file :
CODESET LD_LIBRARY_PATH=/path/to/my/lib SET EXTPROC_DLLS=lib1:lib2 My LD_LIBRARY_PATH is valid and permissions are 755 but I'm getting this error message: CODEDECLARE * ERROR at line 1: ORA-06520: PL/SQL: Error loading external library ORA-06522: lib1: cannot open shared object file: No such file or directory ORA-06512: at line 51
I am developing an 64bit And-In software. My OS is windows7 64bit Ultimate. Developer tool is Microsoft Visual Studio 2010 Ultimate 64bit any-CUP.Server is SUN server and Oracle database 10.2.0.5 64bit enterprise edition.I have installed instantclient-odbc-win64-10.2.0.5 on my computer.I am able to connect through the command line sqlplus user/pass@server.In date source(c:windowssystem32odbcad32.exe), ODBC Driver connection successful.But in VS2010 C#, use Tools -> Connect Database,I get an error 193 (Oracle in instantclient10_2,c:ora10_64SQORA32.dll) cann't be loaded.SQORA32.dll is 32bit ODBC Driver or 64bit ODBC Driver?How can I connect database with vs2010 64bit?
I have new virtual UNIX machine and I installed oracle client on /usr/lib/oracle. Also I have a oracle database and I am able to connect to this database from my desktop sql developer.
So now I am trying to connect from new UNIX machine. Where I created tnsnames.ora file under /usr/lib/oracle/network/admin and before connecting did export the following
ORA-12545: Connect failed because target host or object does not exist. Not sure what I missed here. using same tns file I am able to connect from sql developer on windows.
We are working on a Data warehouse (ard 50G ) architecture with the following acquired environment:
Single server X3650 M4 Dual CPU ( 16 core in total ) with 48G ram Oracle standard 10g x64 Windows 2008 x64 128 SSD x 8 IBM ServeRAID M5110e SAS/SATA Controller
Due to budget concern, we will be running the App server(Business OBjects 4.0 w/ Tomcat and DB server on the same machine. ) We have a user base of around 30 ppl on the app server.
We intend to have external redundancy using IBM raid card on raid 10 configuration. I wonder what kind of disk config yield better performance if we only have write update in the morning and 95% read for the rest ?
Raid 1 for OS (128SSD x 2 including DB logfile ) Raid 10 for DB server ( 128 SSD x 6 )
I heard ASM provides better disk management but just wonder it increase performance in anyway.
I want to import 1 .dmp file into oracle database. I dont know what exactly what that .dmp file contains e.g i dont know the Users inside the dump.While importing it gives me the error.
1. Do i need to create those users first and then import if yes then how would i know how many users are inside that dump.
2. Currently the objects are created in SYSTEM user by default. I want to import those objects in the MACL user which i created. How can i do it?
IMP-00003: ORACLE error 1917 encountered ORA-01917: user or role 'MALCCOMAN' does not exist IMP-00017: following statement failed with ORACLE error 1917:
I want to know what is the difference between the file catproc that we run after creation of the database in the Oracle 9i,10g and 11g r2. I have run that file in 11g R2 but it is taking more time and more over there are many new things that i saw in 11g R2 than what were there in 9i and 10g.
I am loading a Excel file into oracle database using a ORACLE form 6i and i am getting an ORA-302000. This Form run and load database file into database in many pc.
But One of the PC COuld not loading a Excel file into oracle database. Also i can't Create Excel file Database Through form 6i.
I want to stored the excel or ms word document in oracle database. Is it possible to view that file from database. If i export full database it is included in that dmp.
I want to disconnect and connect sql prompt in loop using script file.But whenever I try to do this it is giving error,check the below code.I save below code into some file and call that file using @"filename.sql", it won't work.
Basically I want to run one procedure in loop, and in each loop counter I want to disconnect the session and connect again. Becaue CONN and DISC not working while calling through @"..."
DECLARE BEGIN FOR N IN 1..5 LOOP DISC CONN SCOTT/TIGER@TEST; EXEC MY_PROC; END LOOP; END;