No Clue where to start: Importing Excel file into existing oracle tables
I have an excel document that has data organized in formats according to the columns of tables we have. Our database is 10 G and developers only have clients such as toad to manipulate database.
There are two columns that are sequentially created using tbl.NEXTVAL in two different tables. They are called LEAD_ID and CUSTOMER_ID in LEADS and CUSTOMER table obviously these are not included in the file.
CREATE tbl CUSTOMER ( int CUSTOMER_ID, varchar(40) FirsName, varchar(40) LastName )
CREATE tbl LEADS ( int LEAD_ID, int CUSTOMER_ID, varchar(40) notes, varchar(40) status )
The excel file is organized in cells that is consistent..
Where do I start, how would I do it? and I am being asked to do it by tomorrow and I have no clue..Can I do this with oracle itself or I have to read the file through Java?
Please give me some idea
Thank you,
Thanks for your suggestion with checking the log and bad file..It helped and was able to insert..
Actually this is a real project.. and the actual data is in the hundreds or more.. The problem was I had put sysdate in double quotes and should have been without them. It is now inserting into the table.. however If I can ask one more question.. I have actually multiple tables that I need to insert into from an excel file which is organized in columns..
For example.. let's say I have a row in the excel file as
Claim_Number FirstName LastName
A single insert would be inserting into four tables (CLAIMS, CUSTOMERS, LEADS, etc..)
first on CLAIMS table that only takes the Claim_Number
Second CUSTOMER table, that takes the Claim Number and Customer names ( FIRST and LAST)
Third could be inserting the LEADS table with a sequenced lead number along with the customer name and claim number..
So I would need to reuse the values three or four times for a single record to be inserted..
Can you give me some idea?
And also I have columns like ACCOUNT_TYPE that would be have same value always more like a constant or other columns like UPPER_FIRSTNAMEwith result that comes from a sql function with Uppse case of the other column.. which is just the upper case letter version of FIRST_NAME column.. and it won't be read from the input file.. How would I take care of such issues like the sysdate .. I tried the following shown in bold but didn't work..
LOAD DATA
INFILE 'c:\trex2.csv'
BADFILE 'c:\trexbad.txt'
APPEND
INTO TABLE CC_CUSTOMERS
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
LAST_UPDATE_DATE sysdate,
CUSTOMER_NUMBER "CC_CUSTOMERS_S.NEXTVAL",
CUSTOMER_ID "CC_CUSTOMERS_S.NEXTVAL",
UPPER_FIRSTNAME UPPER(:FIRST_NAME) ,
ACCOUNT_TYPE CONSTANT 'Residential'
FIRST_NAME,
LAST_NAME
Thank you in advance..
Similar Messages
-
Importing excel file into OBIEE 10.1.3.4
Hi,
I am trying to import excel file into OBIEE and would like to use it as a data source. Fro this, I have already created an excel file (using MS excel 2007) with some sample data and named the data ranges with in the excel sheet as well. and I have placed that file under C:\ drive directly. And then created DSN and made sure that it points to the excel file.
When I go to Administration tool -> Import from Database -> seelct ODBS 3.5 and selected my DSN and clicked OK. Here I have not provided the user name and password (though I have provided the username/pwd as Administrator it is not taking).
when I click ok, it is throwing the following error :
nQSerror:16001 ODBC error state : IM006 code: 0 message: [Microsoft][ODBCDriver Manager] Driver's SQLSetConnectAttr failed. [nQSError: 16001]ODBC error state: S1000 code - 5015 message: [Microsoft][ODBC Excel Driver] External table is not in the expected format
Pls help me in rectifying this error. Many thanks in advance.
Thanks
Edited by: 858747 on 25-Aug-2011 05:47
Edited by: 858747 on 25-Aug-2011 05:48Hi, I am facing the same issue.
I am using OBIEE 11g with MS Excel 2007 file as source. I have created ODBC Driver by selecting Microsoft excel driver.
NQSAdminTool.log gives error:
ODBC error state: S1000 code: -5015 message: [Microsoft][ODBC Excel Driver] External table is not in the expected format
The Admin tool gives error: "Unable to connect database using connection pool", when I try to 'update row count' in Physical Layer.
Any quick resolution to this?
Many thanks in advance.
Edited by: user1603699 on 25-Oct-2011 09:28 -
Upload an Excel file into an Internal Table
Hi,
I want to upload an Excel file into an internal table but it doesn't work. I'd appreciate if someone could tell me what is wrong.
My excel file has the following format:
Col1 Col2
Row1 1 2
Row2 2 3
Row3 3 4
And the report code is the following one:
REPORT ZFI_PROKON_PROCESOS.
DATA: BEGIN OF itab OCCURS 0,
num1(1),
num2(1).
DATA: END OF itab.
PARAMETERS: p_file LIKE rlgrap-filename obligatory.
AT SELECTION-SCREEN.
AT SELECTION-SCREEN on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
CHANGING
file_name = p_file.
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 2
I_END_ROW = 5
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT itab.
WRITE: / itab-num1, 10 itab-num2.
ENDLOOP.
Thanks in advance,
GerardTry function module
ALSM_EXCEL_TO_INTERNAL_TABLE
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_path
i_begin_col = 1
i_begin_row = 2
i_end_col = 70
i_end_row = 10000
tables
intern = i_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
P_PATH is file name with path.
I_EXCEL is internal table to store data.
declaration is "i_excel like structure alsmex_tabline"
then loop at i_Excel and populate your table
for eg
loop at i_excel.
case i_excel-col.
when '0001'.
i_data-compcode = i_excel-value.
when '0002'.
i_data-rcpttyp = i_excel-value.
when '0003'.
i_data-pocimpro = i_excel-value.
when '0004'.
i_data-tranno = i_excel-value.
when '0005'.
i_data-msrpo = i_excel-value.
when '0006'.
i_data-mporel = i_excel-value.
endcase.
at end of row.
append i_data.
clear i_data.
endat.
endloop. -
Loading an Excel file into a Z-Table
Hi Gurus,
Can somebody guide me how to load an excel file into a Z-Table.Hi,
You need to write a ABAP code for this....
The following is the code for loading data into an internal table:
types: begin of ttab,
rec(1000) type c,
end of ttab.
types: begin of tdat,
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of tdat.
data: itab type table of ttab with header line.
data: idat type table of tdat with header line.
data: file_str type string.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
static = 'X'
changing
file_name = p_file.
start-of-selection.
file_str = p_file.
call function 'GUI_UPLOAD'
exporting
filename = file_str
tables
data_tab = itab
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
delete itab index 1.
loop at itab.
clear idat.
split itab-rec at cl_abap_char_utilities=>horizontal_tab
into idat-fld1
idat-fld2
idat-fld3.
append idat.
endloop.
loop at idat.
write:/ idat-fld1, idat-fld2, idat-fld3.
endloop.
From this internal store it onto the database.....
Sharma one more thing you must have posted this question in ABAP fourum for better results....
Hope it helps,
Thanks,
Happy Life,
Aravind -
Uploading data from a xlsx file into an Oracle table
Hi All,
I want to know what would be the best approach and tool to upload the data from an xlsx (excel) sheet into an Oracle table.
Can I use 'sqlldr'?
~ParagParag Kalra wrote:
What if the excel sheet is exported from some other third party database and not explicitly generated on Windows? I know if we can export it to excel why can't we also export it to csv but what if that option is also not available.
Also what things do I need to take into account when I export a xlsx file to csv file. I mean I hope in no circumstances there would be a data loss.How about instead of of these "what ifs" and "I hopes" you tell us exactly what you have to work with and describe the real business problem. If you ask the wrong questions, you get the wrong answers.
You "hope" that there would be no data loss? Do you really think Excel would survive as a product, much less be the overwhelming dominant product of its type, if it screwed up something that fundamental? The only thing that will be lost is the formatting meta-data. -
Need to Load data in XML file into multiple Oracle tables
Experts
I want to load data that is stored at XML file into multiple Oracle table using plsql.
I am novice in this area.Kindly explain in depth or step by step so that i can achive this.
Thanks in advnace.Hi,
extract your xml and then you can use insert all clause.
here's very small example on 10.2.0.1.0
SQL> create table table1(id number,val varchar2(10));
Table created.
SQL> create table table2(id number,val varchar2(10));
Table created.
SQL> insert all
2 into table1 values(id,val)
3 into table2 values(id2,val2)
4 select extractValue(x.col,'/a/id1') id
5 ,extractValue(x.col,'/a/value') val
6 ,extractValue(x.col,'/a/value2') val2
7 ,extractValue(x.col,'/a/id2') id2
8 from (select xmltype('<a><id1>1</id1><value>a</value><id2>2</id2><value2>b</value2></a>') col from dual) x;
2 rows created.
SQL> select * from table1;
ID VAL
1 a
SQL> select * from table2;
ID VAL
2 b Ants -
Storing an Excel File in the Oracle Table through Oracle Form (10g)
Hi,
We have the below requirement in the Oracle Forms (10g).
Database: 11g
Application: R12
We need to provide an upload functionality to the user, so that he can upload an excel file into the form (from the local system), this is achived.
Now what we need to do is that we need to capture the path of the document (in the local system) and we need to store the document in a Oracle table.
Next we need to validate the records that are being loaded and the error records should be written into one more file and that file also we need to store in an Oracle table, this is because, i need to query this error file from the table later and need to send to the user as an e-mail.
Basically i started off with the below code just for the POC. but iam facing the error. Please help. I did not put this code in my form.
Create Table Email_Attachments(Id_Pk Integer Primary Key,Fname Varchar2(50),Image Blob);
Create Or Replace Directory Temp As 'C:\';
Create Or Replace Procedure Load_File(Pi_Id In Integer, Pfname In Varchar2) Is
Src_File Bfile;
Dst_File Blob;
Lgh_File Binary_Integer;
Begin
Src_File := Bfilename('TEMP', Pfname);
Insert Into Email_Attachments (Id_Pk,Fname,Image)
Values (Pi_Id,Pfname, Empty_Blob())
Returning Image Into Dst_File;
Dbms_Lob.Open(Src_File, Dbms_Lob.File_Readonly);
Lgh_File := Dbms_Lob.Getlength(Src_File);
Dbms_Lob.Loadfromfile(Dst_File, Src_File, Lgh_File);
Dbms_Lob.Close(Src_File);
Commit;
End;
begin
Load_File(1,'test.txt');
end;
ERROR
ORA-22288: file or LOB operation FILEOPEN failed
No Such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 1014
ORA-06512: at "SYS.LOAD_FILE", line 10
ORA-06512: at line 2
How to capture the Path from which he has loaded the file?
How to Write the error records it to the file and store it in an Oracle table?
Will the below table be of use to me?
fnd_lobs_document
fnd_lobs
fnd_documents
Please share your ideas as to how to acheive this.
Thanks and Regards
SrinivasWhen you want to process the file, them it depends on the format. "Excel file" is a term that is used for a variety of file formats, mostly simple CSV, binary (true) XLS and XLSX.
So to get help you have to give us more information. Since the file is already in the db you might get better answers at {forum:id=75}. The forum has a FAQ that has a whole section {message:id=9360007}.
Regards
Marcus -
Import Excel file into SQL, using bulk copy - date issues
Hello. I have a VB project where I need to import multiple excel files with lots of rows and columns into SQL 2012. Currently the import is set up, using OleDbConnection and insert commands and it takes up to 10 minutes to process all the spreadsheets.
I'm trying to switch the code to use SQLBulkCopy, but experienced issues with dates columns. Some rows have Null dates and those are interpreted as strings and won't import into SQL tables. Is there a way to format the column prior to import programmatically?
Any advice is appreciated.
Note -
If I add column mapping and exclude all dates columns - import works fine. All excel files have date fields, excel files are reports from other vendor and change on weekly bases, manual formatting of the excel files prior to import are out of the question...
The code is just basic:
Public Sub ImportFormExcelSample()
Dim ExcelConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyExcelSpreadsheet.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=Yes""")
ExcelConnection.Open()
Dim expr As String = "SELECT * FROM [Sheet1$]"
Dim objCmdSelect As OleDbCommand = New OleDbCommand(expr, ExcelConnection)
Dim objDR As OleDbDataReader
Dim SQLconn As New SqlConnection()
Dim ConnString As String = "Data Source=MMSQL1;Initial Catalog=DbName; User Id=UserName; Password=password;"
SQLconn.ConnectionString = ConnString
SQLconn.Open()
Using bulkCopy As SqlBulkCopy = New SqlBulkCopy(SQLconn)
bulkCopy.DestinationTableName = "TableToWriteToInSQLSERVER"
Try
objDR = objCmdSelect.ExecuteReader
bulkCopy.WriteToServer(objDR)
objDR.Close()
SQLconn.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Using
End Sub
The error I get is System.InvalidOperatiomException: The given value of type String from the data source cannot be converted to type date of the specified target column. System.FormatException: Failed to convert parameter value from String to a DateTime...
Thank you!
Alla SandersHi Alla,
This issue might be caused because the field contains a NULL value, but the date/time columns in your table does not allow NULL values. Furthermore, please aslo take a look at "Data Type Issues" session in the article below:
http://odetocode.com/blogs/scott/archive/2013/02/08/working-with-sqlbulkcopy.aspx
Here is a similar thread about this topic for your reference, please see:
http://social.technet.microsoft.com/Forums/sqlserver/en-US/2d99181c-fc2b-4caf-9530-3bd6ae1745f1/sqlbulkcopy-column-validation-not-working?forum=sqldataaccess
If you have any feedback on our support, please click
here.
Regards,
Elvis Long
TechNet Community Support -
Bug - Import Excel File into Indesign cs5.5
Hi,
I'm doing a complex Indesign file with a link to a Excel file.
To import the Excel file I have created several tables always using styles (table, cell, paragraph).
The problem born when I make a correction into the file Excel and I update the link in Indesign.
The text updated automatically bring a caracther style (the first that I have created).
I don't want to apply any character style, but I want to maintein the paragraph style that I have applied.
If I delete all caracther styles the problem is solved, but I need to have caracther styles in my layout.
Anyone can help me?
Thanks to all
ElisaThe import facility of Excel or Word Document is only on a PC system of Dreamweaver.
File >> Import >> Excel Document
File >> Import >> Word Document
For mac system I understand this facility isn't there. What can you do about this?
1) Get hold of a PC and download a trial version of DW and import the file(s) and you are done;
2) Ask a friend to do it for you;
3) Post your excel file online and some nice guy like Nancy, john or Murray will help you out.
Good luck and let us know if this has given you some more ideas to explore.
Good Guy
Website: http://mytaxsite.co.uk
Website: http://html-css.co.uk
Forums: http://mytaxsite.boardhost.com
Email: http://mytaxsite.co.uk/contact-us -
Import excel file into owb automatically, is it possible?
Is it possible to load several excel files in owb automatically?
I want to avoid the follow situation...
I have like 100 excel files I have to create 100 system dsn each pointing to one excel file.
Is it possible?
ThanksThe forum is how to integrate foreign databases into an oracle database using gateway. From the provided description you're trying to import an Excel file directly into OWB. OWB has its own mechanism to import these files , so better post your issue in the OWB forum:
Warehouse Builder -
CRM ABAP How to upload an Excel file into an internal table?
How to upload an Excel file using GUI_UPLOAD?? what should be the values of the parameters? The function modules ALSM_EXCEL_TO_INTERNAL_TABLE and KCD_EXCEL_OLE_TO_INT are not present in CRM. Please suggest me a way out!
Hi saurabh,
you can try the folowing sample..
and make modifications according to your requirement..
TYPE-POOLS: truxs.
DATA: i_text_data TYPE truxs_t_text_data,
v_filename_string TYPE string.
DATA: BEGIN OF itab OCCURS 0,
Name(30),
Phone(15),
Fax(500).
DATA: END OF itab.
PARAMETERS: p_file LIKE rlgrap-filename.
START-OF-SELECTION.
v_filename_string = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename_string
filetype = 'ASC'
has_field_separator = 'X'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
dat_mode = ''
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = i_text_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
* I_LINE_HEADER =
i_tab_raw_data = i_text_data
i_filename = p_file
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
this is a sample code that uploads a excel file using GUI_UPLOAD, but uses another function module to convert that uploaded data into an internal table..
regards
satesh -
How to read data in correct format from EXCEL file into an internal table??
Hi Experts,
My requirement is to upload data from an excel file on presentation server into an internal table on <b>SRM</b> server.
I used 'GUI_UPLOAD' function module to achieve the same but all the the data is getting uploaded in # only.I had set in the 'HAS_FIELD_SEPARATOR' to 'X' to overcome this problem.
But all the efforts are in vain. The function module 'ALSM_EXCEL_TO_INTERNAL_TABLE' doesn't exist on SRM Server and I am not getting any other function module having similar functionality available on SRM server.
I have written the following code:-
TYPES: BEGIN OF ty_addr_loc,
userid TYPE xubname, "User Id
addr_code TYPE char4, "3 Digit Site Location Code/4 Digit
"Alternate Address
loc_id TYPE bbp_location, "Indicator: Address is standard address
END OF ty_addr_loc.
*Retrieving file name
parameters: p_file type rlgrap-filename.
DATA:
Local variable holding file name
l_file TYPE string,
Local Variable holding the file type,
l_type TYPE filetype VALUE 'ASC',
Local Variable holding the field separator
l_sep TYPE char01,
i_tab type standard table of ty_addr_loc.
Clearing local variables
CLEAR:
l_file,
l_sep.
Initializing the local variables
MOVE p_file TO l_file.
l_sep = 'X'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = l_type
has_field_separator = l_sep
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = i_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
IF sy-subrc <> 0.
Throwing an information message
MESSAGE i003. "Data Upload Failed
LEAVE LIST-PROCESSING.
ENDIF.
Please tell me a way out. I have to make a delivery urgently.
Thanks in advance,
Swati GuptaHi
Try the FM <b>KCD_EXCEL_OLE_TO_INT_CONVERT</b>
Sample:
call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
exporting
filename = i_filename
i_begin_col = l_begin_col
i_begin_row = l_begin_row
i_end_col = l_end_col
i_end_row = l_end_row
tables
intern = xt_intern
exceptions
INCONSISTENT_PARAMETERS = 201
UPLOAD_OLE = 201.
if sy-subrc <> 0.
e_subrc = sy-subrc.
exit.
endif.
<b>reward if Helpful.</b> -
Error while uploading an edited excel file into an internal table
Hi Experts,
I am getting error while uploading an excel file that has been edited.
I am using GUI_UPLOAD for uploading the file into internal table.
In my program I first have to download a file, if I use the same file without editing I am able to read the file.
When I try to edit it and then use it to upload it fails, but this is part of the my requirement.
PLease suggest.
Regards
KishoreTYPE-POOLS: truxs.
parameter : lv_full_path TYPE rlgrap-filename,
data : lt_conv_data TYPE truxs_t_text_data,
lt_roles_excel type table of ( your structure).
start-of-selection.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
i_line_header = 'X'
i_filename = lv_full_path
TABLES
i_tab_sap_data = lt_roles_excel
CHANGING
i_tab_converted_data = lt_conv_data
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
In the FM Line_header = 'X' means it will negelect the first line. So u can give the heading in the excel file.
Hope this might help u .
With Regards,
Sumodh.P -
Import excel/csv data to oracle table problem
hello sir,
i am using application importing csv/excel data to oracle table which is developed by vikas and that i want but when i add csv file and upload. My cvs file will displayed but when i click on create table button then it gives error like ...
1) invalid datatype. vikas link as :
http://htmldb.oracle.com/pls/otn/wwv_flow_custom_auth_std.login_page?p_flow_page=38131:1:1287783765705596
i search in forum for solution i got following link but it also gives me error
Re: File Browse, File Upload
still i am trying but i dont get solution . plz help me!!! give me steps ......
Report on table created
says:
failed to parse SQL query:
ORA-00942: table or view does not existHi
Firstly, are you trying to upload your data into a new table or an existing table? If it's a new table, what name are you using?
Secondly, it may help if we could see a sample of the csv -
How to copy only some coulums and rows from excel files to a Oracle Table
Dear all,
I have the following problems:
How to copy only some wanted coulums ( I.e DATETIME(format:17/09/2007 00:00:01 ) and TIME (format: 00:00:01 ) from excel files to oracle table.
HOPE TO GET HELP FROM YOU GUYS!
SINCERELY,
MONOJSHARMALUITELHow about Heterogeneous Services so that the Excel sheet is an external database:
1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
EXCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
(CONNECT_DATA =
(SID = EXCL)
(HS = OK)
Here SID is the name of data source that you have just created.
3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = <hs_sid>)
(ORACLE_HOME = <oracle home>)
under SID_LIST_LISTENER like:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\ORA9DB)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = ORA9DB)
(ORACLE_HOME = d:\ORA9DB)
(SID_NAME = ORA9DB)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = EXCL)
(ORACLE_HOME = D:\ora9db)
Dont forget to reload the listener
c:\> lsnrctl reload
4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
In this file set following two parameters:
HS_FDS_CONNECT_INFO = excl
HS_FDS_TRACE_LEVEL = 0
5- Now connect to Oracle database and create database link with following command:
SQL> CREATE DATABASE LINK excl
2 USING 'excl'
3 /
Database link created.
Now you can perform query against this database like you would for any remote database.
SQL> SELECT table_name FROM all_tables@excl;
TABLE_NAME
DEPT
EMP
Maybe you are looking for
-
MB5B Report table for Open and Closing stock on date wise
Hi Frds, I am trying get values of Open and Closing stock on date wise form the Table MARD and MBEW -Material Valuation but it does not match with MB5B reports, Could anyone suggest correct table to fetch the values Open and Closing stock on date wis
-
How do I get Apple to unlock a Verizon unlocked 4s to use domestically on a GSM network?
I have 4 iPhone 4S's in my family. The contract with Verizon ended on December 5, 2013. Early in 2014 I requested from Verizon that all 4 iPhones be unlocked, which was done and confirmed by Verizon. However, subsequently I have learned that the V
-
How to pass from a document pdf towards another
Hello, I have two open documents. In javascript, how to pass from a document pdf towards another. David G
-
Acrobat X interface is pixelated - how to fix?
Hi, I recently upgraded my computer to Windows 8.1 and installed Acrobat CS6 including Acrobat X (10.1.13). I have a bizarre problem. The entire interface looks pixelated: the menus, contents of PDF files, everything. Playing around with the settings
-
hi, i was juz wondering, when i play a song and i put it on repeat it kinda lag during the transition of the repeat. in another word when it about to end and start the song all over again, at that moment it will lag mi computer, making the computer p