How to migrate sql server 2000 user defined function returns table

Hi,
How do I capture the SQL Server 200 user defined function that returns table? Is this supported in the current version of Oracle Migration Workbench? I am using the latest version - Release 9.2.0.1.0 with SQL SERVER 2000 plug-in.
I was able to capture the SQL Server 2000 user defined function that returns string and smalldatetime but not the functions return table during the migrate data source stage.
Thanks in Advance,
Susan

Susan,
This is not currently supported. The next release of the Oracle Migration Workbench (due very soon), will do a better job of catching this mad reporting an error. We are looking into a suitable mapping and have created bug # 2355073 - TABLE DEFINITIONS NOT ACCEPTED FOR TABLE FUNCTIONS to track this issue.
Once possible solution we are looking into is using the object type to emulate. Here is an example from the bug:
Original table
SQL> create table tabela (a number, b number, c number, d number);
SQL> insert some values...
SQL> select * from tabela;
A B C D
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
SQL Server 2000 code
CREATE FUNCTION FUNCRETORNATABELA()
RETURNS TABLE
AS
RETURN SELECT A,B,C,D FROM TABELA
SELECT A,B,C,D
FROM FUNCRETORNATABELA()
ORDER BY A
Oracle code (workaround)
SQL> create or replace type MyObjType as object (
2 a number, b number, c number, d number);
3 /
Type created.
SQL> create or replace type MyTabType as table of MyObjType;
2 /
Type created.
SQL> create or replace function teste return Mytabtype pipelined as
2 aa MyObjType := MyObjType(null, null, null, null);
3 cursor c1 is select a,b,c,d from tabela;
4 begin
5 open c1;
6 loop
7 fetch c1 into aa.a, aa.b, aa.c, aa.d;
8 exit when c1%NOTFOUND;
9 pipe row (aa);
10 end loop;
11 close c1;
12 return;
13 end;
14 /
Function created.
SQL> select * from table(teste);
A B C D
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
SQL> select a, c from table(teste) order by c desc;
A C
4 4
3 3
2 2
1 1
Donal

Similar Messages

  • How to connect Sql Server 2000 using JDBC ODBC Driver

    How to connect Sql Server 2000 using JDBC ODBC Driver ?
    plz Send Syntax.
    thanks

    In SQL Server 2000 the driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver
    The connection URL for the default SQL Server 2000 database is jdbc:sqlserver://localhost:1433
    Class.forName(
      "com.microsoft.sqlserver.jdbc.
      SQLServerDriver");
    String url =
      "jdbc:sqlserver://localhost:1433";
    Connection conn = DriverManager.
      getConnection(
      url, "sa", "sqlserver");

  • Migration sql server 2000 to oracle 9i

    Hi
    I migrate sql server 2000 to oracle 9i
    when i capture Microsoft Sql Server it gives an error
    oracle.dbtools.metadata.persistence.PersistenceException: ORA-04098: trigger 'MIGRATIONS.MD_PROJECTS_TRG' is invalid and failed re-validation
    I try it again and it starts but it doesn't stop until clicking cancel or close
    what is the wrong?
    Thanks

    Hi,
    You are hitting a know issue using a repository created in 9.2.
    To show this is the case do the following -
    SQL> alter trigger MD_PROJECTS_TRG compile ;
    Warning: Trigger altered with compilation errors.
    SQL> show errors
    Errors for TRIGGER MD_PROJECTS_TRG:
    LINE/COL ERROR
    3/9 PL/SQL: Statement ignored
    3/20 PLS-00905: object MIGREP.MD_META is invalid
    Compiling md_meta -
    SQL> alter package md_meta compile ;
    Warning: Package altered with compilation errors.
    SQL> show errors
    Errors for PACKAGE MD_META:
    LINE/COL ERROR
    0/0 PLS-00908: The stored format of MD_META is not supported by this
    release
    21/4 PLS-00114: identifier 'PUTBAIFZKA3IHSJ5AC4ZXWYAWG41KN' too long
    21/4 PLS-00707: unsupported construct or internal error [2702]
    SQL>
    ==
    If you get this then the only alternative is to create the SQL*Developer repository in a 10.2 database.
    Regards,
    Mike

  • Migrating SQL server 2000 to Oracle9i/10g

    hi
    i want to migrate SQL server 2000 database to Oracle9i database,
    and i have downloaded the file OMWB.Zip from OTN.
    but i did not find the Sql sever2000 plug-in.
    plz send the link where i can get sqlserver plug-in. (SqlServer2k.jar file)
    or anyone plz mail me this SqlServer2k.jar file,my mail id is:
    [email protected]
    its very urgent. plz help me out.
    Dwaipayan Das

    Hi Dwaipayan,
    SQL Server migrations are not supported by the (old)OMWB anymore.
    This functionality has been moved into the SQL Developer Migration Workbench.
    SQL Server migrations are a built in feature of SQL Developer, which you can download for free here.
    http://www.oracle.com/technology/products/database/sql_developer/index.html
    Before downloading you can take a look at this viewlet demonstrating the migration of SQL Server Northwind database.
    http://www.oracle.com/technology/tech/migration/workbench/viewlets/sqlserver.html
    All the new migration features are based around SQL Developer.
    Heres are new page
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    Regards,
    Dermot.

  • How to Use Sequence Object Inside User-defined Function In SQL Server

    I'm trying to call sequence object inside SQL Server user-defined function. I used 
    Next Value for dbo.mySequence  to call the next value for my sequence created. But I'm getting an error like below.
    "NEXT VALUE FOR function is not allowed in check constraints, default objects, computed columns, views, user-defined functions, user-defined aggregates, user-defined table types, sub-queries, common table expressions, or derived tables."
    Is there any standard way to call sequence inside a function?
    I would really appreciate your response.
    Thanks!

    The NEXT
    VALUE FOR function cannot be used for User Defined function. It's one of the limitation.
    https://msdn.microsoft.com/en-us/library/ff878370.aspx
    What are you trying to do? Can you give us an example and required output?
    --Prashanth

  • Trying to migrate SQL Server 2000 to Oracle 10g.

    Hi.
    I´m trying to migrate from Sql Server 2000 to Oracle 10g and I got some troubles.
    I have connected both databases with my Oracle Sql Server, after that I went to the Menu--> Migrate--> Fast Migration and then fill all the steps necesary.
    I can see the repository`s table at the oracle schema but after that the Sql Developer hang at the point "capture". I let the tool work for 2 hours and nothing to do. It´s not a hughe db so could be done faster.
    May I miss something?.
    Thanks.

    Hi
    I also have similar issue when trying to migrate from MS SQL 2005 to oracle 10g.
    I use the SQL Developer Version 2.1.0.63.
    First, I tried to use 'Quick Migration' then it created repository then stop there with error message
    "Error ocurred during capture: ORA-01400: cannot insert NULL into ("DDHCOWNER"."MD_PROJECTS"."ID")"
    Then, try manual way to capture SQL server, but some how it doesn't work. It just refresh IDE and stop.
    Before this activity, I tried to migrate MS SQL 2005 using 'Quick Migration' and it works. But this time I have to do it on another DB then this happened.
    So I re-try the previous connection then encountered the same to all.
    Thus, please kindly help to advice how to solve this problem.
    Thank you so much.
    Regards,
    Sai Lin Naung

  • Migrating SQL Server 2000 to Oracle 9i

    Hi
    I will explain system first.The current system has Delphi 5 as Front -End and SQL Server 2000 as Back -End
    Now i want to make the Delphi 5 Application compatible with both SQL Server 2000 and Oracle 9i.
    What all things should be taken in to consideration for this process????
    Ren

    Looking forward for HELP
    I will explain system first.The current system has Delphi 5 as Front -End and SQL Server 2000 as Back -End
    Now i want to make the Delphi 5 Application compatible with both SQL Server 2000 and Oracle 9i.
    What all things should be taken in to consideration for this process????
    Ren

  • How to apply dll file or user defined function in B1

    Dear all,
    I have dll file and user defined function which use for converting number amount to text of my language. I plan to create UDF to keep the result of function on A/R invoice and I will use this UDF on print layout desiner but I don't know how to apply my function on B1. Please kindly suggest.
    Thanks you in advanced.
    Angnam

    Hi Angnam,
    Check this link.
    Re: amount in words
    Thanks,
    Srujal Patel

  • How to migrate SQL Server image data type to Oracle 8 BLOB data type?

    Hi,
    I have to migrate data from sql server to Oracle 10 g.
    I am unable to migrate image data type from sql server to blob data type in oracle.
    Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
    I am getting the following error-
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
    Can any one suggest me how to migrate Image datatype to BLOB???

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • How to migrate sql server image type to oracle BLOB

    In SQL Server table I have Image data type field. How to migrate image type field to oracle BOLB type field. I am using SQL server DTS to transfer the data.
    If we map, will it care ?
    Thanks,
    Venkataraman L

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • How to export sql server 2000 into oracle intergrally?

    1.environment:
    sql server 200 - character set: CHINESE_PRC_CI_AS
    tables :include ntext field (I think it equals clob)
    support english,simple chinese character.
    oracle 9i - character set :NLS_LANG=AMERICAN_AMERICA.US7ASCII
    2. aim
    export sql server objects(main is tables) into oracle intergrally
    3.question:
    3.1 the field which includes chinese data,after exporting,displays "????" code.
    3.2 how to export sql ntext field into oracle?
    thanks a lot

    You need to setup your Oracle Database use character set that support Chinesre Character. For example a unicode character set AL16UTF16.
    More information her
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14225/ch6unicode.htm#i1006691
    Also consider use Oracle Migration Workbench to transfer SQL Server Data
    http://www.oracle.com/technology/tech/migration/workbench/files/mig_rel10104.html

  • Error migrating SQL Server 2000 database to Oracle.

    Hi,
    I am new in SQL Developer.
    I read most of the help manuals available on the net.
    I am able to create connections to both SQL Server and Oracle database.
    I am also able to create the migration repository on the Oracle database.
    SQL server connection - TestSQL
    Oracle database connection - TestOracle
    Migration Repository - Migration_Repository.
    Here is the problem am facing:
    When I start Migrate to Oracle wizard, by right clicking the TestSQL database, I followed all the required steps and enter the necessary information. -
    It starts creating the project - say, TEST but after that it gave the following error:
    Migration actions have failed. Check the migration report for more details. : ORA-01400: cannot insert null into ("MIGRATIONS"."MD_PROJECT_ID").
    Please help.

    Thanks for your reply.
    You are correct, there were some permission missing on the migration repository user.
    I have given permissions and it worked fine.
    but I can say that required permission mentioned in other posts and blogs on the Internet are not sufficient.
    One has to provide more admin priviligies to this user.

  • Errors while migrating SQL Server 2000 to Oracle 11g

    Followed instructions from Oracle as far as running OMWEB_OFFLINE_CAPTURE.BAT with parameters:
    # OMWB_OFFLINE_CAPTURE.BAT mapper mapper mwrep_orcl WSSTCWKS401
    (where mapper/mapper is a new user I created on the SQL Server DB, mwrep_orcl is the Oracle repositiry database and WSSTCWKS401 my workstation name.
    The script starts OK then throws out all the following errors:
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysusers'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.syspermissions'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysprotects'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysobjects'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.syscolumns'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.systypes'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysindexes'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysindexkeys'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysreferences'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysconstraints'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.syscomments'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysfiles'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysmembers'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysforeignkeys'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object nam
    e 'mwrep_orcl.dbo.sysproperties'.
    SQLState = 37000, NativeError = 8180
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could
    not be prepared.
    I am an SQL Server newbie but very experienced Oracle Developer.
    Anyone make any helpful suggestions?
    Thanks,
    Jeremy

    Your information is a little bit missleading:
    "where mapper/mapper is a new user I created on the SQL Server DB, mwrep_orcl is the Oracle repositiry database and WSSTCWKS401 my workstation name"
    Please pay attention all parameters specified calling the batch file are SQL Server related parameters. See the batch file for more info:
    echo ----
    echo ---- OMWB_OFFLINE_CAPTURE login_id password database_name server_name
    echo ---- where,
    echo ---- login_id is a login id which has been granted db_datareader
    echo ---- and view definition on database_name
    echo ---- password is the password for the login id
    echo ---- database_name is the name of the database you wish to capture
    echo ---- server_name is the name of the server on which the database resides
    echo ---- For example,
    echo ---- OMWB_OFFLINE_CAPTURE sa sapwd employeeDB DEPT1_SERVER
    echo ----
    So the database_name is the SQL Server database name you want to capture and server_name is the server which contains your SQL Server database.
    Do your settings follow these rules? If not, please correct and retry.
    If your settings are correct, what permissions did you grant to mapper?

  • How to export values to a user defined function

    Hi Experts,
    I want to create a function module under FUNCTION EXIT_SAPMIWO0_020.How to access these values into the called function?
    I tried it using IMPORT parameters of the called function.But while debugging I am not getting these values.
    Can any1 suggest a solution for this problem?
    Regards,
    Sam.

    > Earlier I was using RFC enabled function module for sending the mail under FUNCTION EXIT_SAPMIWO0_020
    You were using aRFC (starting new task: it starts immediately and asynchronously), not tRFC (transactional RFC: it starts only at the end of COMMIT WORK).
    > and the mail was getting delivered instantly.
    It was only because you were using RSCONN01 (preceded by commit of course), not because of the aRFC.
    > Here also I am using COMMIT WORK before
    > SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
    Well that's very strange it doesn't send the mail immediately! (see my answer below)
    Note that it is dangerous (for many reasons I don't need to explain here) to run COMMIT WORK, SUBMIT, and a few other statements, in a BAdI, especially when it's at save time. Prefer to use tRFC as I said (and not the aRFC).
    > Also the sent item of the mail in outlook is 50 minutes ahead of our system time
    > Is it the reason for a delay in mail delivery?
    As you call RSCONN01, the delay can only come from something external to SAP. Check the logs in SCOT, to make sure SAP has sent the mail immediately. In the mail you receive, look at the MIME information in the header of the mail, to check the times at which the mail is transferred from a server to another. Ask your administrator to help you.

  • Crystal Reports, MSSQL User Defined Function returns recordset

    Beginner here
    Desiring several reports having the same basic logic, I made an SQL table-valued function that returns a result set. It takes two parameters and returns a result set.
    When I select this function in the Standard Report Creation wizard, a parameter window pops up to enter the values for the parameters. I fill in the string and select today's date. Then it complains:
    Database Connector Error: 'ADO Error Code: 0x80040e14
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Line 1: Invalid procedure number (0). Must be between 1 and 32767.
    SQL State 42000
    Native Error: 1005 [Database Vendor Code: 1005 ]'
    These reports are an accessory to our main program that passes formula values, and I anticipate using formulas for the parameters.

    Beginner here
    Desiring several reports having the same basic logic, I made an SQL table-valued function that returns a result set. It takes two parameters and returns a result set.
    When I select this function in the Standard Report Creation wizard, a parameter window pops up to enter the values for the parameters. I fill in the string and select today's date. Then it complains:
    Database Connector Error: 'ADO Error Code: 0x80040e14
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Line 1: Invalid procedure number (0). Must be between 1 and 32767.
    SQL State 42000
    Native Error: 1005 [Database Vendor Code: 1005 ]'
    These reports are an accessory to our main program that passes formula values, and I anticipate using formulas for the parameters.

Maybe you are looking for

  • XML to ABAP Structure transformation

    Hi SAP,    Can anyone tell how to transform from XML to ABAP structure. The ABAP structure i'm getting in runtime. Please do the needful. Thanks in advance Vinod.

  • Oracle scripts and BO SQL

    Hi, It has been a huge benefit to discover that with MS SQL Server we can use not just single SELECT statement in BO but pretty extensive scripts, including creating variables, using multiple intermediate queries, etc. For example, attached is one pr

  • Update all alv (grid) displayed records to internal table

    Hi all, i want to update the records into the internal table which are changed by the user in the edit field. after he select save button. i  have to save the ALV grid displayed records in the internal table. hw can i do this ?

  • Is there a function module to import a value to abap memory

    Hi, My requirement is as follows. I have the following inputs. Input 1 = some value Input2 = ABAP Memory If I pass the above inputs to a function module it should import the value in Input1 to the ABAP Memory given in Input2. Is there any standard fu

  • Runs slow & locks up plus can't windows update & upgrade to professional

    HP 6250 desktop running windows seven. problems started after replacing hard drive.   Help please.....