Quantcast
Channel: SQL Server Migration forum
Viewing all 1700 articles
Browse latest View live

SSMA - Connect to Oracle yields invalid username/password error, even though correct username/password has been entered

$
0
0

Hi all,

I am getting the ORA-01017 invalid username/password error when trying to connect to Oracle in SQL Server Migration Assistant, even though the credentials I entered were correct. I tried the SYSTEM user first. Then I created a new user with DBA role. Both cannot connect using SSMA. I tried to test both users using SQL*Plus, and I was able to connect successfully. Please advise.


SSMA - Data Migration of a table from Oracle to SQL Server yields "Errors: Arithmetic operation resulted in an overflow."

$
0
0

Hello,

Below is the datatype mapping for Oracle and SQL Server for the table.

ORACLE:

SQL> desc PMIS.EMP_ACC_HISTORY
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 EMP_ID                                    NOT NULL VARCHAR2(5)
 PROP_NO                                   NOT NULL VARCHAR2(30)
 MR_NO                                     NOT NULL VARCHAR2(15)
 CM_NO                                              VARCHAR2(15)
 REMARKS                                            VARCHAR2(2000)
 USER_ID                                   NOT NULL VARCHAR2(15)
 L_UPDATE                                  NOT NULL DATE
 ACC_DATE                                           DATE
 ACC_TAG                                   NOT NULL NUMBER(38)
 XLS_REMARKS                                        VARCHAR2(2000)
 ACKNOWLEDGE                                        NUMBER(38)
 LUP_BY                                             VARCHAR2(15)
 YEAR_BACK                                          VARCHAR2(4)
 LUP_DATE                                           DATE

SQL SERVER:

EXEC SP_COLUMNS EMP_ACC_HISTORY
GO

COLUMN_NAMETYPE_NAMEPRECISIONLENGTH
EMP_IDvarchar55
PROP_NOvarchar3030
MR_NOvarchar 1515
CM_NOvarchar 1515
REMARKSvarchar20002000
USER_IDvarchar1515
L_UPDATEdatetime21938
ACC_DATEdatetime21938
ACC_TAGnumeric3840
XLS_REMARKSvarchar20002000
ACKNOWLEDGEnumeric3840
LUP_BYvarchar1515
YEAR_BACKvarchar44
LUP_DATEdatetime21938

What could be causing this "Errors: Arithmetic operation resulted in an overflow." error? I already tried to change the datatypes for the numbers and dates, to no avail.

ORA-01017 using OracleClient provider

$
0
0

Greetings, folks.

Here I am againg, still battling my way with SSMA.  We have a solution almost finished for a inhouse ETL using SSMA, but now we're facing a login problem.  We're using SSMAforOracleConsole to automate our database conversions, so in our script we have the oracle server section like this:

<!--tns<oracle name="sourceserver"><tns-name-mode><connection-provider value="OleDB Provider" /><service-name value="sourceserver" /><user-id value="sourceuser" /><password value="sourcepwd" /></tns-name-mode></oracle> 
  tns--><!--ezconnect<oracle name="sourceserver"><standard-mode><connection-provider value ="OracleClient" /><host value="ezhost" /><port value="ezport" /><instance value="ezsid" /><user-id value="sourceuser" /><password value="sourcepwd" /></standard-mode></oracle> 
  ezconnect-->  


Depending on how the user inputs the Oracle server name (either a tns entry or a full server:port/sid string) we uncomment the accordingly bloc and change the respectives values for the connection.

This works perfectly for the tns mode with the OleDB Provider, but the ezconnect bloc is giving the famous ORA-01017 error, prompting an invalide username/password.  The thing is the username and password are both correct, as well as all the other connection values:

<oracle name="ora8"><standard-mode><connection-provider value ="OracleClient" /><host value="ora8.local.ca" /><port value="1521" /><instance value="orcl" /><user-id value="myuser" /><password value="my_secret_password" /></standard-mode></oracle> 

This raises the mentionned error, while connection with the same values works correctly with SQLPlus:

c:\> sqlplus myuser/my_secret_password@ora8.local.ca:1521/orcl.local.ca

SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 20 12:02:06 2019

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>


The problem does not arise when using the other block though, the tns mode:

<oracle name="ora8"><tns-name-mode><connection-provider value="OleDB Provider" /><service-name value="ora8" /><user-id value="myuser" /><password value="my_secret_password" /></tns-name-mode></oracle> 

So, the username/password is not the issue here, so I supposed there's something to do with the OracleClient provider used by the standard-mode.  I googled the issue but found nothing relevant.  In a post somebody told that the client was incompatible/too old, but I don't think this applies.  As shown with the SQPLus above, I'm currently using a 11.2 against an Oracle 12.1, so its perfectly compatible.

A workaround would be require only TNS connection and refuse ezconnect strings when launching our process, but this is not really suitable since some of our clients don't even use tnsnames; our applications handle correctly ezconnect strings so should this homemade ETL.

So... any ideas?

SQL Server Migration Assistant for Access: a newer SNAC Provider is required for Link operations

$
0
0

Hi,

I have successfully migrated an Access database to Azure SQL.

However when I try to link the migrated tables in Access I get an error:

A newer SNAC Provider is required for Link operations. Version 10.5 or higher is required.

I have a newer Version installed on my computer: Microsoft SQL Server 2012 Native Client 11.3.

Any ideas what else could cause this error?

I am using latest Version of SSMA 8.4.0

I am using Microsoft Office Access (Office365-edition)

Thanks

Kjetil 

Failure to connect to MySQL server from SQL Server Migration Assistant

$
0
0

I have SQL Server 2017 Developer installed. I want to use the SQL Server Migration Assistant for MySQL to migrate a MySQL database into SQL Server. But I can't get the migration assistant to connect to the MySQL server. First of all, using MySQL Workbench I can connect to the server with no problem through this dialog box;

I used the same service, (or server) name, port and user entered into the migration assistant dialog box for connecting to the MySQL server like this;

But then I get this error;

I've tried selecting both the ANSI and unicode ODBC drivers, version 5.2 and 5.3, but nothing seems to work.


How to MySQL to SQL Server Migration (MSSQL 2008)

$
0
0

I want to migration  from mysql to MSSQL2008

However, the SSMA provided now does not support MSSQL2008.

Previously provided download links will also fail. 

Please give me SSMA as support MSSQL2008.

thank you

RDS SQL Server on AWS - migration of ASP.NET website

$
0
0

We are migrating our on-premise .NET website "application that runs in SQL Server" to AWS. I am looking for directions on below features that are not supported by AWS RDS SQL services:

  1. Distribution Transaction Coordinator (MSDTC)
  2. Server-level triggers
  3. Service Broker endpoints

Basically I need alternative approaches / techniques that we should be using in our website application code base. Please help.

Thank you

Microsoft Data Migration Assistant tool

$
0
0

Hi All,

I am using Microsoft Data Migration Assistance tool and i am looking for an option to disable automated updates of latest version. I couldn't find the option to disable. Kindly help me out to disable auto updates.


OS upgrade on SQL Mirrored Instances

$
0
0

Hello,

We have a principal, a mirror, and a witness servers running on windows 2008 r2. Some of the databases on principal are mirrored and not all.

We are thinking of upgrading the OS on the SQL servers. Is there any best practices or general guidelines to follow (like gotchas we need to watch out for)? I have seen links on the Internet that says to proceed with the upgrade of the OS just like you would do any other OS upgrades.

I have gone through other Internet forums and the links that you provide may be redundant. Please respond if you are MS related or know of MS technet articles for OS upgrade on SQL server (sql is 2008 r2 sp3). FYI, I have already gone through the technet article that explains how to upgrade to the upper version. What I am looking for is if there is any best practice related to doing that in servers where MS SQL runs.

Querying system tables EXTENDED_PROPERTIES much slower on SQL Server 2016 than SQL Server 2008

$
0
0

We have a medical research application for a large university hospital that uses the extended properties to hold columns meta data. The columns have extended properties to store the field description, option values, position on screen etc. There is a view that queries these extended properties, which is queried once when the application starts.

Recently we upgraded from SQL Server 2008 to SQL Server 2016 and the problem is that this view is now much much slower, which freezes the application at start up.

CREATE VIEW dbo.VW_FIELD_METADATA
AS
    SELECT
        CAST(UPPER(o.NAME) AS VARCHAR) AS TABLE_NAME, 
        CAST(UPPER(c.name) AS VARCHAR) AS COLUMN_NAME, 
        CONVERT(VARCHAR(250), VarLabel.Value) AS ColDescr,
        ValLabel.Name AS ValueName,
        CONVERT(VARCHAR(250), ValLabel.Value) AS ValueLabel
    FROM
        SYSOBJECTS O
    JOIN 
        SYSCOLUMNS C ON O.id = C.id 
    JOIN 
        SYS.EXTENDED_PROPERTIES VarLabel ON c.id = VarLabel.major_id  
                                         AND c.colid = VarLabel.minor_id 
                                         AND VarLabel.Name = 'VarLabel'
    LEFT JOIN 
        (SELECT MAJOR_ID, MINOR_ID, NAME, VALUE 
         FROM SYS.EXTENDED_PROPERTIES 
         WHERE Name LIKE 'ValLabel%') ValLabel ON c.id = ValLabel.major_id 
                                               AND c.colid = ValLabel.minor_id
    LEFT JOIN 
        SYS.EXTENDED_PROPERTIES Groep ON c.id = Groep.major_id 
                                      AND c.colid = Groep.minor_id 
                                      AND Groep.Name = 'Groep'
    --LEFT JOIN 
    --    SYS.EXTENDED_PROPERTIES Minimum ON c.id = Minimum.major_id AND c.colid = Minimum.minor_id AND Minimum.Name = 'Minimum'
    --LEFT JOIN 
    --    SYS.EXTENDED_PROPERTIES Maximum ON c.id = Maximum.major_id AND c.colid = Maximum.minor_id AND Maximum.Name = 'Maximum'
    --etc there are 8 more JOINS
WHERE
    (o.xtype = 'U' OR o.xtype = 'V')
GO

There are a lot of tables, columns and extended properties so this yields > 17000 rows

TABLE_NAME  |COLUMN_NAME   |ColDescr            |ValueName   |ValueLabel
------------+--------------+--------------------+------------+----------
PATIENT     |PATNR         |Registration number |NULL        |NULL
PATIENT     |FIRSTNAME     |First name          |NULL        |NULL
PATIENT     |SEX           |Patient sex         |ValLabel001 |1 = Male
PATIENT     |SEX           |Patient sex         |ValLabel002 |2 = Female
etc.

On the old SQL Server 2008 is took less than one second, on the new SQL Server 2016 it takes up to two minutes, which causes the application to time-out.

  • SQL Server 2008 - 00:00:00 - 17371 rows
  • SQL Server 2016 - 00:01:46 - 17371 rows

Btw the actual query for the view is even longer, with about 8 extra LEFT JOINs, but then the query seems to get into a dead-lock altogether and never finishes, so I made it shorter here for testing purposes and as an example.

Anyway, I know we can fix this problem by setting the database to an older compatibility level, so on the database  Properties -> Options -> Compatibility level and set it to "SQL Server 2008 (100)" but that completely negates the server upgrade and blocks newer features.

So my question is, why does querying these system tables take so much longer compared to the earlier SQL Server version? And is there a way make this query work while keeping the database in Compatibility level "SQL Server 2016 (130)" ? It's almost as if these system tables SYSOBJECTS,  SYSCOLUMNS and EXTENDED_PROPERTIES are missing indexes, is that correct?

(Btw, the new server is in a "Always On High availability group" but I don't know if that is relevant to this problem)


$impl procedures which are migrated from Oracle Functions

$
0
0

Hi ALL,

Getting the following error while converting from Oracle 11.2 to Azure SQL Database through SSMA 8.4 for a Oracle function.

Warnings: O2SS0452: "xp_ora2ms_exec2_ex" when called from within UDF cannot bind to outer transaction. It can lead to dead locks and losing transaction atomicity. Consider calling $impl procedure directly.
 Errors: O2SS0518: Wrapper functions are not supported by Azure SQL platform. Use $impl procedures instead.

While testing the migrated function in Azure.. the call to the XXXX$impl function does not go and return value is 0. 

Please help!

Regards,

Poonam

OS upgrade involved SQL server

$
0
0

Hi,

  We have a active passive SQL server using WFCS.  Because hardware team will upgrade the server hardware and Windows OS.  All software will be re-installed.  How can we do to keep the same setting during re-installation?  We concern the domain information of SQL server includes domain name, instance name, user names.   Thanks !

Leung

SQL Server Migration Assistant for Oracle - Problems converting UUID RAW(16) to uniqueidentifier

$
0
0
Hi

I am trying to migrate a UUID field from Oracle type RAW(16) to SQL Server 2016 type uniqueidentifier.

Creating the table works so far. I changed the "Colums type mapping" from raw to uniqueidentifier (was set to varbinary).

https://imgur.com/pH5DxaP

The table is therefore created correctly with uniqueidentifier.

I have problems with the data migration. I get the following error:

The specified value of type Byte[] from the data source cannot be converted into type uniqueidentifier of the specified target column.

https://imgur.com/Y6fsPUU

I tried to interpose an individual select via the "Extended data migration options".

https://imgur.com/42gsK5P

The column "UUID" has been replaced by:

LOWER(SUBSTR("UUID", 1, 8) || '-' || '-' || SUBSTR("UUID", 9, 4) || '-' || SUBSTR("UUID", 13, 4) || '-' || SUBSTR("UUID", 17, 4) || '-' || SUBSTR("UUID", 21, 12)) "UUID"

https://imgur.com/fEkipRm

This one makes me a string that looks like this:

8e086d49-9bdb-4ae4-e053-638da8c044b5

But that won't work either. The same error appears, but instead of "Byte[]" with "String"

The data migration works if I replace "UUID" with NULL. However, this is of no use to me.

Is there a solution how to get the UUID's correctly into the uniqueidentifiers?

SSMA console - converting sequences.

$
0
0

Hi folks.

I'm trying to add to my SSMA XML console script some sequences.  Didn't find anything specific about sequences neither online nor in the sample files; the most significant example I found was this:

<!-- Example 4: Convert Schema  for a specific  object(say Table)
         (with only a few optional attributes & write-summary-report-to with a file name) --><!--<convert-schema object-name="$OracleSchemaName$.TestTbl"
                    object-type="Tables"
                    write-summary-report-to="$SummaryReports$\ConvertSchemaReport1.xml"
                    report-errors="true" />-->

Kind of intutive, I just have to modify the object name and its type, right?  Maybe like this: 

<convert-schema object-name="lil2019.USERDEF_COLUMN_NO_SEQ"
                    object-type="sequences" />

But then I got this error:

[2019-07-04 15:42:05]  MESSAGE generic Microsoft SSMA for Oracle v8.2.0
[2019-07-04 15:42:06] FATALERR Invalid xml file: c:\Users\martlean\Documents\Demandes\convert_oracle_sql\migrationv7\ssmaproj\Ora_to_Sql.xml. Schema Validation failed at line number 117 and position 21: attribute 'object-type' is invalid - Value 'sequences' is not valid with the datatype 'MetabaseObjectCategories'
(The message might not be 100% correct, I tried to translate it from french)


So, the example uses the value TABLES for a table but its not SEQUENCES for a sequence?  What would be the right value (or syntax) for converting sequences with the console?  Is there somewhere a full list of accepted values for object-types? 


powershell to drop functions

$
0
0

HI

I have requirement to drop the assembly functions and recreate it

$selfunc = invoke-sqlcmd -server $Instance -Database $db.Name -Query  "SELECT   schema_name(o.schema_id) + '.' + o.[name] AS [CLRObjectName] FROM sys.objects o INNER JOIN sys.module_assembly_usages ma  ON o.object_id = ma.object_id INNER JOIN sys.assemblies a ON ma.assembly_id = a.assembly_id WHERE a.name=MYASSEMBLY"

foreach($sf in $selfunc)

{

drop function $sf.CLRObjectName

}

IT IS NOT WORKING .

Kindly help how can I achive this

SUpersent


Error messages while migrating from Oracle to MSSQL

$
0
0

Hello together,

I got these error messages when migrating from Oracle to MSSQL (Unfortunately, the error messages are in German languages)

1- Verletzung der PRIMARY KEY-Einschränkung "DTR_PK". Ein doppelter Schlüssel kann in das csm_master.DTR-Objekt nicht eingefügt werden. Der doppelte Schlüsselwert ist (cze, Erfüllungsgrad Massnahmen, 1).

2- Die Spalte 'VERSION_STR' lässt DBNull.Value nicht zu.

3- Verletzung der PRIMARY KEY-Einschränkung "NTR_PK". Ein doppelter Schlüssel kann in das csm_master.NTR-Objekt nicht eingefügt werden. Der doppelte Schlüsselwert ist (außen, cz, 0).

4- Could not count rows in the target table after migration. Migration may have succeeded, but row count is not verified. Error: Das Ausführungstimeout ist abgelaufen. Der Timeoutzeitraum wurde überschritten, bevor der Vorgang beendet wurde, oder der Server antwortet nicht.

Could you please help ?

Thank you in advance

Migration from SQL Server 2016 to PostgreSQL

$
0
0

Hi Team,

My management is planning to Migration from SQL Server 2016 to PostgreSQL.

Current Environment:

SQL Server 2016 ENT

AlwaysOn (Primary+Secondary)

We are not using any advanced features.

How can i justify that to saty with SQL Server?

SQL server In place Upgrade from 2014 to 2017 ( RTM-CU17) - SQL Assertion error

$
0
0

SQL Server In place upgrade from 2014 to 2017 RTM -CU17 failing with Assertion error.

'IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage ()'.

1. Database and SSIS is upgraded to 2017 and redeployed after in place upgrade from 2014 to 2017

2. we have a master package which runs around 120 child packages and failing continuously on a particular ETL package.This SSIS job calls a Stored procedure which contains  merge statement ( around 80K records).

3.Same error when we run the individual package or running the Stored procedure on SSMS.

Following workaround are done but no luck

1. Drop and recreate SP

2.DBCC check on table

 

Migrating SQL 2008 to SQL 2016

$
0
0
Can the license of SQL 2008 be used in SQL 2016 after migration?

SQLserver 2008 upgrade to SQLserver 2016

$
0
0

Dear Microsoft,

We have a server window 2008 installed SQLserver 2008. We would like to migrate the data to new built server window 2016 with SQL Server 2016, Is that possible migrate the data directly?( I mean backup the database in SQLserver 2008 and restore in SQLserver 2016). No need to use SQL Server 2012, SQL Server 2014 Version. Am I correct?

Hope can get your reply very soon.

Best Regard

Carlson

Viewing all 1700 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>