SQL Server WaitFor Delay ' 00:00:15 ' equivalent in Oracle

Does anyone know of an equivalent of the SQL Server SQL command WaitFor Delay ' 00:00:15 ' equivalent in SQL Oracle?

Good, but I would say that if you do not understand WHY you wait 15 seconds then there is no need to wait 15 seconds.

After all, it costs money ONCE to write a customization, it costs money to infinity to run bad code every day...

Here's the code to put your DB in a useless loop.

The exact time it will take depends on how quickly your database, so increase the number of zeros for scale at the break you want.

select max(level)
from    dual
connect by level <= 1000000

Tags: Database

Similar Questions

  • filling of datetime column SQL Server with the data in the date column oracle

    After a lot of "finangling", I think I have my link dg4msql works well between Oracle and MSSQL.

    Now, what I'm trying to do, is fill a table in MSSQL with an Oracle table column values, whenever a new row is inserted in the Oracle table. I use a very simple trigger on the oracle table that goes basically like this:

    mware is dblink to MSSQL database, oracle col worth DATE and mssql col is of type DATETIME

    This is the relaxation: (edited to show only the column in question)
    ==================================================================================
    CREATE or replace TRIGGER < oracleowner >. INSERT_INTO_NVDB
    AFTER INSERT ON < oracleowner >. < oracletable > for each row
    BEGIN
    insert into '< mssqlowner > '. «< mssqltable > @mware «»
    (
    "load_date_time,"
    )
    VALUES)
    : new.loading_date,.
    );

    END;
    ==================================================================================

    Now, when you enter a record in the Oracle trigger triggers ok table but does not insert a date in the MSSQL table, the 'load_date_time' in the mssql table can have NULL values so I guess there just inserts a null value.

    When I activate the triggers on the table MSSQL, which then takes these values and inserts them into another table with values from other tables, inserting in the Oracle table fails because the relaxation on the MSSQL database tries to pass the date (which is empty) table MSSQL in another table where the datetime field is not null.

    I guess it's because Oracle date format is not compatible with MSSQL, which I think is "yyyy-mm-dd hh: mm:"- so I have to either convert the date format by default Oracle to match a MSSQL, or convert a char of the trigger value. (The developer of the side MSSQL says if I can convert it to a char value that should be ok too)

    I think that it is probably better to leave it in the date format, the best way to do this would be to put an "alter session set nls_date_format ="at the beginning of the trigger?

    Can I convert the date to char the trigger easily? If there is a better way to proceed in the way I approach it I'm all for it.

    Thank you!

    Hello
    Your best option is to explicitly convert dates Oracle in a format recognized by SQL * Server. It's more coding, but then you know exactly what is being inserted and you give more control, if anything changes. You can also code to handle null data.
    I'm not sure than to try to change the format of date to 'alter session... ". "do what you want.
    You can use "to_char" on a date into character data-

    To_char (, "HH24:MI:SSxFF of MON-DD-YYYY")

    and use any mask format supported.
    You also use 'to_date' to transform the character data in a date format, as well as 'to_char' and 'to_date' in combination.
    For example -.

    SELECT TO_CHAR (TO_DATE (October 27, 98 ',' DD-MON-RR'), 'YYYY') 'Year' FROM DUAL;

    This is all discussed in the documentation-

    Oracle® database
    SQL language reference
    11g Release 2 (11.2)

    where it also describes the different format masks.
    If you need further assistance on the use of to_date, to_char formats then ask in the forum SQL/PLSQL.

    SQL and PL/SQL

    where they have more experience.

    Kind regards
    Mike

  • SQL Server 2005 Datetime Datatype loading loading in the Oracle database

    Hi friends,

    I'm trying to load Sql Server 2005 (DateTime Datatype) in the Oracle Table that is defined as a Timestamp, is not loading Accurately.Please suggest me how to charge accurate data.

    BRK

    The best way to fix this is:

    Don't forget the format default date at Oracle (target)
    Convert the date to a string in the source to the same format as Oracle.

    Make sense?

  • Data migration from Oracle to SQL Server

    Hello

    I have the Oracle database in one or several table, I also blob data, i.e. images are stored, now I want to move that data to the sql server database, which is the best way to do this?

    I would like to test for a migration of the table that contains the image data in the Oracle database and invade the SQL Server table.

    How to test for an Oracle table data to SQL Server migration?

    But the first thing I want to confirm is that if the Image from Oracle DB to SQL Server DB data are possible? is there something must be supported during the migration?

    Thanks in advance.

    Kind regards

    Vishal

    Published by: 968331 on October 31, 2012 02:31

    I think that it is supported. The equivalent data type in sql server is IMAGE/varbinary (max)

    See the bottom of the article for the mapping of data types:

    http://weblogs.sqlteam.com/jamesw/archive/2010/07/28/datatypes-translation-between-Oracle-and-SQL-Server-part-1.aspx

  • Dblink Oracle to sql server, multiple database on the same server sql under a dblink

    Hi, we managed to set up an Oracle dblink to sql server and retrieve data.

    The user of sql server have been using via dblink has access to multiple databases on the same sql server

    But the question is how in oracle (if possible) prepend you the SQL access to this?

    For example:

    Sqlserver_prod has the user sqlserver_user which seems to be set up as default database sqlserver_db1

    But we have select access to sqlserver_db2

    all work well as sqlserver_user

    Select * from table_fromdb1

    Select * from dbo.table_fromdb1

    Select * from sqlserver_db1.dbo.table_fromdb1

    as does

    Select * from sqlserver_db2.dbo.table_fromdb2

    more in Oracle

    Oracle_db a dblink sqlserver_prod. World connection sqlserver_user

    everything works fine

    Select * from 'table_fromdb1"@sqlserver_prod '.

    Select * from 'dbo '. "table_fromdb1"@sqlserver_prod

    But how to (if possible) access from oracle

    sqlserver_db2.dbo.table_fromdb2

    without having to create a new sqlserver_db2_user referenced in a new dblink

    If oracle for oracle would be

    Select * from remote_oracle_schema.table@remote_oracle_db

    Hello

    You cannot select a table in a different SQL * database server from that to which the gateway instance connects.
    As stated in the documentation-

    Oracle® database gateway

    Installation and Configuration Guide

    11g Release 2 (11.2) for AIX 5 L Based Systems (64-bit), HP - UX

    Itanium, Solaris (SPARC 64-Bit), Linux x 86 operating system,

    and Linux x 86-64

    In the section.

    The example SQL Server multiple databases: Configuration of the modem router

    A separate instance of the gateway that is required for each SQL Server database. Each

    instance needs its own Gateway system ID (SID).

    ==========

    You will need to create a new instance of the gateway for the SQL * Server DB2 as well as a link separate db.

    Kind regards

    Mike

  • convert data from oracle to sql server functions

    In oracle, I get the result.

    floor ((trunc (INF. INFUSION_DTE) - trunc(S.BIRTH_DTE))/365.25) as PATIENT_AGE,)

    example: patient_age is 30

    How to write in sql server, looking for the same result as an oracle.

    CONVERT (VARCHAR (12), t.event_dte, 111) event_dte,.

    CONVERT (VARCHAR (12), p.birthday, 111) anniversary.

    Google is your friend... search for "sql server convert date of birth age" and you will get many examples. And here's one:

    DATEDIFF (hour, p.birthday, t.event_dte) / 8766 as age

    HTH,
    Brian

  • Oracle and SQL server database

    Hello

    Is there another way to directly see the data stored in the oracle database or I can see it only through an external tool such as SQL Server?

    Thank you

    J

    997282 wrote:
    Hello

    Is there another way to directly see the data stored in the oracle database or I can see it only through an external tool such as SQL Server?

    Thank you

    J

    What do you mean by "an external tool such as SQL Sever"?
    SQL Server is Microsoft's RDBMS product.

    Oracle data files are in a binary format that is known only to Oracle. (Like SQL Server data files are in a binary format known only to Microsoft). Unless you're talking about a binary dump, they can be "seen" by the published interface that is used by all clients. In the case of Oracle, these customers would include sqlplus and a multitude of third-party products, as well as programming languages that can make calls to the oracle SQL Developer interface. And in all cases, he will eventually return to pass SQL statements.

    What is your goal?

  • E.M.P. 11.1.2.2 configuration with SQL Server 2008 R2

    Hello

    I was wondering if he should place the sqljdbc4.jar under any folder EPM_HOME\MW file to connect to SQL Server 2008 when you configure using the EMP system configurator.

    I'm just be proactive and ask the question because I had to do the same thing when configuring with SQL Server 2008R2 ODI...

    Looks like Oracle don't like MS and visa versa... Why not include just this file JDBC installation.

    Thanks in advance!

    No you shouldn't need drivers for sql server additional to configure SQL SERVER in the configurator to EMP they are included as part of the configurator.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to convert MS SQL Server 2008 Stored Procedures of Oracle 11 g SPs?

    We have an application from MS SQL Server 2008. We want to migrate to Oracle 11 g.

    What is the recommended Oracle method for
    (1) migration of data (Tables, triggers, sequences, views etc..)
    (2) the stored Procedure migration.

    What is the recommended tool or method pls?

    We have 100s of MS Sql Server stored procedures. Then, needing a tool or method. We can rewrite all of them from scratch.

    Hello

    Let me clarify some of the issues that you mention. But I advise you to get some professional help with migration because:

    1. you must understand the architectural differences between SQL Server and Oracle. They are of different databases.
    2. understand data type mappings.
    3. understand the complete migration process. Just using the OTN article as a migration guide won't help because it just shows how use SQL Developer to this task.
    4. understand that 100% of successful Oracle conversion is not possible with all the tools. There will always be gaps, gaps in functionality, bugs etc. So there will be some amount of manual work involved.
    5. There are many other tasks involved in the migration that cannot be accomplished with SQL Developer.

    Get now your questions:

    1. in 3.1, there is migration option for the "capture of database in offline mode". It is under the Tools option. So in 3.1 we do not have a separate tab, called "Migration."
    2. use 3.1 because it is much better than 2.1 in terms of capabilities.
    3 migration Wizard is the easiest way to migrate. Where are you getting confused?
    4 "column data" seems to be a stored procedure in SQL Server. If it is not there in the underlying table, why he uses in the SQL statement in the procedure then? I think that we have a problem of "reserved word" with the name of column "Data". Will have to check that.
    5 VARCHAR (@max) must be mapped to VARCHAR2 (4000) in Oracle. It may be a bug in SQL Developer. So during the mapping of data type in the migration wizard, you can change the default mappings.

    Concerning

    Prakash

  • Oracle 10.2 64-bit to SQL Server 2000 (32-bit) through DG4ODBC and DBLINK

    Hi all

    I need to connect from Oracle to SQL Server through DB-LINK, and since my installation Oracle does not contain of HSODBC, I installed DG4ODBC.

    My current setup SW is:

    (1) oracle Server (64-bit):
    Operating system: Windows Server 2008 Standard SP2
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production 64-bit
    Gateway: Heterogeneous Agent 11.2.0.1.0 - 64 bit Production version built with Oracle Database Gateway for ODBC
    Oracle home: E:\oracle\product\10.2.0\db_1\
    Gateway home: D:\apps\product\11.2.0\tg_1\
    In addition, he performs a 10.0 ArcGIS/ArcSDE on Oracle.

    (2) MS SQL Server (32-bit):
    OS: Windows NT 5.2 SP2
    DB: Microsoft SQL Server 2000-8.00.2065 (Intel X 86)

    There are two headphones running (one of each installation, 10.2 and 11.2) which, I suppose, can lead to conflicts or reduce performance. As a restriction, I need the listener from 10.2 to continue

    unchanged running from ArcSDE Service use and re-create them is a pain.

    So my question is, how do I configure a (10.2) or two listeners (10.2 and 11.2) use DG4ODBC to connect to a remote SQL Server to Oracle?

    I have followed several threads in this forum, try different configurations but I can not connect successfully with the DATABASE LINK. In most cases, I get error ORA-28545 and ORA-02063.

    Can someone help me solve this problem? What I need to send more information, for example {SID} init. now, listener.ora, tnsnames.ora, clarifications etc?

    Thank you much in advance.

    Gaston.

    Hi, Gaston,.
    The following note describes the setting up Dg4ODBC on 64-bit Windows-

    How the installer DG4ODBC (gateway for ODBC Oracle database) on 64-bit Windows operating systems (Doc ID 1266572.1)

    You definitely need 2 separate listeners - one for the 10.2 RDBMS and one for the 11.2 Dg4ODBC. There should be no concern about the performance or other conflicts. The only thing to know is that listener DG4ODBC must use a different port than the 10.2 listener.

    Heike referred to as using a file odbc.ini, but it is necessary when setting up Dg4ODBC on Unix/Linux platforms. Under Windows, the database non-Oracle information in the system DSN that is used for the HS_FDS_CONNECT_INFO parameter in theinit .ora file DG4ODBC.

    Do the following-

    -Configure the gateway as Note 1266572.1 with a listener running of the ORACLE_HOME bridge, in your case D:\apps\product\11.2.0\tg_1\
    -create tnsnames.ora entry in the 10.2 RDBMS directory $ORACLE_HOME/network/admin for the gateway
    -create the database link in the RDBMS using the tnsnames.ora entry.

    If you still have problems then view the files following and information-

    -Gateway listener.ora
    -gatewayinit .ora
    -RDBMS tnsnames.ora
    -create database link statement

    Another point, because you're running on Windows 64 bits, then the ODBC driver that is referred to in the system DSN for the connection must be a 64-bit driver. You cannot use the 32-bit drivers with 64-bit DG4ODBC.

    Kind regards
    Mike

  • 10 gr 2 ODBC 64-bit Windows 2008 EE (64-bit) to sql server 2005 (32-bit)

    Hi all, I have a problem with the creation of a 10 g 2 64 bit Windows 2008 ODBC connection to sql server 2005 Windows 2003 32-bit

    1. I create a listener.ora following the 1521 port is for oracle DB and the 1522 is for sql server
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (= Extproc PROGRAM)
    )
    )

    SID_LIST_HSODBC_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = hsodbc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc)
    )
    )

    HSODBC_LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = localhost))
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC0))
    )
    )

    2. my tnsnames.ora resembles

    PRUEBA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = test)
    )
    )

    HSODBC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp (PORT = 1522))(HOST=localhost))
    (CONNECT_DATA = (SID = HSODBC))
    (HS = OK)
    )

    3. I created an inithsodbc.ora like that
    HS_FDS_CONNECT_INFO = hsodbc
    HS_FDS_TRACE_LEVEL = 0

    4. I have also set up the dns system and successfully tested.

    5. my link of database look like
    CREATE public DATABASE LINK "hsodbc.
    CONNECT to 'sysdba' IDENTIFIED BY 'masterkey' USING 'hsodbc. "

    6. when I run my select I get the following error
    Select * from dual@hsodbc
    *
    ERROR on line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Cannot retrieve the text of the message NETWORK/NCR 65535
    ORA-02063: preceding 2 lines HSODBC

    7. I look and the journal of listener_hsodbc
    April 14, 2011 08:14:49 * (CONNECT_DATA = (SID = HSODBC) (CID = (PROGRAM =) (HOST = DOMAINSERVER\SERVER_PRO)(USER=Administrator))) * (ADDRESS = (PROTOCOL = tcp (PORT = 51749))(HOST=127.0.0.1)) * establish * HSODBC * 12518
    TNS-12518: TNS:listener could not hand off client connection
    AMT-12560: TNS:protocol adapter error
    AMT-00530: Protocol adapter error
    Windows 64-bit error: 2: no such file or directory

    You have defined 2 separate listeners:
    The first is called listener and uses port 1521 which contains the DG4MSQL entry in the SID_LIST_LISTENER. The second listener is called LISTENER_D4GMSQL and is listening on port 1511 - but this listener has no section of SID.

    Your tnsnames.ora contains as port 1511, so when you try to use the link data base based on tnsnames.ora alias dg4msql connection is made to the LISTENER_DG$ MSQL (as this one is listening on 1511). But this listener does not have the SID DG4MSQL and so the connection fails.

    You can now change your configuration by editing the tnsnames.ora file by ensuring that you use the listening port that serves the DG4MSQL SID:

    dg4msql =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=localhost) (PORT = 1521))
    (CONNECT_DATA = (SID = dg4msql))
    (HS = OK)
    )

    # SIDE NOTE: Make sure the LISTENER named listener has been started and serves the SID DG4MSQL

    or by modifying your listener.ora file name change
    SID_LIST_LISTENER to SID_LIST_LISTENER_DG4MSQL
    Afterwards please, STOP and START the utility LISTENER_DG4MSQL lsnrctl listener.

  • How to migrate from SQL server to oracle 11g

    Hello
    I have a lot of tables in sql server, and I want to connect them in oracle

    Welcome to the forum,

    Hello
    To create a link Oracle with SQL Server follow these steps:
    1. install Oracle ODBC drivers on the server (your Oracle database local) who will have access to the remote SQL Server database by using the database link.

    2. configuration of the ODBC connection on the local Oracle using the Windows ODBC Data Source Administrator database

    3 test pilots to verify ODBC connectivity is made to the SQL Server database.

    4. make sure that your global_names parameter is set to False.

    5. configure Oracle heterogeneous services by creating an initodbc.ora file in the Oracle database.

    7 change the Listener.ora file.

    SID_NAME is the DSN for the remote database.
    ORACLE_HOME is the real path to the file at Oracle.
    PROGRAM says Oracle heterogeneous services.

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = Cas30C) - enter the DSN on this line
    (ORACLE_HOME = c:\oracle10gdb)--Inscrivez your Oracle home
    (Program = hsodbc)) )

    8. change the Tnsnames.ora file. It's accessed by users Oracle database installation connect for ODBC drivers

    (DESCRIPTION =
    (ADDRESS_LIST =
    (Address = (PROTOCOL = TCP)
    (HOST =
    -(X server)
    (PORT = 1521))) -Enter the port on which the server x installing Oracle
    -is listening
    (CONNECT_DATA = (SID = Cas30c)) - enter the name of the DSN
    (HS = OK)-enter this value. He indicates to Oracle to use transfer services
    )

    9 recharge the listener on a local Oracle database

    10. create a link of database on the local Oracle installation that accesses the heterogeneous connection, which, in turn, connect to SQL Server.

    11 execute SQL Select Server from the Oracle installation using the database link

    Thank you
    BelMan :)

  • Oracle pack data masking works with MS SQL Server?

    And if so, other required OEM packs (i.e. MS SQL Server plug-ins for monitoring system)?

    TIA

    I don't think that it supports MS SQL Server. Perhaps you could look into the Oracle transparent gateways for MS SQL Server. Perhaps in combination it might work.

    Best regards
    Martin
    www.ora-solutions.NET

  • SQL Server migration object renamin

    The situation I encounter is the migration of a SQL Server database to 10 g 2. The barrier, I'm trying to deal with, it is that a lot of names stored procedure SQL Server 900 + exceed the limit of 30 characters Oracle. Much it exceed 10 to 15 characters, and the last several characters are the part of the name that identifies only to identify and differentiate between other procedures with similar names. If I make the standard migration, many new names is shortened and have some arbitrary ending, such that I can't tell what new procedure migrated corresponds to a particular procedure from source.

    Rename procedures in the SQL Server would be ideal, but MS indicates that it is a bad idea (Nice, huh?) and I don't have sufficient privileges on this diagram to do anyway, so that the attractive option is unfortunately not available.

    With the large number of necessary procedures, tried to automating the process of name change using a java application (mine) to change the names in the schema captured in the migration repository before generating the Oracle model. I proceeded to change the NAME column, change the CLOB in the NATIVE_SQL column, replacing the old names by the new MD_STORED_PROGRAMS table. Unfortunately, when I then try to build the model of the Oracle of this "corrected" scheme, I get errors like "create procedure < proc_name > error: unexpected end of line subtree column 0 0" for each proc which I changed the data. " It seems that it is looking for another place and find the original name and launch a mistake if it believes that it does not have the new name I gave him in the process of automated renaming.

    I hope that someone else knows what other tables I need to change to fix the names, or in a different way or better for this task.

    Thank you!

    Hello

    It sounds like an "interesting" problem I'll try that. I hope I can find a solution or workaround for this problem.

    I will return to you as soon as possible.

    Best regards
    Wolfgang

  • equivalent of CLRSplitSting function for sql server Oracle

    Hello friends,

    I have a query in SQL Server - which becomes data.

    Select addl_info_id, sort_seq, code, row_data, addl_info_group_id, group_sort_seq, group_row_data from dbo. CLRSplitString('2406081,2410381,2427008,2430449,2466981,2495083,1586420,2406081,2410381,2427008,2430449,2466981,2495083,1586420','',',') x v join ein_addl_info_v on x.col1 = v.addl_info_id order by sort_seq
    We have same data in oracle too, so I converted the query above to sql to ORACLE like this server...


    Select addl_info_id, sort_seq, code, row_data, addl_info_group_id, group_sort_seq, group_row_data from (with t as)
    Select '2406081,2410381,2427008,2430449,2466981,2495083,1586420,2406081,2410381,2427008,2430449,2466981,2495083,1586420', ",","double str
    Select regexp_substr(str,'[^,]+',1,level) sub_str *) t connect by level < = regexp_count (str, ',') + 1) x *.

    Join cnh_cs_targ_csce_eur_1.ein_addl_info_v v x.sub_str = v.addl_info_id order of sort_seq


    but I don't get all the data. Can someone check if the query oracle above is equivalent to the above SQL query.

    Thank you/Kumar

    Published by: kumar73 on February 15, 2013 08:47

    So your query:

    select  addl_info_id,
            sort_seq,
            code,
            row_data,
            addl_info_group_id,
            group_sort_seq,
            group_row_data
      from      xmltable(
                         'ora:tokenize($str,",")'
                         passing ',2406081,2410381,2427008,2430449,2466981,2495083,1586420,2406081,2410381,2427008,2430449,2466981,2495083,1586420' as "str"
                         columns col1 varchar2(2000) path '.'
                        ) x
            join
                ein_addl_info_v v
              on x.col1 = v.addl_info_id
      order by sort_seq
    /
    

    SY.

Maybe you are looking for