SQL Server to Oracle transition
Hi,
I am SQL server DBA and application developer. At this point I decide to switch my career path to Oracle technology.
Is there any resource to help me transfer my SQL server knowledge to Oracle faster?
Any help would be appreciated,
Alan
Well, as you have worked in SQL Server, I believe it wont be a big problem to work with oracle. All the RDBMS rules are same, they may differ in syntaxes. You can search for the comparision between oracle and sql server on google, you will get tons of papers on it.
start with oracle dcoumentation, download from otn.oracle.com site, post your doubnts/question here in the forum, or search in http://asktom.oracle.com site.
Jaffar
OCP DBA
Similar Messages
-
SQL Server to Oracle migration with SQL Server DTS
I migrate database from SQL Server to Oracle with SQL Server DTS. the process is success. I can select table_name from user_tables or user_objects. I also can see the table from DBA Studio. But When I use desc to list the structure of table in SQLPLUS. it tell me object don't exist.
What is wrong?
Thanksuse sp_help <tablename>
-
Migrating a table with BLOB field from SQL-Server to Oracle.
Hi All,
I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
The Code:
package br.com.infox;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
public class Migrador {
public static void main(String[] args){
try {
// Conex�o com o SQL Server
Class.forName("net.sourceforge.jtds.jdbc.Driver");
Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
// Conex�o com o Oracle
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
Statement stSQL = conSQL.createStatement();
String querySQL = "SELECT * FROM DOC_INCORPORADO";
ResultSet rsSQL = stSQL.executeQuery(querySQL);
String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
"DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
PreparedStatement psORA = conORA.prepareStatement(queryORA);
while (rsSQL.next()){
System.out.println("Linha: " + rsSQL.getRow());
psORA.setInt(1, rsSQL.getInt("nu_processo"));
psORA.setInt(2, rsSQL.getInt("ano_processo"));
psORA.setInt(3, rsSQL.getInt("cd_usuario"));
psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
psORA.setString(5, rsSQL.getString("complemento"));
psORA.setString(6, rsSQL.getString("nm_arquivo"));
psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
psORA.setInt(8, rsSQL.getInt("num_seq"));
psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
psORA.setInt(10, rsSQL.getInt("mes"));
psORA.setInt(11, rsSQL.getInt("ano"));
psORA.executeUpdate();
stSQL.close();
psORA.close();
conORA.close();
conSQL.close();
} catch (Exception e){
e.printStackTrace();
The ERROR:
java.sql.SQLException: Exce��o de E/S: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at br.com.infox.Migrador.main(Migrador.java:41)
What's the problem of these Class?
Thank's.Depending on the version of the database you have, you could use transportable tablespaces.
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370 -
Hello,
I use Entity Framework code first approach.
My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
But, Is this possible to access SQL Server and Oracle in the same project.
Thanks,
MuruganThis should be possible with a Code-First workflow. In Code-First the database mapping layer is generated at runtime.
David
David http://blogs.msdn.com/b/dbrowne/ -
How to connect to a Sql server from Oracle using db link
Hi All,
Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
Thank you,
Praveen.we have 2 products - DG4MSQL and DG4ODBC.
DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
Check out Metalink and you'll find notes how to configure both products.
For a generic overview:
Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
And the setup notes:
DG4ODBC
Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
DG4MSQL
Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux -
Related to migration of db from sql server to oracle 11 g
We're trying to migrate a Sql server managment studio database to Oracle 11g using SQL Developer 4.0. We can successfully connect to both Sql server managment studion 8.0 and Oracle 11g using the tool, as well as click through the Migration Wizard and start the migration.
This opens the Database Migration dialog box, which indicates the capture process starts normally. we get the following error:
ora :01440 : can not insert null into migrlog (id column) ,
\and then after some time , i get an error that migration failed
i am not getting the reason,I thing it may be due to reason that , I have table's column in my source db with more than 30 character.
If i am migrating one by one table . then it is not giving any error, and identifier name is getting shrink in 30 character. but i am not getting the view , stored procedure , indexes , and others
then what is the solution for that, somebody pls suggest any help?????????????Pl do not post duplicates - related to migration of db from sql server to oracle 11 g
Continue the discussion in your original thread
The error message is explicitly clear
ora :01440 : can not insert null into migrlog (id column)
Your process is trying to insert a NULL value into the ID column, which presumably cannot be NULL -
Different output of same query in SQL Server and Oracle
I have two tables table1 and table2
--table1 has two columns c1 int and c2 varchar. there are not constraints added in it. it has data as given below
c1 c2
6 d
5 j
102 g
4 g
103 f
3 h
501 j
1 g
601 n
2 m
--table2 has only one column c1 int. there are not constraints added in it. it has data as given below
c1
6
1
4
3
2
now when i run below given query in sql server and oracle it gives me different result
select *
from table1
inner join (SELECT ROW_NUMBER() OVER (order by c1 ASC) AS c1 from table2) table2 on table2.c1=table1.c1
sql server output
c1 c2 c1
1 g 1
2 m 2
3 h 3
4 g 4
5 j 5
oracle output
C1 C2 C1
5 j 5
4 g 4
3 h 3
1 g 1
2 m 2
If you notice the first column in both output. It is sorted in sql server and not in oracle.
Why it is behaving differently in oracle? Is there any way I can solve this in oracle?
Thanks,
JigsIt is NOT behaving "differently" in Oracle; you just haven't specified an order that you expect your results to be in, so you're going to get output in whatever order the database fancies displaying it (ie. no guarenteed order). This is an artifact of how the database chooses to put together the data, and different databases (or even datasets within the same database) can and most likely will behave differently.
Even SQL Server won't guarentee to always get your data in an ordered fashion if you exclude the order by clause, even if you think it has always output the data in an ordered fashion.
Your solution is to add an order by clause, in BOTH databases, to force the order of the output data. -
CONVERT function in SQL Server to oracle
All,
How to convert CONVERT function in SQL Server to oracle, below mentioned format is in SQL Server:
variable1 = convert(numeric(20), SUBSTRING( parameter1,parameter2,parameter3)
parameter1 datatype nvarchar2(100)
parameter2 datatype bigint
parameter3 datatype bigint
I did bit R&D, but was not successful..but still getting on..
If any help that would be great...
Regards,
~ORAYou cannot specify the precision/scale or length of input paramters to a stored procedure in Oracle, or at least the pl/sql engine does not respect the sizing. Assuming that you want to do something with variable1 in the procedure, and not just return it, the Oracle equivalent would be something along the lines of:
SQL> CREATE FUNCTION f (p_param1 IN VARCHAR2,
2 p_param2 IN NUMBER,
3 p_param3 IN NUMBER) RETURN NUMBER IS
4 l_var1 NUMBER(20) := SUBSTR(p_param1, p_param2, p_param3);
5 BEGIN
6 RETURN l_var1 * 10;
7 END;
8 /
Function created.
SQL> SELECT f('ABC10DEF', 4, 2) FROM dual;
F('ABC10DEF',4,2)
100You may need to adjust the return type to match what you are actually returning.
You can also use this iin a direct assignment in pl/sql without doig a select, something like:
SQL> DECLARE
2 l_num NUMBER(20);
3 BEGIN
4 l_num := f('ABC10DEF', 4, 2);
5 DBMS_OUTPUT.Put_Line('The number is: '||l_num);
6 END;
7 /
The number is: 100John -
How to replicate data from MS SQL Server to Oracle
Hi,
Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.Dear,
I'm a student.
I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
Do you show me the technology to do that ?
Thanks ! -
Access Oracle from SQL Server using Oracle Provider for OLE DB
Using
- SQL Server 2000 SP4
- Oracle 10g
- Oracle10g Provider for OLE DB Version 10.1.0.4.0
- Oracle 10g client
Able to create linked server in SQL server to Oracle 10g and display list of tables in Oracle. However, when execute query, it gives
Server: Msg 7320, Level 16, State 2, Line 1
Could not execute query against OLE DB provider 'OraOLEDB.Oracle'.
OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' ICommandText::Execute returned 0x80040155].
Any idea what is the problem ?I'm having the same error message...But I'm connecting to a Oracle 8i DB......
I think this has to do with SP4 for SQL....I will test this tonight.... -
Regarding the tns-12541 error in connecting to sql server from oracle
i need to create a database link from oracle on windows box to sql server.I configured everything but when i am trying to tnsping the sqlserver
it throws me an TNS12541 no listener error.
The listner status is up and the listener workslittle confusion here, are you trying to tnsping sql server? tnsping is an Oracle utulity.
To acces sql server from Oracle you may use Transparent Gateway for Microsoft SQL - http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/ch3.htm#sthref66 and Heterogeneous Connectivity - http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/intro.htm#sthref33
Best regards. -
Migration from SQL server to Oracle
Hi,
Has anybody done migration from the SQL server to Oracle? If so, what manual method do you recommend? I'm a new college grad and I would like to get your expertise, if you have done this in the past.
Thanks in advance!
ShoIt is some time back, so I do not remember the specifics. Oracle gives Oracle Migration Workbench for free. You can use it to convert all SQL tables and procedures etc to oracle. It is not that difficult. If there are no stored procedures etc, you can just extract the DDL and create the tables with minor changes to the script. You might need bcp-sqlloader/trasparent gateway etc copy the data.
Giby -
Migration from SQL server to Oracle 10g
Hi, I am new here,
I would like to ask how to use SQL developer MWB to migration SQL Server to Oracle?
I have go through the doc(s) like: getting start, user's guild, etc. and have following problems
(1), where should the SQL developer installed? in SQL Server side? Oracle side? or any PC with connection to the databases?
(2), do I need to get some plug-in(s) for MWB to work? If yes, which plug-in do I need and where are they?
Thank you very much.Hi Chocobo,
I put together a Quick Guide myself
http://dermotoneill.blogspot.com/2008/06/sql-developer-migration-workbench-151_11.html
I updated it to answer your questions.
Hope that helps
Dermot. -
Migration from SQL Server to Oracle 8i
Hi,
what are the general issues to be considered when migrating a database from SQL server to Oracle 8i.
Is it documented on the web/ or any publication
SamitWhat we did was to create the schema using migration work bench and then transfer the data using data junction
The main issues that you have to handle are
1) Data type issue, here problem comes converting chars to varchars as chars are padded and may not work in indexes, so you have to trim the afterwards, and if you have any image type data types in Sqlserver, you can use either lobs or long raw, it again depends upon your application, if you uses lobs you may have to recode your application
2) Sql statements, Oracle cannot understand Sqlserver sql statements, so you have to convert them all. Sqlserver allows two outerjoins to a table, Oracle does not, so you have to modify your functionality
3) Connections to the database. if you are using ODBC then use Oracle ODBC drivers and the latest ones, otherwise you may encounter memory leaks.
These are from the top of my head, if you have any specific problem I may be able to help.
Good luck -
How to extract incremental data from SQL server to oracle tables in ODI
HI All,
In my ODI sql server is install.My Source is in SQL server and my target is in Oracle.
I need to create a interface mapping where i need to extract incremental data from sql server to oracle.
There is a datetime(with Timestamp) field in sql server .I need to pull incremental data based on dateime.
Example = tablename.DateTime > (select '1-jan-11' from dual) .....i am using this query but its not woking.the error is Invalid object name"dual".
We are not going to use Incremental in IKM and LKM.
Request you to please provide any suggestion ASAP.
Thanks,
LonyYou can do that via Variable.
In the interface mapping create a filter on Tablename.DateTime
and put the condition like this
Tablename.DateTime BETWEEN #VAR and in the variable use this query in refreshing tab with oracle schema
SELECT max(start_time)||' AND '||max(END_TIME)+1 from audit_table where ETL_JOB_CODE = '20'In the package call the above variable in refresh mode and then interface.
This way you will pass from the query between and condition date and pass to interface so that SQL Server fetches the data between those too range.
Note:- You might need to tweak the date format so that SQL Server can understand.
Hope this helps.
Maybe you are looking for
-
ICal calendars not syncing with iPhone 4 running iOS 4.0.2
I have an iPhone 4 running iOS 4.0.2 I'm using iCal on my MBP running Mac OS 10.6.4 I have a MobileMe account. Never had an issue with calendars syncing with the iPhone previously. I am using MobileMe Calendar Beta. This now displays my calendars in
-
recently had to purchase a replacement phone a friend of mine had backed up the data on the lost phone to his Mac laptop how do I get that backed up data from the lost iPhone that's on his Mac laptop to my new replacement phone? Please give step by s
-
How can I uninstall iDVD '08 and install iDVD '06?
There's a reported bug among iDVD '08 users where burning large projects are resulting in audio synch problems near the end of the burned DVD. In other words, the audio slowly goes out of synch towards the end of burned projects. This is a problem in
-
More item categories than attached to the document type
Hi Friends, When i checked the possible item category list for a item for a given sales order, there are many item categories than that of the item categories assigned in the VOV4. Could any body guide me, if there are any other way this can be linke
-
Shuts down instead of logging in
When I go to log in, my computer shuts down instead of logging in, after I've entered my password and hit enter. My computer has been acting a little odd lately, closing Safari while I'm using it, freezing for unusually long periods of time, etc. I h