I used DTS Export Wizard to copy tables from SQL server 2000 to Oracle 8.1.7. After transfering completed successfully, I loged into oracle and tried to select data from the tables. I got 'table does not exist' error. But when I select table_name from oracle data dictionary, I saw tables exist in oracle. Then I opened SQL Query Analyzer, I can select data from the tables just transfered through linked oracle server.
Does anyone have same experience? Could someone please give me suggestion?
Hi guys, I was given a task to get an Oracle .dmp file into SQL Server. Is it even possible to do? Or do I have to script the Oracle DB and import the DB that way? But then how would I get the data?
I need to get the Oracle structure and the Data over to SQL Server.
Hi I am trying to migrate my database in Oracle 8i to Sql Server 2000 but am unsure of how to carry out the migration. How do I do it and what do I have to consider. My OS is Windows 2003. Thanks in advance
Dear All, I am working on a project to migrate a .net desktop application to web based application using ASP.NET 2.0. The present app has lots of tables with data in sql server 2000. The new app is to have Oracle 10.2 G as data store. Although the data store is being changed most of the tables in the present database will remain same along with the data they hold. My problem is: 1) how to transfer the tables to the new datastore 10.2 G in an automated way? After all it's not possible to create each table afresh in Oracle and then insert records into each table one by one. If that is done it will take atleast few months if not years. 2) can I export the tables to a xml file and then import it from Oracle.How to do that? It has become a nightmare for me. Pls suggest the easiest way and which takes the minimum time. A solution to the problem will be gratefully accepted. Thanks.
I am doing a test on migrating an Oracle 8i database toSQL 2000. I've never done this before and I would liketo find out if there are any complications or side effectsif I try doing the transfer of data using DTS?If not DTS then what would you suggest I transfer datawith?Thank you
We are running SQL Server 2000 SP3. We have linked servers in use thatwe use to access Oracle tables.Recently the claim has been made that you can access Oracle tables fromwithin SQL Server without using a Linked Server. I searched BooksOnline using keywords: linked, remote, and Oracle and did not findanything.A search of the newsgroup archives found only entries related to usingLinked Servers.Is there any such method as claimed? I do not think there is, but Ineed to find some support for my position or else learn something new.Thank you-- Mark D Powell --
I have been asked to look at optimising a Data Migration Strategy for one of our clients. I am quite new to Data Migration (I'm actually a system designer!).
The migration is from a legacy Oracle 7.16 Db to a SQL Server 2000 environment.
The legacy Db has some large tables - 30 Million+ rows
Table/column Mapping is 1:1
At present we are using DTS to import into the SQL environment.
My question is: Is there any way to leverage the Oracle 7.16 export to speed up the migration process?
I have a table that refers to itself, and I need to loop through it to get the total number of entries in the structure with an object_type of 40 this is the function I came up with to do this. The problem is that the nested function doesn't seem to get called.
Code Snippet using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; using System.Collections.Generic; using Microsoft.SqlServer.Server;
public partial class StoredProcedures { private struct PerformanceCriteriaCounter { public PerformanceCriteriaCounter(int id, string objecttype) { Id = id; Object_Type = objecttype; } public int Id; public string Object_Type; }
[Microsoft.SqlServer.Server.SqlProcedure(Name = "usp_PerformanceCriteriaCounter")] public static int CountPerformanceCriteria(int ParentID, int SourcePosition) { using (SqlConnection conn = new SqlConnection("context connection=true")) { int Counter = 0; int Counter2 = 0; SqlContext.Pipe.Send("Called with ParentID=" + ParentID + " SourcePosition=" + SourcePosition); conn.Open(); using (SqlCommand myCommand = conn.CreateCommand()) { myCommand.CommandText = @"SELECT CompetenceLearningObject.Object_Type, CompetenceLearningObject.LearningObject_ID FROM CompetenceLearningObjectParent INNER JOIN CompetenceLearningObject ON CompetenceLearningObjectParent.LearningObject_ID = CompetenceLearningObject.LearningObject_ID WHERE (CompetenceLearningObjectParent.Approved = 1) AND (CompetenceLearningObject.Archived = 0 OR CompetenceLearningObject.Archived IS NULL) AND (CompetenceLearningObject.Approved_Status = 1) AND (CompetenceLearningObjectParent.Parent_ID = @ParentID) AND (CompetenceLearningObjectParent.Position_ID = @SourcePosition)"; myCommand.Parameters.AddWithValue("@ParentID", ParentID); myCommand.Parameters.AddWithValue("@SourcePosition", SourcePosition); List<PerformanceCriteriaCounter> loList = new List<PerformanceCriteriaCounter>(); SqlDataReader reader = myCommand.ExecuteReader(); while (reader.Read()) { SqlContext.Pipe.Send("Adding item"); loList.Add(new PerformanceCriteriaCounter(int.Parse(reader["LearningObject_ID"].ToString()), reader["Object_Type"].ToString())); } reader.Close();
I figure this should not be a complex one. I know how to manually pull in data from Oracle 9i into SQL Server 2000 using DTS. However this is my issue.....
I simply want to automate the pulling in of data from 1 table in my ORACLE 9i database into another table in my Sql Server 200. I was hoping I could simple write a stored procedure that would sort of utilize a dblink like in ORACLE and then schedule that procedure. Is this feasible in Sql Server, and how would one go about setting this automated import up????
Greetings, I want to connet to Oracle databse from SQL server 2000 since I am more comfortable with SQL 2000 client package. The oracle server is 8i or above. I am running a SQL Server 2000 on a PC with Windows XP OS. Please help what I need to do and configuration information.
Is it possible to set a query result (scalar) to scalar variable. I would like to set a qery result (SELECT COUNT(*) FROM MyTable) to a scalar variable:
DECLARE @temp int
SET @temp = query result...
Is it possible? I couldn't find the way to do that...
I have a customer that wants to start using SQL Server 7.0 instead of Oracle, but they have a lot of Oracle applications (made in Developer 2000 and Forms). Due to the big effort needed to convert those applications (to Visual Basic), they want to be able somehow to migrate only data from Oracle to SQL Server, and then use some tool that will allow them to use the same applications with the SQL Server 7.0 engine.
I found on the "SQL Server Developer's Kit" a document describing the process of migrating data and applications from Oracle to SQL Server. There is a mention to an Oracle tool called "Oracle Gateway to SQL Server" that will translate calls received by the Oracle engine to the SQL Server engine, but this approach will still require the existence of Oracle servers (which is the thing the customer no longer wants).
The second option mentioned on that document, and the one that seems more attractive, is the use of Oracle "Open Client Adapter" (OCA) that will allow Developer 2000 applications to communicate directly to SQL Server via ODBC. However, I have been unable to find (on the Oracle site) any documentation regarding this tool.
Has anynoe heard or used such tool (OCA) ? Any comments, tips, drawbacks, experience you could share ? Any other idea on how a thing like that could be accomplished ? Perhaps a third-party application that can act as a gateway between the Forms app and ODBC/SQL Server, or that will be able to generate VB code from a Developer 2000/Forms app...
Any help will be appreciated.
Please respond directly to me, as I am not a member of the distribution list.
We have a linked server, which worked fine, but we have just changedthe collation sequence, in SQL-Server, fromSQL_Latin1_General_CP1_CI_AS to Latin1_General_CI_AS.Now trying to use the Linked server, we get the following message:"Error 7399: OLE DB Provider 'MSDAORA' reported an error. The providerdid not give any information about the error. OLE DB error trace [OLEDB provider 'MSDAORA' IDBInitialize::Initialize returned 0x80004005:The provider did not give any information about the error]."Ha anyone seen this before, because I am not sure why changing thecollation sequence, would affect the Linked Server
I want to write this query in sql server. Please help me, it is very urgent :(
Any help will be appreciated.
SELECT VALID_ITEM.PC_CODE,PC_TITLE,VALID_ITEM.DB_CONTRACT , valid_item.ITEM_NO,DESCPT,UNITS,CONTQ, CONTR_PRICE ,nz(QTD,0) as qtd,ind_ovr_und, nz(QTD,0) - NVL(QUANTITY,0) as QUANT_PREV, Nz(QUANTITY,0) as quant_rev, round(NVL(quantity,0)*nvl(CONTR_PRICE,0),2) as QTD_VAL, AMT_PAID_ITEM,AMT_RET_ITEM FROM VALID_ITEM, cqe_item,CONTRACT_PC WHERE valid_item.db_contract = contract_pc.db_contract and valid_item.pc_code = contract_pc.pc_code and valid_item.db_contract = cqe_item.db_contract (+) and cqe_item.cqe_numb (+) = :EST_NO and valid_item.item_no = cqe_item.item_no (+) and valid_item.pc_code = cqe_item.pc_code (+) order by valid_item.item_no
I need the basic information about how the query is working in Oracle & SQl Server.
Sicne I am getting different values when I run the query. I have a table called 'Client_Master' in both the DB (ie., Oracle & SQL). I have inserted a record with the below values for Client_Master table. (both Oracle & SQl).
SELECT * FROM CLIENT_MASTER WHERE ID = '200' AND ((START_CODE <= '102' AND END_CODE >= '102') OR (START_CODE <= '200' AND END_CODE >= '200') OR (START_CODE >= '102' AND END_CODE < '200') OR (START_CODE = '102' AND END_CODE is null))
Oracle result : No rows return. SQl Server : one row returned.
Data type for start_code & end_code are 'NVARCHAR2 (40)'.
I would highly appreciate if anyone can explain why is this and any suggestion like how to handle this in both the database.
The subject of this query is the values which is entered by the user should not be overlapped. But I dont how to handle this if it is alphanumeric.
Hi Friends, Need ur help desperately. I am stuck with one of the queries which i had written in Oracle and need the same in SQL Server.Please have a look at the following query :
select * from r_tin_1099_info where instr(translate( nm_ctrl_cd , '~!@#$%^&*()_+}{":?><`-=]['''';/., ', '*******************************' ),'*') > 0;
Basically my purpose is to replace the values in column NM_CTRL_CD having wild card characters with '*' and then select this rows to display.
However i am not able to run the same query in SQL Server since TRANSLATE is not a built in func. I have tried a lot to replace it but could only one func : REPLACE . But the same will not replace any one of the above wild characters but will replace the entire pattern.Please note that it should be able replace even if one of the wild card characters are present in the string and not necessarily the entire pattern shown above.
please reply ASAP since i am working and need this query to fix a defect.
I need to link some data from SQL Server 2005 with Oracle 10 data.One way is to link Oracle server to SQL Server and use ROWSOURCE forretrieving data.What other ways for joing data from both databases exist ?Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objectsshall I use for opening database and running an sql ? When I tried to import system.data.oracleclient, it was not available. Do I need to install anything for being able to use it ? Thanks a lot.
I need to link some data from SQL Server 2005 with Oracle 10 data.One way is to link Oracle server to SQL Server and use ROWSOURCE forretrieving data.What other ways for joing data from both databases exist ?Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objectsshall I use for opening database and running an sql ?Thanks a lot.
We have developed a solution that sends data from SQL Server to an Oracle server as the result of a stored procedure called by a job that runs every minute. While this development worked fine in our test environment, after moving it to production it ran successfully the first minute, but the second minute the stored procedure hung, and the process could not be killed. In order to stop the process I had to stop both the SQL Agent and the MSDTC services.
Our SQL Server box: SQL Server 2000 Standard Edition SP4 Windows 2003 Server R2 SP1
To setup the SQL box, I did the following: 1) Install Oracle Client Tools version 10.2.0.1 2) Restart Server 3) Modify the registry as follows: [HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTCMTxOCI] "OracleXaLib"="oraclient10.dll" "OracleSqlLib"="orasql10.dll" "OracleOciLib"="oci.dll" 4) Modified the PATH variable so that all references to SQL Server appear in front of Oracle path references 5) Added the linked server via sp_addlinkedserver '<tns name>','Oracle','MSDAORA','<tns name>' 6) Added linked server logins via sp_addlinkedsrvlogin '<tns name>','False','<SQL user>','<Oracle User name>','<password on oracle>' 7) Changed the registry for MSDTC to match this:
8) Stopped and restarted services in the following order: 1) MSDTC Stop 2) SQL Server Stop 3) MSDTC Start 4) SQL Server Start
The stored procedure: In a single transaction, the stored procedure compares a production table against a logging table. If a record exists in the production table that is not in the logging table, a record is inserted into logging table, and a record sent to Oracle via an INSERT INTO OPENQUERY('INSTANCE','SELECT Column1, column2, column3,... FROM SCHEMA.TABLE') SELECT column1,column2,column FROM SQLTable
This stored procedure has worked just fine for us in test, to either the test or production Oracle boxes, but it now fails, and hangs, in production to either the test or production Oracle boxes.
Additionally, I can run the following query via Query Analyzer from our test box to both the test Oracle and production Oracle and it runs successfully (this is NOT used in our stored procedure code, but is presented here as an indication that I think there is something wrong with the settings on our production SQL box):
SELECT * FROM OPENQUERY('INSTANCE','SELECT * FROM SCHEMA.TABLE')
When I run this same query via Query Analyzer on our Production SQL box, to either the test Oracle or production Oracle, it hangs, and I have to kill the process, and restart the MSDTC service. Other queries that hang are: SELECT * FROM SERVER..SCHEMA.TABLE
Additionally, I noticed that when I used this method to kill the process I would see errors like the following in the Application Event Log on the SQL box:
The XA Transaction Manager attempted to perform recovery with the XA resource manager. The XA resource manager reported that recovery was unsuccessful. DSN = MTxOCI.Dll.
Since I figured this was an aborted transaction still residing in the MSDTC log file, I would stop the MSDTC service, delete the MSDTC log file, reset the MSDTC log, and then restart the MSDTC service in order to prevent this error from occurring.
Not ALL queries from the production SQL box to production and test Oracle boxes fail. I can get results returned for this query:
SELECT COLUMN1, COLUMN2 FROM SERVER..SCHEMA.TABLE
I've been scouring the internet for about a week now, and I've run out of ideas on what to check on the production SQL box. Any suggestions would be greatly appreciated.
Hi, I have this oracle query with outer join situation. how can i convert it into sql server query.
SELECT distinct ae.dB_CONTRACT,CP.PC_CODE,BID_ITEM.ITEM_NO, 'N',BID_ITEM.PRICE_WORDS,OFF_ITEM.DESCPT, OFF_ITEM.UNITS,OFF_ITEM.TYPE_ITEM, PRES_ITEM.RET_PERC FROM BID_TOTAL,BID_ITEM,OFF_ITEM,PRES_ITEM, AE_CONTRACT AE, CONTRACT_PC CP WHERE RANK_NUMB = 1 AND BID_TOTAL.DB_CONTRACT = 37044 AND BID_TOTAL.DB_CONTRACT = BID_ITEM.DB_CONTRACT AND BID_TOTAL.BID_VENDOR = BID_ITEM.BID_VENDOR AND BID_ITEM.DB_CONTRACT = OFF_ITEM.DB_CONTRACT AND BID_ITEM.ITEM_NO = OFF_ITEM.ITEM_NO AND OFF_ITEM.ITEM_NO = PRES_ITEM.ITEM_NO (+) AND AE.DB_CONTRACT=BID_TOTAL.DB_cONTRACT AND CP.DB_CONTRACT = AE.DB_CONTRACT AND CP.pc_code = 1