tag:blogger.com,1999:blog-81485525495938406802024-03-20T20:42:25.478+05:30Sybase to Sql Server MigrationExperience praises the most happy the one who made the most people happy...Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-8148552549593840680.post-12765935104086415962014-02-17T16:39:00.001+05:302014-02-17T16:39:08.113+05:30Oracle locks in table<div dir="ltr" style="text-align: left;" trbidi="on">
Check locks in the oracle table:<br />
<br />
<br />
SELECT l.session_id||','||v.serial# sid_serial,<br />
<br />
l.ORACLE_USERNAME ora_user,<br />
<br />
o.object_name,<br />
<br />
o.object_type,<br />
<br />
DECODE(l.locked_mode,<br />
<br />
0, 'None',<br />
<br />
1, 'Null',<br />
<br />
2, 'Row-S (SS)',<br />
<br />
3, 'Row-X (SX)',<br />
<br />
4, 'Share',<br />
<br />
5, 'S/Row-X (SSX)',<br />
<br />
6, 'Exclusive',<br />
<br />
TO_CHAR(l.locked_mode)<br />
<br />
) lock_mode,<br />
<br />
o.status,<br />
<br />
to_char(o.last_ddl_time,'dd.mm.yy') last_ddl<br />
<br />
FROM dba_objects o, gv$locked_object l, v$session v<br />
<br />
WHERE o.object_id = l.object_id<br />
<br />
and l.SESSION_ID=v.sid<br />
<br />
order by 2,3;</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com1tag:blogger.com,1999:blog-8148552549593840680.post-6694451208725918592013-09-07T12:24:00.000+05:302013-09-07T22:25:09.088+05:30<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="font-family: Verdana, sans-serif; font-size: large; font-weight: normal;">Relational Database Management System:</span></h2>
<div>
<span style="font-family: Verdana, sans-serif;"> Dr.E. F. Codd(IBM Scientist), released article with <b>twelve rules </b> that a database must satisfy,</span><span style="font-family: Verdana, sans-serif;"> if it is to be considered truly relational ,in Computerworld Magazine at 1985.C J Date is credited with releasing Codd’s work after his death.Before the arrival of RDBMS Rules,Vendors had secured market in Hierarchical, Network and Hybrid Databases.Because of Normalization,Vendors&developers showed more interest on the implementation of RDBMS. Based on these given twelve rules Oracle Corporation implemented Relational Database Management Server with the help of</span><b style="font-family: Verdana, sans-serif;"> C language</b><span style="font-family: Verdana, sans-serif;"> at very first.Later Sybase,IBM,Microsoft and other vendors developed relational Database Management Systems.Let's move on to the Rules with summarized information.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif; font-size: small;"> Rule 0:</span></b></h3>
<div>
<b><span style="font-family: Verdana, sans-serif; font-size: small;"><br /></span></b></div>
<div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"> Rule 0 forces the database to be relational and expects to satisfy the all below given rules.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<b style="text-align: left;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<b style="text-align: left;"><span style="font-family: Verdana, sans-serif;">Rule 1:Information rule.</span></b><br />
<b style="text-align: left;"><span style="font-family: Verdana, sans-serif;"><br /></span></b></div>
<div style="text-align: left;">
<pre><div style="text-align: justify;">
<span style="font-family: Verdana;"> The information rule simply requires all information in the database to be represented </span><span style="font-family: Verdana;">in one and only one way, Namely by </span><b style="font-family: Verdana;">values in column positions within rows of tables.</b></div>
</pre>
<div style="text-align: left;">
<span style="font-family: Verdana; font-size: x-small;">
</span></div>
</div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 2:Guaranteed access rule</span></b></h3>
</div>
<div style="text-align: left;">
<br />
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif; font-size: x-small;"> </span><span style="font-family: Verdana, sans-serif;"> </span><b style="font-family: Verdana, sans-serif;">All data should be accessible without ambiguity.</b><span style="font-family: Verdana, sans-serif;">This means each data item can be uniquely identified using the table name, primary key, and column name.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-family: Verdana, sans-serif; font-size: small;">Rule 3:Systematic treatment of null values</span></h3>
<br />
<div style="text-align: left;">
</div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Verdana, sans-serif;"> Null values (distinct from empty character string or a string of blank characters and distinct from zero or any other number) are supported in the fully relational DBMS for representing missing information in a systematic way, independent of data type.</span><br />
<span style="background-color: white; font-family: Verdana, sans-serif;"><br /></span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 4:Dynamic online catalog based on the relational model</span></b></h3>
<div>
<b><span style="font-family: Verdana, sans-serif;"><br /></span></b></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b> The DBMS must provide access to its structure through the same tools that are used to access the data. </b>This is accomplished by storing the structure definition within tables, the same as data is stored.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<h3>
<b><span style="font-family: Verdana, sans-serif;">Rule 5:Comprehensive data sub-language rule</span></b></h3>
<div>
<b><span style="font-family: Verdana, sans-serif;"><br /></span></b></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">A relational system may support several languages and various modes of terminal use. However, there must be at least one language whose statements are expressible, per some well-defined syntax, as character strings and whose ability to support all of the following is comprehensible:</span></div>
</div>
<ul style="text-align: left;">
<li><span style="font-family: Verdana, sans-serif;">data definition</span></li>
</ul>
<ul style="text-align: left;">
<li><span style="font-family: Verdana, sans-serif;">view definition</span></li>
</ul>
<ul style="text-align: left;">
<li><span style="font-family: Verdana, sans-serif;">data manipulation (interactive and by program)</span></li>
</ul>
<ul style="text-align: left;">
<li><span style="font-family: Verdana, sans-serif;">integrity constraints</span></li>
</ul>
<ul style="text-align: left;">
<li><span style="font-family: Verdana, sans-serif;">authorization</span></li>
</ul>
<ul style="text-align: left;">
<li><span style="font-family: Verdana, sans-serif;">transaction boundaries (begin, commit, and rollback).</span></li>
</ul>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Relational databases use forms of standard SQL as their supported comprehensive language.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 6:View updating rule</span></b></h3>
<div>
<b><span style="font-family: Verdana, sans-serif;"><br /></span></b></div>
<h4 style="text-align: left;">
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><b>Data can be presented to the user in different logical combinations called views. </b><span style="font-weight: normal;">Each view should support the same full range of data manipulation that direct-access to a table has available. (This is only partially fulfilled in current implementations since update and delete access through logical views conflicts with the common use of logical views to provide read-only access for query and reporting. There is no universally agreement that it is a good idea in any case.)</span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;"><br /></span></span></div>
</h4>
<h4>
</h4>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 7:High-level insert, update, and delete</span></b></h3>
<div>
<b><span style="font-family: Verdana, sans-serif;"><br /></span></b></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;"> </span><b>Data can be retrieved from a relational database in sets constructed of data from multiple rows and/or multiple tables.</b><span style="font-weight: normal;"> This rule states that insert, update, and delete operations should be supported for any retrievable set rather than just for a single row in a single table.</span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;"><br /></span></span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 8:Physical data independence</span></b></h3>
<div>
<span style="font-family: Verdana, sans-serif;"></span><br />
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Applications must still work using the same syntax, even when changes are made to the way in </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">which the database internally implements data storage and access methods. This rule implies that </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">the way the data is stored physically must be independent of the logical manner in which it’s </span><span style="font-family: Verdana, sans-serif;">accessed. This is saying that users shouldn't be concerned about how the data is stored or how </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">it’s accessed. In fact, users of the data need only be able to get the basic definition of the data they need. </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Other things that shouldn't affect the user’s view of the data are as follows:</span><br />
<span style="font-family: Verdana, sans-serif;">• <b>Adding indexes:</b> Indexes determine how the data is stored, yet the user, through SQL, will </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">never know that indexes are being used.</span><br />
<span style="font-family: Verdana, sans-serif;">• <b>Changing the file-group of an object:</b> Just moving a table to a new file-group will not affect the </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">application. You access the data in the same way no matter where it is physically located.</span><br />
<span style="font-family: Verdana, sans-serif;">• <b>Using partitioning: </b>Beyond moving entire tables around to different file-groups, you can </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">move parts of a table around by using partitioning technologies to spread access around to </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">different independent subsystems to enhance performance.</span><br />
<span style="font-family: Verdana, sans-serif;">•<b> Modifying the storage engine:</b> From time to time, Microsoft has to modify how SQL Server </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">operates (especially in major version upgrades). However, SQL statements must appear to </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">access the data in the same manner as they did in any previous version, only (we hope) </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">faster.</span><br />
<span style="font-family: Verdana, sans-serif;">Microsoft has put a lot of work into this area, because SQL Server has a separate relational </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">engine and storage engine, and OLE DB is used to pass data between the two. Further reading on </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">this topic is available in SQL Server 2008 Books Online in the “Database Engine Components” topic</span><br />
<span style="font-family: Verdana, sans-serif;">or in Inside Microsoft SQL Server 2005: The Storage Engine by Kalen Delaney (Microsoft Press, 2006).</span><br />
<br /></div>
<span style="font-family: Verdana, sans-serif; font-size: x-small;">
</span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 9:Logical data independence</span></b></h3>
<div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif;">
</span>
<br />
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"> This rule insulates the user or application program from the low-level implementation of the database. Together, they specify that specific access or storage techniques used by the </span><span style="font-family: Verdana, sans-serif;">RDBMS—and even changes to the structure of the tables in the database—shouldn't affect the </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">user’s ability to work with the data. In this way, if you add a column to a table and if tables are split in a manner that doesn't add or subtract columns, then the application programs that call the database should be unimpaired.</span><br />
<span style="font-family: Verdana, sans-serif;">For example, say you have the table in Figure A-1.</span></div>
<span style="font-family: Verdana, sans-serif;">
</span>
<br />
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><a href="http://3.bp.blogspot.com/-DmNNS6QXj7o/UirxVLtrayI/AAAAAAAAAKo/3sAGCAUg1AQ/s1600/rdbms_logical_independence.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://3.bp.blogspot.com/-DmNNS6QXj7o/UirxVLtrayI/AAAAAAAAAKo/3sAGCAUg1AQ/s1600/rdbms_logical_independence.JPG" /></a></span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">The user should be unaffected. If you were to implement INSTEAD OF triggers on the view that </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">had the same number of columns with the same names, you could seamlessly meet the need to </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">manage the view in the exact manner the table was managed. Note that the handling of identity </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">columns can be tricky in views, because they require data to be entered, even when the data won’t be used. See Chapter 6 for more details on creating INSTEAD OF triggers.</span><br />
<span style="font-family: Verdana, sans-serif;">Of course, you cannot always make this rule work if columns or tables are removed from the </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">system, but you can make the rule work if columns and data are simply added.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif;">
</span></div>
<h4 style="text-align: left;">
</h4>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 10:Integrity independence</span></b></h3>
<div>
<span style="font-family: Verdana, sans-serif;"></span><br />
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Integrity constraints specific to a particular relational database must be definable in the relational data sub-language and storable in the catalog, not in the application programs. </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">The database must support a minimum of the following two integrity constraints:</span><br />
<span style="font-family: Verdana, sans-serif;"><b>• Entity integrity: </b>No component of a primary key is allowed to have a NULL value.</span><br />
<span style="font-family: Verdana, sans-serif;"><b>• Referential integrity: </b>For each distinct non-NULL foreign key value in a relational database, </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">there must exist a matching primary key value from the same domain. </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">This rule says that the database language should support integrity constraints that restrict the </span><span style="font-family: Verdana, sans-serif;">data that can be entered into the database and the database modifications that can be made. In </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">other words, the RDBMS must internally support the definition and enforcement of entity integrity </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">(primary keys) and referential integrity (foreign keys).</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif; font-size: x-small;">
</span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 11:Distribution independence</span></b></h3>
<div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"></span><br /></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"> This rule says that the database language must be able to manipulate data located on other computer systems. In essence, we should be able to split the data on the RDBMS out onto multiple physical systems without the user realizing it. SQL Server 2008 supports distributed transactions among SQL Server sources, as well as other types of sources using the Microsoft Distributed Transaction Coordinator service</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif; font-size: x-small;">
</span></div>
<h3 style="text-align: left;">
<b><span style="font-family: Verdana, sans-serif;">Rule 12:Non subversion rule</span></b></h3>
<div>
<b><span style="font-family: Verdana, sans-serif;"><br /></span></b></div>
<span style="font-family: Verdana, sans-serif; font-size: x-small; font-weight: normal;"> </span><span style="font-family: Verdana, sans-serif; font-weight: normal;">This rule requires that alternate methods of accessing the data are not able to bypass integrity constraints, which means that </span><span style="font-family: Verdana, sans-serif;"><b>users can’t violate the rules of the database in any way</b></span><span style="font-family: Verdana, sans-serif; font-weight: normal;">. </span><br />
<span style="font-family: Verdana, sans-serif; font-weight: normal;">For most SQL Server 2008 applications, this rule is followed, because there are no methods of getting to the raw </span><span style="font-family: Verdana, sans-serif; font-weight: normal;">data and changing values other than by the methods prescribed by the database. </span><b><span style="font-family: Verdana, sans-serif;">However, SQL </span><span style="font-family: Verdana, sans-serif;">Server 2008 violates this rule in two places</span></b><span style="font-family: Verdana, sans-serif; font-weight: normal;">:</span><br />
<span style="font-family: Verdana, sans-serif;"><b>• Bulk copy:</b></span><span style="font-family: Verdana, sans-serif; font-weight: normal;"> By default, you can use the bulk copy routines to insert data into the table directly</span><span style="font-family: Verdana, sans-serif; font-weight: normal;">and around the database server validations.</span><br />
<span style="font-family: Verdana, sans-serif;"><b>• Disabling constraints and triggers: </b></span><span style="font-family: Verdana, sans-serif; font-weight: normal;">There’s syntax to disable constraints and triggers, thereby </span><span style="font-family: Verdana, sans-serif; font-weight: normal;">subverting this rule.</span><span style="font-family: Verdana, sans-serif; font-weight: normal;">It’s always good practice to make sure you use these two features carefully. They leave gaping</span><span style="font-family: Verdana, sans-serif; font-weight: normal;">holes in the integrity of your data, because they allow any values to be inserted in any column.</span><span style="font-family: Verdana, sans-serif;">Because you’re expecting the data to be protected by the constraint you've applied, data value</span><span style="font-family: Verdana, sans-serif;">errors might occur in the programs that use the data, without re-validating it first</span><br />
<ul style="text-align: left;">
</ul>
</div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-7891988176571176412012-10-16T19:58:00.001+05:302013-09-07T15:32:56.544+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<b style="line-height: 100%;">Concatenating NULLABLE char column with NOT NULLABLE char column: </b><br />
<div style="line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;">
<span style="font-size: small;"><b><style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
A:link { color: #0000ff; so-language: zxx }
</style></b></span></div>
<br />
<div style="line-height: 100%; margin-bottom: 0cm;">
While concatenating the Nullable character column with the NOT Nullable column, Sybase right trimming the first column(Nullable character column) and then concatenating but SQL Server directly concatenating .So SQL Server gives the output along with the trailing spaces for the first column.</div>
<div style="line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;">
<span style="font-size: small;"><b> <style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
A:link { color: #0000ff; so-language: zxx }
</style></b></span></div>
<br />
<div style="line-height: 100%; margin-bottom: 0cm; text-indent: 1.27cm;">
While concatenating the Nullable character column with the NOT Nullable column, Sybase right trimming the first column(Nullable character column) and then concatenating but SQL Server directly concatenating .So SQL Server gives the output along with the trailing spaces for the first column.Assume the table with two columns of nullable char(10) and not nullable char (10).</div>
<div style="line-height: 100%; margin-bottom: 0cm;">
There is a record like below.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-oas51aEL83o/UH1wG3XxP3I/AAAAAAAAAHM/N7UfQvB1CB8/s1600/l1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-oas51aEL83o/UH1wG3XxP3I/AAAAAAAAAHM/N7UfQvB1CB8/s1600/l1.png" /></a></div>
When concatenating the two columns , <b>SYBASE</b> will gives the output without space like below.</div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">SELECT column1+column2,* FROM dbo.test</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-hQyYeTfVUmY/UH1wCm40ftI/AAAAAAAAAHE/wLP-pjdjqSc/s1600/l2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-hQyYeTfVUmY/UH1wCm40ftI/AAAAAAAAAHE/wLP-pjdjqSc/s1600/l2.png" /></a></div>
<span style="font-size: small;"> </span>When concatenating the two columns ,<b>SQL SERVER</b> gives the output with space like below.</div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">SELECT column1+column2,* FROM dbo.test</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-H4_6cyvaCjA/UH1v3SzMPZI/AAAAAAAAAG8/YWb3RjMN3W8/s1600/l3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-H4_6cyvaCjA/UH1v3SzMPZI/AAAAAAAAAG8/YWb3RjMN3W8/s1600/l3.png" /></a></div>
<span style="font-size: small;"> </span>Finally Sybase, right trimming the nullable character column while concatenation but not SQL Server.</div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;"><b>Solution:</b></span></div>
<div style="margin-bottom: 0.35cm;">
Resolve the above given scenario and get the same result as like as Sybase, it’s mandatory to add the rtrim() for the first column like below.</div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">SELECT </span><span style="color: magenta;"><span style="font-size: small;">rtrim</span></span><span style="font-size: small;"> (column1) +column2,* FROM dbo.test</span></div>
<div style="margin-bottom: 0.35cm;">
Don’t use ANSI Padding off to resolve this issue. This is not recommendable in future version.<br />
<br />
<span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></div>
<div style="line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;">
</div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-43241061502234567222012-10-05T19:16:00.004+05:302013-09-07T15:32:56.497+05:30SSMA error message S2SS0046<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><br />
<h3 style="text-align: left;">
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]--><b><span style="font-weight: normal;"><span style="color: black; font-family: "Calibri","sans-serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US;">CONVERT or CAST expression from binary to integer might cause a problem
because of platform dependence</span></span></b></h3>
<span style="color: black; font-family: "Calibri","sans-serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US;"><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--></span><br />
<span style="color: black; font-family: "Calibri","sans-serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US;"><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
</span><br />
<div class="MsoNormal">
<span style="color: black; font-family: "Verdana","sans-serif"; font-size: 10.0pt; line-height: 115%;"> Comparing binary value with Timestamp
column was different between Sybase and SQL server. The below code was working
fine in Sybase but not in SQL server</span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Verdana","sans-serif"; font-size: 10.0pt; line-height: 115%;">Where timestamp = substring(CONVERT(varbinary
(16), CONVERT(INT, @row_upd)), 5, 8) where @row_upd was varchar(38
datatype)</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Verdana","sans-serif"; font-size: 10.0pt; line-height: 115%;">To handle this the same code has been
rewritten using Dummy value concatenation</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Verdana","sans-serif"; font-size: 10.0pt; line-height: 115%;">0x00000000+substring (0x00000000 +CONVERT
(varbinary(8), CONVERT(INT, @row_upd')),5,8)</span></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-17729609932134384682012-10-05T19:14:00.003+05:302013-09-07T15:32:56.464+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</div>
<h3 style="margin-bottom: 0.35cm; text-align: left;">
<span style="color: black; font-size: small;"><span style="font-family: Verdana, serif;"><b>Group
by statement:</b></span></span></h3>
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
A:link { color: #0000ff; so-language: zxx }
</style>
</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
In Sybase,
Group by statement doesn’t require only the column in group by
clause to be placed in select list in Sybase. But in SQL server it is
mandatory that both select list columns and group by columns should
match or select list columns should be the subset of the columns in
group by clause.</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
Replace the
statements with Min () aggregate function for the columns which is
not part of the group by list.</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></span></span></span></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-5860547327006699802012-10-05T19:13:00.004+05:302013-09-07T15:32:56.523+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
<br />
<div style="margin-bottom: 0.35cm;">
<h3 style="text-align: left;">
<span style="color: black; font-size: small;"><span style="font-family: Verdana, serif;"><b>Avoid
using Emulated function:</b></span></span></h3>
</div>
<div style="margin-bottom: 0.35cm;">
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><b>
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</b></span></span></span></div>
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
A:link { color: #0000ff; so-language: zxx }
</style>
<br />
<div style="margin-bottom: 0.35cm;">
When the migration of objects by
Using SSMA, emulated functions would have created in SYSDB by SSMA
and those functions will be referred to replace the SQL Server system
functions in the database objects. These emulated functions, may
affect the performance of the query.</div>
<div style="margin-bottom: 0.35cm;">
To avoid the performance impact,
should use the below changes. Emulated function call has been
replaced with actual statement change using case statement (Like If
@start <0 for substring) or by making necessary platform specific
parameter alteration (Like Proper SQL server specific datepart
).
</div>
<div style="margin-bottom: 0.35cm;">
<br />
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span> </span></span></span>
</div>
<div style="margin-bottom: 0.35cm;">
<br /></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-20930992856175348202012-10-05T19:12:00.003+05:302013-09-07T15:32:56.486+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
<span style="font-size: small;"><b>Remote Procedure call:</b></span></h3>
</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="font-size: small;">Remote
procedure call to other Sybase ASE Db located remote server
called through four part name. Example of the remote procedure call
given below.</span></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="font-size: small;"><b>Exec
remoteserver.dbname.schemaname.procname</b></span></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="font-size: small;">In SQL Server
the same statement cannot execute.To replicate the same scenario in
SQL Server, Remote Sybase ASE server has been added as linked server
and the four part reference has been modified as
</span></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="font-size: small;"><b>Exec
(dbname.schemaname.procname) at remoteserver</b></span></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br />
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><b><span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></b></span></span></span></div>
<br />
<br /></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-48253689622034078302012-10-05T19:11:00.002+05:302013-09-07T15:32:56.503+05:30Sybase to SQL Server MIgration issues<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
<br />
<div style="margin-bottom: 0.35cm;">
<h3 style="text-align: left;">
<b>Replace Tempdb tables with
##tables</b></h3>
</div>
<div style="margin-bottom: 0.35cm;">
Temp db Tables behavior is different
between Sybase and SQL Server. In Sybase such tables exist till end
of the owner session or explicit drop but in SQL server it will exist
till explicit Drop. In Sybase Temp table created like
tempdb.schema.temptable.<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;">
</span></span></span>To achieve same functionality Global temp table
should be used so that the temp table is visible across all
Sessions and Exist till end of the owner session or explicit drop. In
SQL server temp table created like ##temptable. Preferably drop temp
tables like below. I have placed Sybase equivalent SQL server scripts
for create and dropping tables.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6QrMRLhbebc/UG7jbzAeubI/AAAAAAAAAGo/OPE02fQJ2QI/s1600/temptable_changes.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="65" src="http://3.bp.blogspot.com/-6QrMRLhbebc/UG7jbzAeubI/AAAAAAAAAGo/OPE02fQJ2QI/s640/temptable_changes.png" width="640" /></a></div>
<div style="margin-bottom: 0.35cm;">
<br /></div>
<div style="margin-bottom: 0.35cm;">
<br />
<br />
<br />
<span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-73921320964213385002012-10-05T19:08:00.004+05:302013-09-07T15:32:56.536+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style><b>Binary to Numeric Conversion fails in SQL Server </b></h3>
<div style="margin-bottom: 0.35cm;">
Converting binary value to Numeric
is possible in Sybase, but not possible in SQL Server. Instead of, we
can convert the Binary value into Integer. This is not exact solution
for replicate Sybase scripts.But we can adjust some scenarios with
this changes.<br />
<br />
<span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-66547688232078794242012-10-05T19:06:00.002+05:302013-09-07T15:32:56.526+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-q2pxEGl_On8/UG7hwYvWKmI/AAAAAAAAAGY/Wv2iuZ4TCXY/s1600/SYBASE_INSERT.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
<br />
<h3 style="text-align: left;">
<b>Issue for Inserting Timestamp</b></h3>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
If we try to
insert the actual timestamp data from Sybase table to SQL Server, we
are getting error with ‘<span style="color: red;">Cannot insert an
explicit value into a timestamp column. Use INSERT with a column list
to exclude the timestamp column, or insert a DEFAULT into the
timestamp column. Severity 16</span>’.We intent to create same
database copy to SQL Server based on Sybase with all data. But this
above given error stopping the data insertion. I have attached the
screenshot for the direct insertion along with error. </div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<a href="http://3.bp.blogspot.com/-q2pxEGl_On8/UG7hwYvWKmI/AAAAAAAAAGY/Wv2iuZ4TCXY/s1600/SYBASE_INSERT.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-q2pxEGl_On8/UG7hwYvWKmI/AAAAAAAAAGY/Wv2iuZ4TCXY/s1600/SYBASE_INSERT.png" /></a> </div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style></div>
<div style="line-height: 0.46cm; margin-bottom: 0.11cm; margin-top: 0.11cm; text-indent: 1.27cm;">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><i><span style="color: #00000a;">To
avoid the above given error along with data migration, Map timestamp
to binary (8) type for table columns. During SSMA conversion, add a
new column named ssma_timestamp that has a Transact-SQL timestamp
type. Add the default @@DBTS for the old timestamp column to ensure
that this column receives proper timestamp values after the migration
finishes. The ssma_timestamp column is necessary to advance the
@@DBTS value after the row is update. We should change the timestamp
to ssma_timestamp for the required places of procedures, functions,
triggers and other objects. Usually these changes will be in the
select statement of the scripts. Please find the screenshot below
with the required changes.</span></i></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-urY0Yx5NqiI/UG7iNQ2YocI/AAAAAAAAAGg/VwnJEoxZFZw/s1600/SQL_SERVER_INSERT.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-urY0Yx5NqiI/UG7iNQ2YocI/AAAAAAAAAGg/VwnJEoxZFZw/s1600/SQL_SERVER_INSERT.png" /></a></div>
<div style="line-height: 0.46cm; margin-bottom: 0.11cm; margin-top: 0.11cm; text-indent: 1.27cm;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-24043100235748293102012-10-03T18:49:00.005+05:302013-09-07T15:32:56.489+05:30Sybase to SQL Server MIgration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-gCyMN_fKMGY/UGw7JgLd_5I/AAAAAAAAAFg/eev7SbU5tE8/s1600/sqlserver.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<h3 style="text-align: left;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
-</style><b><span style="font-size: small;"> Nullability difference in Table creation:</span></b></h3>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;"> While creating table in
Sybase, default nullability of the column is Not null.But in server
server the default nullability of the column is Null. That means if
the developer did not specify the nullability of the column while
creating table,sybase defines the column as Not Nullable and SQL
Server defines the column as Nullable.</span></div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">You can see the example
for the default nullability value in the right side of the screenshot
for the corresponding database.</span></div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</span></div>
<br />
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;"><b>Sybase:</b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-XH37ju3CU98/UGw6-U5bywI/AAAAAAAAAFY/Ks5Squ1oacI/s1600/sybase.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-XH37ju3CU98/UGw6-U5bywI/AAAAAAAAAFY/Ks5Squ1oacI/s1600/sybase.png" /></a></div>
<div style="margin-bottom: 0.35cm;">
<br /></div>
<div style="margin-bottom: 0.35cm;">
<br />
<br />
<br />
<br /></div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</span></div>
<br />
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;"><b>SQL Server:</b></span></div>
<div style="margin-bottom: 0.35cm;">
<a href="http://3.bp.blogspot.com/-gCyMN_fKMGY/UGw7JgLd_5I/AAAAAAAAAFg/eev7SbU5tE8/s1600/sqlserver.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-gCyMN_fKMGY/UGw7JgLd_5I/AAAAAAAAAFg/eev7SbU5tE8/s1600/sqlserver.png" /></a><span style="font-size: small;"> </span></div>
<div style="margin-bottom: 0.35cm;">
<br /></div>
<div style="margin-bottom: 0.35cm;">
<br /></div>
<div style="margin-bottom: 0.35cm;">
<br /></div>
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</span></div>
<br />
<div style="margin-bottom: 0.35cm;">
<span style="font-size: small;"> While migrating ‘create
table statement’, we should give the NOT NULL for the columns
doesn’t have nullability in the column definition.</span><br />
<br />
<br />
<br />
<span style="font-size: small;">Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </span></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-86688563847389793192012-09-28T12:37:00.001+05:302013-09-07T15:32:56.549+05:30Sybase to SQL Server Migration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Variable Scope/behavior in Update statment:</h3>
In Sybase intermediate calculation with variable for the update statement,Variable value is based on last executed statement or last executed record.In Sybase,variable updation will happen after the column updation.Which means the updation in variable has low priority when compare with the updation in column for the single update statement.If we think the output of the updated variable want to become the input of the column updation for each and every row,we cannot attain in Sybase.Because the update in column will execute first and then update in variable execute in single update statement even we placed left or right side.<br />
<br />
But in SQL Server we can perform the above operation.The variables are highly dynamic and record dependent.The priority for the variable updation is in high priority.So we can get consistent result.<br />
<br />
If you see the below given screenshots you can understand the scenario <br />
which i am trying to explain.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-SRRpo5EwiiQ/UGVj3XaJQ1I/AAAAAAAAAE4/C4oRhd3J4JI/s1600/Sybase_variable_behavior_in_sybase.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" kea="true" src="http://2.bp.blogspot.com/-SRRpo5EwiiQ/UGVj3XaJQ1I/AAAAAAAAAE4/C4oRhd3J4JI/s1600/Sybase_variable_behavior_in_sybase.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Variable behavior in Sybase Update statement</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-JvIt8b-9Yng/UGVkMdDiJII/AAAAAAAAAFA/h9nKgtD5OTM/s1600/Sqlserver_variable_behavior_in_update.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" kea="true" src="http://2.bp.blogspot.com/-JvIt8b-9Yng/UGVkMdDiJII/AAAAAAAAAFA/h9nKgtD5OTM/s1600/Sqlserver_variable_behavior_in_update.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Variable behavior in SQL Server Update statement</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
I just shared the difference between two technologies for the update statement while using intermediate variable.Hopefully we won't get such a scenario from Source.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-85075728506332793652012-09-28T11:18:00.004+05:302013-09-07T15:32:56.547+05:30Sybase to SQL Server Migration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Data truncation while Insertion</h3>
<div style="text-align: left;">
The behavior of Sybase and SQL Server is different in the Insert statement.</div>
<div style="text-align: left;">
When we trying to insert additional characters when compare with actual column length,</div>
<div style="text-align: left;">
Sybase automatically truncates the excess characters and inserts.</div>
<div style="text-align: left;">
But SQL Server will raises the below given error. </div>
<div style="text-align: left;">
<br /></div>
<span style="color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">Msg 8152, Level 16, State 14, Line 2</span><br />
<span style="color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">String or binary data would be truncated.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">The statement has been terminated.</span><br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If we are trying to insert the more than 10 character for the column which is having </div>
<div style="text-align: left;">
length 10,Sybase will removes the characters from 11th position and inserts the first 10 character <br />
into the table.But SQL Server raises the error.You can understand easily with the<br />
following Screenshots given below.</div>
<div style="text-align: left;">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-0UiIexkSs0g/UGU6GIKPHgI/AAAAAAAAAEg/9pWOEwGfII4/s1600/Sybase_truncation_while_insertion.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" kea="true" src="http://3.bp.blogspot.com/-0UiIexkSs0g/UGU6GIKPHgI/AAAAAAAAAEg/9pWOEwGfII4/s1600/Sybase_truncation_while_insertion.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sybase,Inserting too many characters than actual column length</td></tr>
</tbody></table>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-q6x0qRlR6tg/UGU6jNxETFI/AAAAAAAAAEo/sFkNH3mZYxc/s1600/string_data_cant_truncate.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" kea="true" src="http://1.bp.blogspot.com/-q6x0qRlR6tg/UGU6jNxETFI/AAAAAAAAAEo/sFkNH3mZYxc/s1600/string_data_cant_truncate.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server,Inserting too many characters than actual column length</td></tr>
</tbody></table>
<br />
</div>
<div style="text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div align="left" style="text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </div>
</div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-91872986163840835152012-09-28T10:34:00.003+05:302013-09-07T15:32:56.554+05:30Sybase to SQL Server Migration Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Default Date/Datetime format in Sybase Vs SQL Server:</h3>
Default Date/Datetime Format is different for both Sybase and SQL Server.<br />
So we need to change the target system’s(SQL Server) date/datetime format, <br />
based on the source system’s output.I am giving the default datetime formats below.<br />
<br />
<strong>Sybase Default Date Format:</strong><br />
MON DD YYYY H: HH:MM: SSS AM<br />
<br />
<strong>SQL Server Default Date Format:</strong><br />
YYYY-MM-DD HH:MM:SS<br />
<div align="left" style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com1tag:blogger.com,1999:blog-8148552549593840680.post-7538598443161206632012-09-27T14:29:00.001+05:302013-09-07T15:32:56.541+05:30Cursor behavior in SQL Server vs Sybase<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css"><!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
<br />
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
Objective is to
be, if one cursor’s input is based on the other cursor. We should
execute the input cursor with prior and input cursor’s script want
to come first in the procedure</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="color: black; font-size: small;"><span style="font-family: Verdana, serif;">Cursor
interdependency based on parameter supported by Sybase, even the
inner cursors declare statement placed next of the outer cursors
declare statement. But Cursor interdependency based on parameter not
supported in SQL server, if the Cursor declaration is not done inside
the outer cursor’s open statement. We will get the different result
set for the same logic code based on the Sybase and SQL Server. If we
made the code changes to declare the Inner cursor inside the Outer
cursor (between Open and close block), we can get the same result
set. I have given detailed explanation below along with screenshot.</span></span></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</span></span></span></div>
<br />
<div style="margin-bottom: 0.35cm; text-align: center;">
<h4>
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><b>Sybase
Script with Cursor Inter-dependency</b></span></span></span></h4>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-MhwX1CRTqg8/UGw8mVppA8I/AAAAAAAAAFo/5tsvO5xVbGw/s1600/sybase1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-MhwX1CRTqg8/UGw8mVppA8I/AAAAAAAAAFo/5tsvO5xVbGw/s1600/sybase1.png" /></a></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</span></span></span></div>
<br />
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
Here first
cursors output is the input for the second cursor. But the
declaration of the second cursor located before the first cursors
open statement. Though Sybase maintains the Inter-dependency between
the cursor and passes the first cursor’s output to next cursor’s
input. So the Sybase output is based on the two cursor’s input and
output. You can see the output of the Sybase below.</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
One more is,
Cursor de-allocation handled by Sybase engine automatically. But In
SQL Server we should give the de-allocation explicitly for the
required places.</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</div>
<br />
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-align: left; text-indent: 1.27cm;">
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><b>Sybase
Output for the above given sample code</b></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Ndhyju2mxe0/UGw84_SrKsI/AAAAAAAAAFw/fhXgqAmtYYs/s1600/sybase_output.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Ndhyju2mxe0/UGw84_SrKsI/AAAAAAAAAFw/fhXgqAmtYYs/s1600/sybase_output.png" /></a></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; margin-left: 1.27cm; text-indent: 1.27cm;">
<span style="color: black;"><span style="font-family: Verdana, serif;"><span style="font-size: x-small;"><b>
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</b></span></span></span></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
To achieve the
same result set in SQL Server we should declare the Second (Inner)
Cursor declaration and open statement inside the First (Outer)
Cursor’s Open statement. Otherwise SQL Server engine will gives the
NULL value for the @var2 and only give the below result set.</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</div>
<br />
<div style="margin-bottom: 0.35cm; text-align: left; text-indent: 1.27cm;">
<b>SQL Server
output with bug</b> </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Z18clZBxHvM/UGw9cbh-Y-I/AAAAAAAAAGA/rJJy_m3WjI0/s1600/sql_output.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Z18clZBxHvM/UGw9cbh-Y-I/AAAAAAAAAGA/rJJy_m3WjI0/s1600/sql_output.png" /></a></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</div>
<br />
<div style="margin-bottom: 0.35cm; text-align: center; text-indent: 1.27cm;">
<b>SQL Server Script with relevant
changes</b> </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-EegsTyXghe0/UGw9Tp8qE_I/AAAAAAAAAF4/bjhvHfyD2DY/s1600/sqlserver1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-EegsTyXghe0/UGw9Tp8qE_I/AAAAAAAAAF4/bjhvHfyD2DY/s1600/sqlserver1.png" /></a></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br /></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</div>
<br />
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
Here we given
De-allocate statement for each cursor explicitly for the required
places .Outer cursors output will simply flow as a inner cursor’s
input. If we made the code changes like above we can get the same
result as like as Sybase. Once again I attached actual result for
your reference.</div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
</style>
</div>
<br />
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<b>SQL Server Output with relevant
changes</b> </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-2j8tsnNJgMw/UGw-J50Ds9I/AAAAAAAAAGI/o_MHYGOCm4I/s1600/sybase_correct_reference.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-2j8tsnNJgMw/UGw-J50Ds9I/AAAAAAAAAGI/o_MHYGOCm4I/s1600/sybase_correct_reference.png" /></a></div>
<div style="margin-bottom: 0.35cm; text-indent: 1.27cm;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></b></a> </div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com2tag:blogger.com,1999:blog-8148552549593840680.post-6895423111873287132012-09-27T13:16:00.001+05:302013-09-07T15:32:56.531+05:30SSMA error message S2SS0015<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h3 style="text-align: left;">
Unparsed SQL [ZERO:] cannot be converted:</h3>
<div style="text-align: left;">
SSMA raises above given error, while migrating the 'GOTO' Transact sql.</div>
<div style="text-align: left;">
Though SSMA raises the error,both Sybase and SQL Server will get execute the code successfully along with GOTO.To maintain the best practice,readability we should convert the 'GOTO' Control statement into IF....ELSE,Nested IF or any other Control statement.I have placed sample code with GOTO Statement along with the output.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Ww8WrKPnb5I/UGQG9J4dMwI/AAAAAAAAAEQ/3Vv_p0iNmuY/s1600/Code_with_GOTO.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" kea="true" src="http://1.bp.blogspot.com/-Ww8WrKPnb5I/UGQG9J4dMwI/AAAAAAAAAEQ/3Vv_p0iNmuY/s1600/Code_with_GOTO.png" /></a></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Below given sample code will give the same result without GOTO to follow best practice.Try to avoid GOTO statement in the program.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-xEAxmzBFVTs/UGQFChW361I/AAAAAAAAAEI/rOU3JMLD4-Y/s1600/Code_without_GOTO.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" kea="true" src="http://3.bp.blogspot.com/-xEAxmzBFVTs/UGQFChW361I/AAAAAAAAAEI/rOU3JMLD4-Y/s1600/Code_without_GOTO.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-55632360177103113132012-09-27T11:26:00.003+05:302013-09-07T15:32:56.518+05:30Missing parameter in procedure call<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Expects Parameter in the procedure call:</h3>
<div style="text-align: left;">
While calling procedure,Sybase adding NULL for the required parameters and executed successfully, even we miss to pass some parameters .But the SQL Server raises the error while missing to pass some parameters.</div>
<div style="text-align: left;">
If we are passing 2 parameter while calling the 'dbo.calledproc' instead of 3 actual parameter,Sybase engine adds NULL for the third parameter.But SQL Server raises the below error.</div>
<span style="font-size: xx-small;"><div style="text-align: left;">
<span style="color: red; font-size: x-small;"><strong>Msg 201, Level 16, State 4, Procedure CALLED_PROC, Line 0</strong></span></div>
<div style="text-align: left;">
<span style="color: red; font-size: x-small;"><strong>Procedure or function 'CALLED_PROC' expects parameter '@PARAMETER3', which was not supplied.</strong></span></div>
</span><br />
<div>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-left: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-erxy94lTlVE/UGPq70mRMMI/AAAAAAAAADo/ynF0HjGDrUc/s1600/Missing+parameter.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" kea="true" src="http://4.bp.blogspot.com/-erxy94lTlVE/UGPq70mRMMI/AAAAAAAAADo/ynF0HjGDrUc/s1600/Missing+parameter.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Result wihile missing parameter in procedure call<br />
<br />
<br />
<span style="font-size: small;">To avoid the above given error,we should add NULL for remaining parameters for procedure call.Then the proceudre will get executed succussfully.Find the correct screenshot below.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-lEqNJ7Xyhwg/UGPsF5BqD9I/AAAAAAAAADw/iqdSsT2BPhI/s1600/Correct_result_missing_parameter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" kea="true" src="http://2.bp.blogspot.com/-lEqNJ7Xyhwg/UGPsF5BqD9I/AAAAAAAAADw/iqdSsT2BPhI/s1600/Correct_result_missing_parameter.png" /></a></div>
</td></tr>
</tbody></table>
</div>
<div align="left" style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-4867303910538059942012-09-27T11:08:00.004+05:302013-09-07T15:32:56.505+05:30Passing Excess parameter in procedure call<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Passing additional parameter in the procedure call:</h3>
While calling procedure,Sybase passes only required parameters and executed successfully, even we pass the too many parameters .But the SQL Server raises the error while passing too many parameter.<br />
If we are passing 4 parameter while calling the 'dbo.calledproc' instead of 3 actual parameter,Sybase engine removes the fourth parameter and pass the first three parameter.But SQL Server raises the below error.<br />
<br />
<span style="font-size: xx-small;"><strong><span style="color: red; font-size: x-small;">Msg 8144, Level 16, State 2, Procedure CALLED_PROC, Line 0</span><br /><span style="color: red; font-size: x-small;">Procedure or function CALLED_PROC has too many arguments specified.</span></strong></span><br />
<div style="text-align: left;">
<table align="left" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-J-U8z7cLdHs/UGPmWLLPdII/AAAAAAAAADQ/IK7x7z6_4xo/s1600/Excess_parameter.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" kea="true" src="http://1.bp.blogspot.com/-J-U8z7cLdHs/UGPmWLLPdII/AAAAAAAAADQ/IK7x7z6_4xo/s1600/Excess_parameter.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Result while passing Excess parameter<br />
<br />
<span style="font-size: small;">To avoid the above given error,we should remove the additional/unwanted parameters from procedure call.Then the proceudre will get executed succussfully.Find the correct screenshot below. </span><br />
<span style="font-size: small;"><span style="color: #f3f3f3;"> .</span> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-3benqImk7hg/UGPonvRtWLI/AAAAAAAAADY/ZBG73ZYDe3o/s1600/Correct_result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" kea="true" src="http://3.bp.blogspot.com/-3benqImk7hg/UGPonvRtWLI/AAAAAAAAADY/ZBG73ZYDe3o/s1600/Correct_result.png" /></a></div>
</td></tr>
</tbody></table>
</div>
<div style="text-align: left;">
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-57159085537459303742012-09-26T16:55:00.003+05:302013-09-07T15:32:56.521+05:30SSMA error message S2SS0015<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Unparsed SQL, cannot converted</h3>
<div style="text-align: left;">
Please Check the Script to satisfy the following best practices to avoid the S2SS0015 error message.</div>
<div style="text-align: left;">
1.Required space should be there,in between column and sql server keywords.</div>
<div style="text-align: left;">
2.Check wether,given keywords available in sql server.</div>
<div style="text-align: left;">
3.Need to check,variable declaration is correct.</div>
<div style="text-align: left;">
4.Check for syntax error.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
INSERTINTO #temp_swtch<br />
( column1,<br />
column2,<br />
column3)<br />
VALUES ( </div>
<div style="text-align: left;">
'first value',<br />
'second value',<br />
1 )</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In the above given statement,Space character missing between INSERT and INTO.</div>
<div style="text-align: left;">
If we change the statement like below we can resolve the S2SS0015 Error.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
INSERT INTO #temp_swtch<br />
( column1,<br />
column2,<br />
column3)<br />
VALUES ( </div>
<div style="text-align: left;">
'first value',<br />
'second value',<br />
1 )<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-74557254694444339142012-09-26T14:45:00.000+05:302013-09-07T15:32:56.539+05:30SSMA error message S2SS0002<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
The following SQL statement cannot be converted</h3>
<div style="text-align: left;">
CREATE TABLE tempdb.guest.temptable (<br />
user_id int NOT NULL,<br />
req_id int NOT NULL<br />
)<br />
LOCK DATAROWS</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
LOCK DATAROWS keyword is not available in sql server.</div>
<div style="text-align: left;">
To achieve the same in sql server, we should give nolock for the select statments involving the above table or else we should set the isolation level as 'Read uncommitted '.<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
</div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-43873383573664625092012-09-24T17:00:00.001+05:302013-09-07T15:32:56.500+05:30SSMA warning message S2SS0016<div dir="ltr" style="text-align: left;" trbidi="on">
SQL Server might use a different error code<br />
Error code may change based on the Sybase and SQL Server for the same error.But in some cases both are having same error code.<br />
Selecting the error from @@error and Returning error code by @@error wont make any difference in both the technologies.And generic condition check also wont make any difference.That means<br />
IF @@ERROR=0<br />
IF @@ERROR<>0<br />
Both statement behaves same in sybase and SQL Server.We dont need to make any change for the below statement also.<br />
SELECT @@ERROR<br />
RETURN @@ERROR<br />
<br />
If the script contains specific error code condition.Then we should take care of the error.<br />
Please use the below links to refer Sybase error codes and meaning.<br />
<br />
<a href="http://infocenter.sybase.com/archive/index.jsp?topic=/com.sybase.infocenter.dc36584.1260/html/iqerror/Errsybcode.htm">http://infocenter.sybase.com/archive/index.jsp?topic=/com.sybase.infocenter.dc36584.1260/html/iqerror/Errsybcode.htm</a><br />
<br />
<a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.39996_1250/html/svrtsg/svrtsg382.htm">http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.39996_1250/html/svrtsg/svrtsg382.htm</a><br />
<br />
<a href="http://manuals.sybase.com/onlinebooks/group-asarc/srv10024/errtsg/@Generic__BookTextView/77">http://manuals.sybase.com/onlinebooks/group-asarc/srv10024/errtsg/@Generic__BookTextView/77</a><br />
<br />
According to the Sybase error codes change the equivalent SQL Server error codes in the Code.<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com2tag:blogger.com,1999:blog-8148552549593840680.post-24343878713307359562012-09-24T15:56:00.003+05:302013-09-07T15:32:56.492+05:30SSMA informational message S2SS0069<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
The error number was ignored</h3>
At that time of migration,SSMA will give the sybase equivalent error number and severity.<br />
As per the error number and severity Application code should change.<br />
Other than the application changes,There is no much Database changes for RAISERROR.<br />
<br />
<strong>Sample code given below:</strong><br />
RAISERROR(@error_format_20, 16, 1)<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-69261698961393667452012-09-24T15:02:00.003+05:302013-09-07T15:32:56.534+05:30SSMA error message S2SS0075<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Unable to convert Cursor error message</h3>
<div style="text-align: left;">
We cannot assign the value to the variable in cursor select statement,followed by the declaration of the cursor </div>
<div style="text-align: left;">
While assigning into variable in the cusrsor declaration leads to error.We can remove this assignment from declaration,because fetch statement should have the assignment for the output.Removal of this assignment wont create an issue.</div>
<div style="text-align: left;">
I have placed sample cursor declaration with assignment along with corresponding error.</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-BKSwDVHs9z0/UGAovQPafxI/AAAAAAAAAC4/y-zKK3s_R7E/s1600/Cursor_declaration_with_error.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" hea="true" src="http://2.bp.blogspot.com/-BKSwDVHs9z0/UGAovQPafxI/AAAAAAAAAC4/y-zKK3s_R7E/s1600/Cursor_declaration_with_error.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cursor declaration with assignment</td></tr>
</tbody></table>
<br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Cursor declaration without assignment:</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-XkFu5lt39F8/UGAqo2kmeaI/AAAAAAAAADA/E4DrwCkqc8E/s1600/Cursor_declaration_without_error.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" hea="true" src="http://1.bp.blogspot.com/-XkFu5lt39F8/UGAqo2kmeaI/AAAAAAAAADA/E4DrwCkqc8E/s1600/Cursor_declaration_without_error.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cursor declaration without assignment</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
We can use the above given screenshot to resolve S2SS0075.<br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0tag:blogger.com,1999:blog-8148552549593840680.post-15718894345181587042012-09-24T13:15:00.001+05:302013-09-07T15:32:56.461+05:30SSMA warning message S2SS0064<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Possibility of mismatch in LIKE operator behavior</h3>
<div style="text-align: left;">
The behavior of Sybase and SQL Server deviating in some some extends.</div>
<div style="text-align: left;">
Here i have given that exceptional scenarios and how to handle that scenarios.</div>
<div style="text-align: left;">
Other than the wild card <strong><span style="color: red;">'%'</span></strong>,sybase and sql server behaves same.</div>
<div style="text-align: left;">
So we need to take care of the wild card <span style="color: red;">'%'</span>.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If the key string has spaces in trailing position,Sybase automatically right trimming the Key string and search from the searching string only reach the end of the string.That means if the searching start position in the Target string is greater than the key string length from right to left,Sybase and SQL Server behaves same.If the Searching start position in the Target string is less than the key string length from right to left,Sybase right trimming key string and search but not SQL Server.</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
To get the better understanding i given the examples below.</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-pJzsMP7TLVo/UGAe0WXALLI/AAAAAAAAAB8/1PR2hzxbdiY/s1600/sybase_like_observation.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" hea="true" src="http://3.bp.blogspot.com/-pJzsMP7TLVo/UGAe0WXALLI/AAAAAAAAAB8/1PR2hzxbdiY/s1600/sybase_like_observation.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sybase like Observation</td></tr>
</tbody></table>
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-7e6lCaS5Y-U/UGAhxUSyGMI/AAAAAAAAACU/TJr3nnH_VAY/s1600/sql_server_like_observation.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" hea="true" src="http://2.bp.blogspot.com/-7e6lCaS5Y-U/UGAhxUSyGMI/AAAAAAAAACU/TJr3nnH_VAY/s1600/sql_server_like_observation.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server like observation</td></tr>
</tbody></table>
</div>
<div style="text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Above given screenshots will help to understands the behavior of the Sybase and SQL Server for the usage of Like operator.To get the first row output in the sybase,keystring right trimmed and then searched.But in SQL Server space also taken as a character,so that we are getting only one record.To resolve this difference.Please follow the below changes.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-RfIlu5Emh40/UGAkqAe89FI/AAAAAAAAACk/w8g4rsad9Sw/s1600/sql_server_resolved_like_observation.png" imageanchor="1" style="clear: left; cssfloat: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" hea="true" src="http://3.bp.blogspot.com/-RfIlu5Emh40/UGAkqAe89FI/AAAAAAAAACk/w8g4rsad9Sw/s1600/sql_server_resolved_like_observation.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server resolved like observation</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
Now the output will be same in both Sybase and SQL Server.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com1tag:blogger.com,1999:blog-8148552549593840680.post-89451803251262644532012-09-24T11:59:00.000+05:302013-09-07T15:32:56.551+05:30SSMA error message S2SS0044<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Complex expression cannot be used as OUTPUT parameter in EXECUTE Statement</h3>
<div style="text-align: left;">
To avoid this S2SS0044 Error,We should avoid the following scenarios given below:</div>
<div style="text-align: left;">
1.Dont perform calculation,while passing parameter.</div>
<div style="text-align: left;">
2.Dont place brackets on variables of OUTPUT parameter.<br />
3.Dont place constants for OUTPUT parameter<br />
<br />
Kindly execute the below test quieries to simulate yourself.</div>
<div style="text-align: left;">
<span style="color: green;"><span style="color: green; font-size: x-small;">--Create sample procedure</span></span></div>
<span style="font-size: x-small;"><span style="color: blue;"><span style="color: blue;">CREATE</span></span> <span style="color: blue;"><span style="color: blue;">PROCEDURE</span></span> dbo<span style="color: grey;"><span style="color: grey;">.</span></span>test_proc<span style="color: grey;"><span style="color: grey;">(</span></span>@a <span style="color: blue;"><span style="color: blue;">INT</span></span><span style="color: grey;"><span style="color: grey;">,</span></span>@b <span style="color: blue;"><span style="color: blue;">INT</span></span> <span style="color: blue;"><span style="color: blue;">OUTPUT</span></span><span style="color: grey;"><span style="color: grey;">)</span></span></span></div>
<span style="font-size: x-small;"><span style="color: blue;"><span style="color: blue;">AS<br />BEGIN<br /> SELECT</span></span> <span style="color: red;"><span style="color: red;">'HI'</span></span></span><br />
<span style="color: blue;"><span style="color: blue; font-size: x-small;">END</span></span><br />
<div style="text-align: left;">
<span style="font-size: x-small;"><br /></span></div>
<span style="color: green;"><span style="color: green; font-size: x-small;">--Case1</span></span><br />
<span style="font-size: x-small;"><span style="color: blue;"><span style="color: blue;">EXEC</span></span> dbo<span style="color: grey;"><span style="color: grey;">.</span></span>test_proc<span style="color: blue;"><span style="color: blue;"> </span></span>1<span style="color: grey;"><span style="color: grey;">,</span></span>2 <span style="color: blue;"><span style="color: blue;">OUTPUT</span></span></span><br />
<br />
<span style="color: blue;"><span style="color: blue;"><span style="font-size: x-small;"><strong><span style="color: red;">Msg 179, Level 15, State 1, Line 1</span></strong><br /><strong><span style="color: red;">Cannot use the OUTPUT option when passing a constant to a stored procedure.</span></strong></span><span style="color: blue;"><span style="color: blue;"><br /><span style="color: green;"><span style="color: green; font-size: x-small;">--Case2</span></span></span></span></span></span><br />
<span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="font-size: x-small;"><span style="color: blue;"><span style="color: blue;">DECLARE</span></span><span style="color: black;"> @x </span><span style="color: blue;"><span style="color: blue;">INT</span></span></span></span></span></span></span><br />
<span style="font-size: x-small;">EXEC</span><br />
<span style="font-size: x-small;"><span style="color: black;">dbo</span><span style="color: grey;"><span style="color: grey;">.</span></span><span style="color: black;">test_proc</span><span style="color: blue;"><span style="color: blue;"> </span></span><span style="color: black;">1</span><span style="color: grey;"><span style="color: grey;">,</span></span><span style="color: black;">[@x] </span><span style="color: blue;"><span style="color: blue;">OUTPUT</span></span></span><br />
<br />
<span style="color: blue;"><span style="color: blue;"><span style="font-size: x-small;"><strong><span style="color: red;">Msg 179, Level 15, State 1, Line 3</span></strong><br /><strong><span style="color: red;">Cannot use the OUTPUT option when passing a constant to a stored procedure.</span></strong></span></span></span><br />
<br />
<div style="text-align: left;">
This S2SS0044 will leads to runtime Error.We can resolve,by removing brackets of the OUTPUT variable or avoiding constant in OUTPUT parameter.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Sample execute statement for the successful Run.</div>
<span style="color: blue; font-size: x-small;"><span style="color: blue; font-size: x-small;">DECLARE</span></span><span style="font-size: x-small;"> @x </span><span style="color: blue; font-size: x-small;"><span style="color: blue; font-size: x-small;">INT</span></span></div>
EXEC<br />
<span style="font-size: x-small;">dbo</span><span style="color: grey; font-size: x-small;"><span style="color: grey; font-size: x-small;">.</span></span><span style="font-size: x-small;">test_proc</span><span style="color: blue; font-size: x-small;"><span style="color: blue; font-size: x-small;"> </span></span><span style="font-size: x-small;">1</span><span style="color: grey; font-size: x-small;"><span style="color: grey; font-size: x-small;">,</span></span><span style="font-size: x-small;">@x </span><span style="color: blue; font-size: x-small;"><span style="color: blue; font-size: x-small;">OUTPUT</span></span><br />
<br />
Please click here to know about <a href="http://sybasetosqlserver.blogspot.com/" target="_blank"><strong><span style="color: red; font-family: Arial, Helvetica, sans-serif;">sybase to sql server migration issues</span></strong></a></div>
Sivaramakrishnan Gopalsamyhttp://www.blogger.com/profile/04499638166129637331noreply@blogger.com0