#tablename in SQL Server

Hi all,
Now I am upgrading the VB program from SQL server to Oracle database server. In the previous code, I find some table name started with #. I think it may be the temp table for each user login session. How can I convert this in oracle database server? Does I need to create something in the oracle database server? How and what is the step? Please help!!!
Thanks for your big help!!!

here you have the complete reference to create tables. I hope can be useful for you:
CREATE TABLE
Purpose
Use the CREATE TABLE statement to create one of the following types of tables:
A relational table is the basic structure to hold user data.
An object table is a table that uses an object type for a column definition. An object table is explicitly defined to hold object instances of a particular type.
You can also create an object type and then use it in a column when creating a relational table.
Tables are created with no data unless a query is specified. You can add rows to a table with the INSERT statement. After creating a table, you can define additional columns, partitions, and integrity constraints with the ADD clause of the ALTER TABLE statement. You can change the definition of an existing column or partition with the MODIFY clause of the ALTER TABLE statement.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_73a.htm#SQLRF01402
Joel P�rez

Similar Messages

  • Ident_Current('TableName') not giving last inserted identity Value in SQL Server 2012

    Hi ,
    Ident_Current('TableName') is not giving last inserted identity Value in SQL Server 2012. 
    Latest Value of ID and Ident_Current is differing for that particular table.  
    Why its happening? Ident_Current value is greater than last inserted ID.
    Please guide me why its happening?

    Here is one example:
    CREATE DATABASE PMCtest ON (NAME = 'PMCtest', FILENAME = 'B:\ProdDB-Unzipped\PMCtest.mdf', SIZE = 25GB )
    LOG ON (NAME = 'PMCtest_log', FILENAME = 'B:\ProdDB-Unzipped\PMCtest.ldf', SIZE = 2GB)
    CREATE TABLE identity_crisis (a int IDENTITY NOT NULL PRIMARY KEY,
                                  b sysname NOT NULL CHECK (b <> 'sysschobjs'))
    go
    INSERT identity_crisis (b) VALUES ('First name')
    INSERT identity_crisis SELECT name FROM sys.objects
    go
    SELECT MAX(a), ident_current('identity_crisis')
    FROM  identity_crisis
    go
    DROP TABLE identity_crisis
    Because the second INSERT statement fails, the identity values from 2 to 12 are lost. This is a very intentional design to promote high concurrency. If you don't want gaps, you should not use IDENTITY, but roll your own.
    Also, beware that ident_current returns database-wide value, so if you insert one row, and another process inserts another row before you interrogate ident_current, you will get the id for the row of the other process.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • CHECK for duplicate inside a cursor and pass a ouptut parameter in sql server 2008

    Hi All,
    I am inserting a value into a table, Before inserting i am checking that record already exists or not in the target table, If its existsing i am making an entry into errorlog table and set the output parameter to 'errorlog' . This is inside the cursor, as
    il be passing multiple values. Next is I have separate query to get the new record which is not in the target table. Using EXCEPT i get the new record and i insert into a main table. after insertion i set output as 'success'. 
    Here while executing the procedure i pass a duplicate value and a new value. As it is in cursor,first it will insert into errorlog and set output parameter as 'errorlog' .Next it will insert a new record into main table and set output parameter as 'Success'.
    So on completion of the execution of the procedure i get output as success.
    But i should get as errorlog. I should get success only on no errors in the procedure. How i can i achieve this? Please help me.
    Below is my code
    IF NOT EXISTS(SELECT Beginmilepost,BeginTrackName,Endmilepost,EndTrackName
    FROM SSDB_Segment WHERE BeginMilepost>=@BegMP AND EndMilepost<=@EndMP AND SearchID = @SearchID AND Reference = 'Range')
    BEGIN
                     Declare C_Max1 Cursor FOR
    (SELECT Beginmilepost,BeginTrackName,Endmilepost,EndTrackName FROM SSDB_Segment WHERE BeginMilepost = @BegMP AND EndMilepost = @EndMP AND  BeginTrackName = @BegtrkName 
    AND EndTrackName = @EndTrkName  AND SearchID = @SearchID)
      Open C_Max1
      FETCH FROM C_MAX1 INTO @BeginMilepost,@BTrackName,@EndMilepost,@ETrackName
    WHILE(@@FETCH_STATUS=0)
    BEGIN
    IF OBJECT_ID ('tempdb..#temp') IS NOT NULL
    BEGIN
          DROP TABLE #temp
    END--IF
    Select BeginLatitude,BeginLongitude,BeginTrackName,BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix,EndLatitude,EndLongitude,EndTrackName,EndMilepost,TrainType into #temp
    FROM
    SELECT BeginLatitude= case when @BegLat = 0 THEN NULL ELSE @BegLat end ,BeginLongitude= case when @BegLong=0 THEN NULL ELSE @BEgLong end ,@BTrackName AS BeginTrackName,ROUND(@BeginMilepost ,3) AS BeginMilepost,
    BeginMilepostPrefix= CASE WHEN @BegPrefix = 'null' THEN NULL ELSE @BegPrefix END,BeginMilepostSuffix= CASE WHEN @BegSuffix  = 'null' THEN NULL ELSE @BegSuffix  END,
    EndLatitude=case when @EndLat =0 then NULL else @EndLat end,EndLongitude=case when @Endlong = 0 THEN NULL ELSE @Endlong END,@ETrackName AS EndTrackName,ROUND(@EndMilepost ,3) AS EndMilepost,@TrainType AS TrainType 
    UNION ALL
    select BeginLatitude,BeginLongitude,BeginTrackName,ROUND(BeginMilepost,3) AS BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix, EndLatitude,EndLongitude,EndTrackName,ROUND(EndMilepost,3) AS EndMilepost,TrainType from SSDB_MaximumPermissibleSpeed)data
    group by  BeginLatitude,BeginLongitude,BeginTrackName,BeginMilepost,EndLatitude,EndLongitude,EndTrackName,EndMilepost,BeginMilepostPrefix,BeginMilepostSuffix,TrainType
    having COUNT(*)>1
    SET @COUNT= (select count(*) from #temp )
    Print @COUNT
    IF @COUNT>=1
    BEGIN
     INSERT INTO ErrorLog_Asset (
                                        ErrorCode,
                                        ErrorMessage,
                                        TableName,
                                        MilepostPrefix,
                                        Milepost
    SELECT
                                     '1',
                                     'Already exists at BeginMp '+ CAST(@BeginMilepost  as varchar) +',EndMp '+ CAST(@EndMilepost as varchar) +' ,Beginlat
    '+CAST(@BegLat   as varchar)
                                     +' ,Endlat '+CAST(@EndLat   as varchar)+', BeginTrackName '+@BTrackName  +' and EndTrackName '+@ETrackName
                                     'MaximumPermissibleSpeed',
                                      CASE WHEN @BegPrefix = 'null' THEN NULL
    ELSE @BegPrefix END ,
    @BeginMilepost  
    SET @output = 'Errorlog'
    END
     IF OBJECT_ID ('tempdb..#Max') IS NOT NULL
    BEGIN
     DROP TABLE #Max
    END--IF
     Select BeginLatitude,BeginLongitude,BeginTrackName,BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix,EndLatitude,EndLongitude,EndTrackName,EndMilepost,TrainType into #Max from
           (SELECT BeginLatitude= case when @BegLat = 0 THEN NULL ELSE @BegLat end ,BeginLongitude= case when @BegLong=0 THEN NULL ELSE @BEgLong end ,@BTrackName AS BeginTrackName,ROUND(@BeginMilepost ,3)
    AS BeginMilepost,
                  BeginMilepostPrefix= CASE WHEN @BegPrefix = 'null' THEN NULL ELSE @BegPrefix END,BeginMilepostSuffix= CASE WHEN @BegSuffix  = 'null' THEN NULL ELSE @BegSuffix  END,
                  EndLatitude=case when @EndLat =0 then NULL else @EndLat end,EndLongitude=case when @Endlong = 0 THEN NULL ELSE @Endlong END,@ETrackName AS EndTrackName,ROUND(@EndMilepost ,3) AS EndMilepost,@TrainType AS TrainType 
    except
                 select BeginLatitude,BeginLongitude,BeginTrackName,ROUND(BeginMilepost,3) AS BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix, EndLatitude,EndLongitude,EndTrackName,ROUND(EndMilepost,3) AS EndMilepost,TrainType
    from SSDB_MaximumPermissibleSpeed)data
     Declare C_Max2 Cursor FOR
     Select BeginMilepost,BeginTrackName,EndMilepost,EndTrackName from #Max 
      Open C_Max2
      FETCH FROM C_Max2 INTO  @BeginMP,@BeginTrackName,@EnMP,@EnTrackName
    WHILE(@@FETCH_STATUS=0)
    BEGIN
       IF (Select COUNT(*) from tbl_Trackname )>=1
       BEGIN
     IF (@TrainType IN (SELECT TrainType  FROM SSDB_TrainType )AND (@Speed <>0) AND @BeginMP IS NOT NULL AND @BeginTrackName IS NOT NULL  AND @EnMP IS NOT NULL
     AND @Direction IN (SELECT Direction FROM SSDB_Direction) AND @EnTrackName IS NOT NULL )
     BEGIN-------------
     SET @ID = (Select MAX(MaximumpermissibleSpeedID) from SSDB_MaximumPermissibleSpeed)
    IF @COUNT =0
       BEGIN
                          INSERT INTO SSDB_MaximumPermissibleSpeed
    BeginMilepostPrefix,
    BeginMilepostSuffix,
    BeginMilepost,
    BeginTrackName,
    BeginLatitude,
    BeginLongitude,
    BeginElevation,
    EndMilepostPrefix,
    EndMilepostSuffix,
    EndMilepost,
    EndTrackName,
    EndLatitude,
    EndLongitude,
    EndElevation,
    Direction,
    Speed,
    TrainType,
    Description,
    InsertUser,
    S_ID
                                                     SELECT
      CASE WHEN @BegPrefix = 'null' THEN NULL
      ELSE @BegPrefix END,
                          CASE WHEN @BegSuffix = 'null' THEN NULL
      ELSE @BegSuffix END,
      @BeginMP ,
      @BeginTrackName  ,
      case WHEN @BegLat = 0 THEN NULL
      ELSE @BegLat END,
      CASE WHEN @BegLong=0 THEN NULL
      ELSE @BegLong END ,
      CASE WHEN @BegEle = 0 THEN NULL
      ELSE @BegEle END ,
      CASE WHEN @EndPrefix = 'null' THEN NULL
      ELSE @EndPrefix END,
                          CASE WHEN @EndSuffix = 'null' THEN NULL
      ELSE @EndSuffix END,
      @EnMP ,
      @EnTrackName  ,
      case WHEN @EndLat = 0 THEN NULL
      ELSE @EndLat END,
      CASE WHEN @EndLong=0 THEN NULL
      ELSE @EndLong END ,
      CASE WHEN @EndEle = 0 THEN NULL
      ELSE @EndEle END ,
      @Direction ,
      @Speed ,
      @TrainType ,
      CASE WHEN @Description ='null' THEN NULL
      ELSE @Description END ,
      @InsertUser ,
      @UID     
    INSERT INTO SSDB_MaxSpeed_History
                       MSID,
    BeginMilepostPrefix,
    BeginMilepostSuffix,
    BeginMilepost,
    BeginTrackName,
    BeginLatitude,
    BeginLongitude,
    BeginElevation,
    EndMilepostPrefix,
    EndMilepostSuffix,
    EndMilepost,
    EndTrackName,
    EndLatitude,
    EndLongitude,
    EndElevation,
    Direction,
    Speed,
    TrainType,
    Description,
    S_ID,
    NOTES ,
    [Action] ,
    InsertUser
                                 SELECT 
                          (Select MaximumPermissibleSpeedID from SSDB_MaximumpermissibleSpeed WHERE MaximumPermissibleSpeedID > @ID),
                          CASE WHEN @BegPrefix = 'null' THEN NULL
      ELSE @BegPrefix END,
                          CASE WHEN @BegSuffix = 'null' THEN NULL
      ELSE @BegSuffix END,
      @BeginMP ,
      @BeginTrackName  ,
      case WHEN @BegLat = 0 THEN NULL
      ELSE @BegLat END,
      CASE WHEN @BegLong=0 THEN NULL
      ELSE @BegLong END ,
      CASE WHEN @BegEle = 0 THEN NULL
      ELSE @BegEle END ,
      CASE WHEN @EndPrefix = 'null' THEN NULL
      ELSE @EndPrefix END,
                          CASE WHEN @EndSuffix = 'null' THEN NULL
      ELSE @EndSuffix END,
      @EnMP ,
      @EnTrackName  ,
      case WHEN @EndLat = 0 THEN NULL
      ELSE @EndLat END,
      CASE WHEN @EndLong=0 THEN NULL
      ELSE @EndLong END ,
      CASE WHEN @EndEle = 0 THEN NULL
      ELSE @EndEle END ,
      @Direction ,
      @Speed ,
      @TrainType ,
      CASE WHEN @Description ='null' THEN NULL
      ELSE @Description END ,
      @UID,
      NULL,
      'INSERT',
      @InsertUser 
    set @output='Success'
    --IF ((@COUNT >=1) AND (@COUNT =0))
    --BEGIN
    --  SET @output = 'ErrorLog'
    --END
    --IF (@COUNT = 0)
    -- BEGIN
    --SET @output ='Success'
    --END
    --END
    END
    END------------------------> 
    Deepa

    Hi Deepa,
    If I understand your question correctly, you would like the @Output parameter to contain the value "Success" only if all rows were successful. As soon as one row was found to be a duplicate, the value of @Output at the end of execution should be "ErrorLog".
    Currently, you modify the value of @Output in each iteration of the cursor, so at the end of execution you're left with the last value.
    In order to change that to work the way you want it, you need to set the value of @Output in the beginning of execution (before entering the cursor) to "Success", and as soon as there is a duplicate row, you should modify the value to "ErrorLog". This way,
    if all rows are successful, the value of @Output will be "Success" at the end of execution. On the other hand, if there is even a single duplicate row, the value of @Output will be "ErrorLog" at the end of execution.
    I hope this helps...
    Guy Glantser
    SQL Server Consultant & Instructor
    Madeira - SQL Server Services
    http://www.madeirasql.com

  • Msg 8631 Internal error: Server stack limit has been reached on SQL Server 2012 from T-SQL script that runs on SQL Server 2008 R2

    I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
    potentially deep nesting in your query, and try to simplify it.
    The script itself doesn't seem to be all that deep or nested.  The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012.  I'm just really baffled why something that SQL Server generated with very
    few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
    I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server.  This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
    amount of our time doing it the manual way.
    Below is an 'condensed' version of the script which fails.  I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
    Wizard and told it to save to script.
    declare @dbname varchar(MAX), @SQL nvarchar(MAX)
    declare c_dblist cursor for
    select name from sys.databases WHERE name like 'dbone[_]%' order by name;
    open c_dblist
    fetch next from c_dblist into @dbname
    while @@fetch_status = 0
    begin
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
    null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
    @del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
    EXEC sp_executesql @SQL
    SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
    = null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
    EXEC sp_executesql @SQL
    fetch next from c_dblist into @dbname
    end
    close c_dblist
    deallocate c_dblist
    George P Botuwell, Programmer

    Hi George,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Allen Li
    TechNet Community Support

  • JDBC with SQL Server

    Hi,
    I am trying to connect to a SQL server database by giving table name in (SPVC) database as spvc.dbo.tablename.. If i want to access another database (SPVC_D), how can i do it without changing my java code?? Can i be able to add the database name to the connection string and i can remove the hard coding (spvc.dbo.) from my java code?? How shall i be able to do that..
    Please let me know.. I am very new with JDBC with SQL server..
    Thanks
    Praveen Padala

    In the MS SQL Server that I use, the following syntax
    spvc.dbo.tablename
    Breaks done as follows...
    <database>.<user>.<tablename>
    However connections are always to a database. Thus when one uses the above syntax it basically runs 'in' the one database and accesses another.
    Depending on various attributes of the tables, if and only if, a table called 'tablename' exists in a database called 'spvc_d' then if you connect to 'spvc_d' then you can access 'tablename' just by using 'tablename'.
    So if that is what you are doing you will not have a problem.

  • 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?
    Thanks

    use sp_help <tablename>

  • How to only migrate data from SQL Server 2008 to Oracle 11?

    According to our requirement, We need to only migrate data from a SQL Server database to an existed
    Oracle database user.
    1) I tried to do it with SQL Developer 3.0.04 Migration Wizard, But find an issue.
    My SQL Server database name is SCDS41P2, and my Oracle database user name is CDS41P2;
    When I used SQL Developer to do offline move data by Migration Wizard, I found all oracle user
    name in movedata files which gotten by run Migration Wizard
    is dbo_SCDS41P2. If the Oracle user name is not the same as my existed Oracle user name,
    the data can't be moved to my existed Oracle user when I run oracle_ctl.bat in command line window.
    So I had to modify the Oracle user name in all movedata files, but it's difficult to modify them because there are many tables in
    databases. So could you please tell me how to get the movedata files which the oracle user name in them is my
    expected Oracle user name?
    2) I also tried to use the 'copy to Oracle' function to copy the SQL Server database tables data
    to the existed Oracle database user. When clicked 'copy to Oracle', I selected 'Include Data' and 'Replace' option
    But I found some tables can't be copied, the error info is as below:
    Table SPSSCMOR_CONTROLTABLE Failed. Message: ORA-00955: name is already used by an existing object
    Could you please tell me how to deal with this kind of error?
    Thanks!
    Edited by: 870587 on Jul 6, 2011 2:57 AM

    Hi,
    Thanks for you replying. But the 'copy to oracle' function still can't be work well. I will give some info about the table. I also search 'SPSSCMOR_CONTROLTABLE' in the target schema, and only find one object. So why say 'name is already used by an existing object'? Could you please give me some advice? Thanks!
    What is the 'Build' version of your SQL*Developer ?
    [Answer]:
    3.0.04
    - what does describe show for the SPSSCMOR_CONTROLTABLE in SQL*Server ?
    [Answer]:
    USE [SCDS41P2]
    GO
    /****** Object: Table [dbo].[SPSSCMOR_CONTROLTABLE] Script Date: 07/18/2011 01:25:05 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[SPSSCMOR_CONTROLTABLE](
         [tablename] [nvarchar](128) NOT NULL,
    PRIMARY KEY CLUSTERED
         [tablename] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    - what does describe show for the SPSSCMOR_CONTROLTABLE in Oracle ?
    [Answer]:
    -- File created - Monday-July-18-2011
    -- DDL for Table SPSSCMOR_CONTROLTABLE
    CREATE TABLE "CDS41P2"."SPSSCMOR_CONTROLTABLE"
    (     "TABLENAME" NVARCHAR2(128)
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    -- DDL for Index SYS_C009547
    CREATE UNIQUE INDEX "CDS41P2"."SYS_C009547" ON "CDS41P2"."SPSSCMOR_CONTROLTABLE" ("TABLENAME")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    -- Constraints for Table SPSSCMOR_CONTROLTABLE
    ALTER TABLE "CDS41P2"."SPSSCMOR_CONTROLTABLE" MODIFY ("TABLENAME" NOT NULL ENABLE);
    ALTER TABLE "CDS41P2"."SPSSCMOR_CONTROLTABLE" ADD PRIMARY KEY ("TABLENAME")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE;
    Edited by: 870587 on Jul 18, 2011 1:42 AM

  • How to get PDF iFilter to recognize "pdf" document_type instead of ".pdf" in SQL Server 2012

    Hi,
    If this isn't the correct forum for this question, I apologize.
    I am running SQL Server 2012 on a Windows 7 Pro (64-bit) laptop and wish to be able to perform Full-Text searches against the contents of PDF files that have been loaded into my database using a FileTable. I have not been able to get the PDF iFilter v11.0 working whatsoever so I uninstalled it and installed v9.0 of the Adobe PDF iFilter.  I have confirmed that this filtering works on PDF documents I've inserted into a regular table and specified the file_type as '.pdf'.  However, when SQL Server loads the documents into a FileTable, the filter_type is set to 'pdf' (note: the period is not included -- ".pdf").  When I issue the ALTER FULLTEXT INDEX <tablename> START FULL POPULATION, no indexing occurs against the FILETABLE.
    I've examined the Full-Text Search crawl log and there are no errors occurring. Simply messages stating the population is starting and then completed.
    I've searched the forums here and elsewhere and haven't been able to find a work-around for this.
    Is there any way to get the PDF iFilter to recognize the 'pdf' filter_type in addition to the '.pdf' filter_type?
    Any suggestions would be greatly appreciated.
    Thank you,
    Steve

    Hi Steve,
    These links might e helpful:
    https://dotnettim.wordpress.com/2010/12/02/sql-server-full-text-indexing-using-adobe-pdf-i filter-9-sql-server-2008-r2-64bit/
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/69535dbc-c7ef-402d-a347-d3d3e4860 d72/sql-server-2008-64bit-fulltext-indexing-pdf-not-working-cant-find-ifilter?forum=sqldat abaseengine
    Regards,
    Rave

  • Import MS Access 2013 tables into SQL Server 2012

    Hi there,
    Is there a step by step example somewhere showing how to import an MS Access 2013 table into SQL Server 2012?
    I have read the existing posts and don't see a definitive answer.
    I have installed MS Access 2010 engine, first 32 bit then 64 bit.
    I have installed the MS Access 2013 runtime on my server.
    I use the Office 2015 Access Database Engine OLE DB Provider.
    I get the error:
    Error 0xc0202009: Source - APEntries [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    Error 0xc02020e8: Source - APEntries [1]: Opening a rowset for "`TableName`" failed. Check that the object exists in the database.
    The post regarding the above errors doesn't resolve the issue.
    I have full administrative permissions on the server.
    What is the trick to making this work?
    Thanks,
    Ric
    Ric Miller

    Hi there,
    I tried the exact same operation on a third machine.
    This machine has Windows 8.1 64 bit, SQL Server 2012 64 bit, MS Office 2013 Plus 32 bit.
    I am the administrator on this machine.
    I installed this:
    Microsoft Access Database Engine 2010 Redistributable 32 bit (because I have MS Office 2013 plus 32 bit installed.)
    From here:
    http://www.microsoft.com/en-us/download/details.aspx?id=13255
    It won't let me install the 64 bit version without uninstalling MS Office 32 bit.
    I created an MS Access database on this machine using MS Access 2013 and created a table with 3 records.
    I used the "Import and Export Data (32 bit)" from the start menu.
    After I installed the "Database Engine 2010 32 bit" driver above, I now have the option of "Office 2015 Access Database Engine OLE DB Provider" as Data Source which I did not have prior to doing this installation.
    I selected the driver and added the Properties of the Data Source Name file location of the MS Access file. I am using a blank password.
    I go thru the same sequence of selecting a table to import and after running the result is the same:
    Error 0xc0202009: Source - APEntries [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    "Error 0xc02020e8: Source - APEntries [1]: Opening a rowset for "`TableName`" failed. Check that the object exists in the database."
    This seems to be consistent across three machines with three operating systems with the same files and the same result.
    I understand that some people have gotten this to work.
    I would appreciate it if anyone can report an error in the above procedure to me.
    Thanks,
    Ric
    Ric Miller

  • Sender JDBC support the stored procedure in SQL Server 2005

    Dear All,
    My question here is , Sender is JDBC adpter support to call the Stored procedure in Microsoft SQL Server 2005?
    I followed the below thread before posting this question
    Sender JDBC Adapter Supports Stored Procedures????
    In the thread Suraj response has mentioned SAP note: 941317, I checked the note, Note says it supported only ORACLE DBMS versions.
    Could you please clarify about this to possibility to call the stored procedure in Microsoft SQL server 2005?
    Thank you in Advance
    Sateesh

    Hi Sateesh,
    To answer your query, Yes it does. SP call works with SQL Server 2005 as well, the SP call should be "execute SPNAME <paramas>". In the place of update statement put any junk value as mentioned in the earlier comment.
    But just one thing to be noted, the select or any other query returning the desired resultset must be the first statement in youre SP returning value to the calling app. Means if there are any update, deletion or intermediate select queries to be used with in your SP, those all should be placed after the Main Select query that returns the desired resultset. Variable declarions and assignments are allowed.
    But if the seq of statements in your SP are like:
    @var1 Varchar
    Update <tablename>....
    Select * from <tablename>
    Then the output of the SP is :
    1 row updated
    <the resultset from select>
    In such cases, PI can recognise the first value returned only, that is "1 row updated" and hence the returned resultset wouldn't be seen by PI or not be passed to integration engine. Hence the update should come after the main Select.
    One more interesting piece of information, even if you copy and paste the entire SP code in place of the query string of Sender JDBC adapter, that too will work with all your variable declarations, multiple queries and updates and everything. Just have to follow the above rule.
    Let us know what you find.
    Regards,
    Suddhasatta

  • Temp File in SQL Server change to Oracle

    Dear all,
    If there is temp file in SQL Server named '#Tablename',
    HOw can I change it to use in Oracle Database?
    Now I am doing upgrade to oracle database. If I need to create the temp file name , HOw can I do in oracle database?
    Thanks for your big help.

    Can you clarify the question a bit? I'm not sure what you're trying to accomplish.
    Are you trying to create a temporary table? A data file for a temporary tablespace? A temporary operating system file?
    Is there something ODBC-related in this question? If not, you may want to post the question in the general database forum.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • Cannot get Universe column in the sql server ?

    Hi,
    I able to get some of columns using below query , but I cannot get some of the columns from universe to SQL Server.
    If I try through SSIS also the columns are missing which are unable to get using openquery.
    If I add "Microsoft ODBC Data Source (ODBC)" for Universe U2 also then some of the columns are missing .
    For Example : Unable to get "Description" Column.
    How can I check what is the problem  ? Please help me on this..
    select * FROM OPENQUERY(ulive, 'select Description
    FROM TABLENAME WHERE Z_ID=''020324.doc''')
    Msg 7321, Level 16, State 2, Line 1
    An error occurred while preparing the query for execution against OLE DB provider "MSDASQL" for linked server "ulive".
    Thank you..

    What is Universe U2  server? Is it SQL Server or Oracle or perhaps MySQL?
    select Description FROM ULIVE.DBNAME.DBO.TABLENAME WHERE Z_ID='020324.doc'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Issues using Oracle SQL server Developer migration work bench

    Hi all,
    We are trying to migrate the application databases from SQL server 2000 to Oracle 10g using Oracle SQL Developer 1.2.1.32.13:
    Following is the list of issues that we faced while trying out this migration on dev environment.
    1. The data migration was successful for only around 90 tables out of the total 166 tables present. No error message was logged for the rest of the tables but still it was completed.
    2. Some of the tables which had got the data inserted did not have the full data. Only some of the rows were inserted for these tables. Error message was logged only for few of the rows and not all.
    3. Few error messages were logged which said problems about “Inserting ' ' into column <tablename>.<columnname>”. There was no such constraint in the target database that the particular column can not be null or can not have only a space. Please check the logs for the same error messages.
    4. The status box at the end of migration had shown only 3 errors.
    5. The total data for migration was around 500MB. The time taken for migration was around 75 minutes. Are there any optimization techniques that will improve the performance?
    Please note that there were no Foreign Key references for the source schema or target schema.
    Any pointers/info/resolutions related to above mentioned issues will be much useful for us.
    Thanks,

    Hi Adam,
    There are 2 sets of scripts created for you.
    1) For SQL Servers BCP to dump out the data to dat files
    2) For Oracles SQL*Loader to load the dat files
    You run the SQL Server BCP scripts on the machine with SQL Server.
    The dat files will be dumped out on that server.
    You can then move the dat files to your Oracle server.
    Then run the Oracle SQL*Loader scripts to load the dat files into Oracle.
    Give it a go and follow the doc and viewlets.
    Your Questions:
    So the datadump from the source location would be saved on my local disk?it will be saved on the same machine you run the bcp scripts from. Usually the same machine SQL Server is on, because you require SQL Server BCP tool.
    So once it is migrated to the destination database will that dump be created automatically? Or do I need to modify the script to take care of this?I dont know what you mean by this, hopefully above clears things up.
    The only modifications you need to make to the scripts are adding in the databasename username password servername. These are outlined in the scripts themselves. I would want to do something fancy like dump the dat files to a different directory, then you can modify the scripts, but you should understand what they do first.
    Most people would have 500MB of space on their discs , so I can see the problem creating these dat files . The same goes for your 30 GB database.
    I hope this helps, but as always you wont get a good idea of how it works until you give it a go.
    Regards,
    Dermot.

  • 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,
    Lony

    You 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.

  • How to create ODBC connection between Oracle 10g and MS SQL Server

    Hi,
    Can someone help us with the steps to create an ODBC connection between Oracle APPS using Oracle 10g database and MS SQL Server.
    Requirement is to extract the transactional data from MS SQL Server on a daily basis and dump it into Oracle tables for an interface to be run. Currently it is being done through Dataloader tool which we feel is causing the data issue with Arabic characters. We want to create the ODBC directly between Oracle and MS SQL Server and check if the data is being pulled correctly.
    The data is in sql server 2000 which has data in Arabic_CI_AS character set which is moved to Oracle 10.2.0.3 database with characterset AL32UTF8. The table data is moved to oracle using the dataloader 3.6 standard edition licensed version. We cannot change the character set of Sql Server 2000.
    Please help
    Thanks
    Shanil

    Hi,
    If you're trying to PULL data from SQLServer into an Oracle database, you wouldnt use Oracle ODBC driver for that, so you may want to post in the Heterogeneous Services forum instead:
    Heterogeneous Connectivity
    If you're trying to PUSH data from SQLServer into an Oracle database, you could use ODBC but most folks use OLEDB for that, and the following note on MOS should help:
    How to Create a Sql Server Linked Server With The Oracle Provider for OLE DB     (Doc ID 191368.1)
    As with any NLS related issue, the first thing to do is dump the codepoints of the data in the Oracle database to see if it is stored validly, rather than relying on what the data "looks like" from some tool or other. It's best to check a single row, with only a few characters in it if you can, and you can do that via
    SELECT DUMP(<columname>,1016) FROM <tablename> WHERE ...
    Hope it helps,
    Greg

Maybe you are looking for