<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Microsoft SQL Server</title>
        <description>Forum for Microsoft SQL Server migration issues.</description>
        <link>https://forums.mysql.com/list.php?60</link>
        <lastBuildDate>Thu, 12 Mar 2026 03:54:53 +0000</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forums.mysql.com/read.php?60,726560,726560#msg-726560</guid>
            <title>Migration from Microsoft SQL Server to MySQL (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,726560,726560#msg-726560</link>
            <description><![CDATA[ <a href="https://medium.com/@henriqueleandro/unlocking-database-freedom-migration-from-microsoft-sql-server-to-mysql-using-generative-ai-288cc7d5c865"  rel="nofollow">https://medium.com/@henriqueleandro/unlocking-database-freedom-migration-from-microsoft-sql-server-to-mysql-using-generative-ai-288cc7d5c865</a><br />
<br />
<a href="https://medium.com/@henriqueleandro/migrating-sql-server-t-sql-to-mysql-using-javascript-stored-programs-35a8cb962e35"  rel="nofollow">https://medium.com/@henriqueleandro/migrating-sql-server-t-sql-to-mysql-using-javascript-stored-programs-35a8cb962e35</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 27 Sep 2024 17:26:56 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,725151,725151#msg-725151</guid>
            <title>what conftest.py should look like? (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,725151,725151#msg-725151</link>
            <description><![CDATA[ How should I configure conftest.py to test my async endpoints in fastapi? With access to the test postgres database. Does anyone have an example? I&#039;m looking at different people&#039;s implementations and I&#039;m confused.<br />
<br />
pytest, fastapi, postgres, sqlalchemy<br />
<br />
I looked on github and youtube]]></description>
            <dc:creator>ravi kumar</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Wed, 17 Jul 2024 16:00:32 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,724791,724791#msg-724791</guid>
            <title>PostgreSQL wildcard search query (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,724791,724791#msg-724791</link>
            <description><![CDATA[ I am trying to optimize 2 slow SQL queries where the search should go across multiple columns.<br />
<br />
First query is used to get total number of records to display on the UI.<br />
Second query is used to get actual records.<br />
Where statement is identical for both of them.]]></description>
            <dc:creator>ravi kumar</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Thu, 13 Jun 2024 10:31:15 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,724258,724258#msg-724258</guid>
            <title>Migrating from MySQL to MS SQL (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,724258,724258#msg-724258</link>
            <description><![CDATA[ I have been tasked with migrating a legacy building monitoring system from MySQL to SQL server.  I have tried unsuccessfully many times to use the the Microsoft SQL Server Migration Assistant for MYSQL.  The migration always fails.  I have increased every timeout option I can find and it has helped but it still fails.  The reason is most likely that the is database is basically only two tables.  One has about 50 million rows of data but the second has over 2 trillion rows of data.  The connection does not stay open for some reason in the application and at most I get maybe 300million rows migrated.  <br />
<br />
Is there a better process to do this?  I&#039;m do not have a MySQL background but have a fail amount of SLQ knowledge.  Any suggestions are most appreciated.  Thank you.]]></description>
            <dc:creator>Michael Feuti</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 01 Oct 2024 16:09:01 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,723120,723120#msg-723120</guid>
            <title>error database (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,723120,723120#msg-723120</link>
            <description><![CDATA[ Hello Friends, can someone help me, when I enable tcp/ip, it does not open the sql database and gives an error]]></description>
            <dc:creator>Sergio Cruz</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Sun, 03 Mar 2024 02:28:42 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,710441,710441#msg-710441</guid>
            <title>workbench migration error (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,710441,710441#msg-710441</link>
            <description><![CDATA[ HELP!  Been working thru this issue for 3 or 4 days and have been going in circles.<br />
<br />
We are looking at converting our MS Sql database to MySql.  I am trying to use the Migration Tool.  <br />
<br />
when I choose Database -&gt; Migration Wizard start Migration, I get a Dependency Warning &quot;Could not import the pyodbc python module&quot;....<br />
<br />
I have confirmed that pyOdbc is installed (5.0.1)  using pip list<br />
<br />
<br />
when i go past the waring to the screen to select the dsn for my MS SQL db I get an error &quot;an error occured while retrieving values for option dsn.... DbMssqlRE.getDataSourceNames<br />
<br />
Any help would be appreciated<br />
<br />
thanks<br />
<br />
kenZ]]></description>
            <dc:creator>ken zvokel</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 08 Dec 2023 08:54:03 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,710031,710031#msg-710031</guid>
            <title>DbMssqlRE.getDataSourcesNames (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,710031,710031#msg-710031</link>
            <description><![CDATA[ an error occurred while retrieving values for options &#039;dsn&#039; from &#039;MssqlOdbcDSN&#039;. error calling Python module function DbMssqlRE.getDataSourcesNames. When i migrate the database from MSSqlserver to MYSql Workbench i created a ODBC it was created successfully but in workbench it giving me the following Error Please any body have solution ?]]></description>
            <dc:creator>mohsin qadir</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Sun, 24 Sep 2023 16:22:35 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,709272,709272#msg-709272</guid>
            <title>Converting MSSQL to MySQL (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,709272,709272#msg-709272</link>
            <description><![CDATA[ Dear community members,<br />
<br />
I hope this message finds you all well. I am reaching out to seek your valuable insights and guidance regarding MySQL migration for optimizing website performance. As we strive to enhance the efficiency and speed of our website, we have decided to migrate our database from its current platform (MS SQL Server) to MySQL.<br />
<br />
In this regard, we have a few questions and concerns that we would greatly appreciate your expertise on:<br />
<br />
    What are the key benefits of migrating from our current database platform to MySQL? Are there any specific features or optimizations we should consider?<br />
<br />
    Could you please provide some best practices and recommendations for executing a successful MySQL migration? Are there any potential pitfalls or challenges we should be aware of?<br />
<br />
    How can we ensure a smooth and seamless transition of our data from the existing platform to MySQL? Are there any tools or methodologies that you would recommend?<br />
<br />
    Are there any specific considerations or precautions we should take to minimize potential downtime during the migration process? How can we ensure minimal disruption to our website and its functionality?<br />
<br />
    After the migration, what are the recommended steps for optimizing MySQL performance? Are there any specific configurations or settings that we should focus on?<br />
<br />
We greatly appreciate any insights, suggestions, or experiences you can share regarding MySQL migration. Your expertise will not only help us improve our website performance but also contribute to the larger community knowledge base.<br />
<br />
Additionally, we have decided to use <a href="https://dev.mysql.com/downloads/workbench/"  rel="nofollow">MySQL Workbench</a> and  <br />
<a href="https://www.dbload.com"  rel="nofollow">Data Loader</a> for migration. We believe in fostering collaboration and sharing knowledge, and we are excited to be a part of this community.<br />
<br />
Thank you in advance for your valuable input and support. We look forward to your responses and engaging in meaningful discussions.<br />
<br />
Warm regards,<br />
<br />
M Sami<br />
Database Analyst]]></description>
            <dc:creator>Mohammed Samiuddin</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 16 Jun 2023 17:11:40 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,705764,705764#msg-705764</guid>
            <title>MSSQL Migration MYSQL (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,705764,705764#msg-705764</link>
            <description><![CDATA[ Hello,<br />
<br />
I&#039;ve been given the task of migrating a large (2TB) MSSQL database to MYSQL, I am total newbie to MYSQL so I was looking for some general tips and advice on how to quickly as possible migrate the the data.  <br />
<br />
I am using the work bench and the database migration wizzard tool, what settings on the MYSQL side should I be looking to tweek in terms of meory settigns and how do I quickly disable all the indexes on the tables, I assume as per MSSQL this will speed the inserts up. <br />
<br />
Thanks <br />
<br />
Dave]]></description>
            <dc:creator>David Carpenter</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 12 Aug 2022 15:05:19 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,705398,705398#msg-705398</guid>
            <title>Migrate MSSQL Database (10+GB database size) to MySQL community (6 replies)</title>
            <link>https://forums.mysql.com/read.php?60,705398,705398#msg-705398</link>
            <description><![CDATA[ I&#039;m trying to migrate MSSQL database to MySQL, using Workbench 8.0.29, but it seems it won&#039;t migrate all tables&#039; all rows. Few tables have limitation with row size 65,535 and few having billions of records which it won&#039;t migrate at all. Is there any way to easily manage this migration?<br />
Also auto_increment is not updated during migration. What is the best way to migrate with auto_increment too?<br />
<br />
I have gone through multiple google suggestions but they are not satisfactorily providing solution.<br />
Please share if one has practically done migration successfully, and had any proper documentation/tool available. We have several large databases in queue. Also debate if migration is a better step or what?<br />
<br />
Regards.]]></description>
            <dc:creator>Shamshad Ali</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Wed, 10 Aug 2022 00:18:46 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,704325,704325#msg-704325</guid>
            <title>kaprekar number check function not working on T-SQL (3 replies)</title>
            <link>https://forums.mysql.com/read.php?60,704325,704325#msg-704325</link>
            <description><![CDATA[ Hi! i made an T-SQL Function which checks if a number is a kaprekar number or not. here is the code<br />
<br />
```<br />
CREATE FUNCTION [dbo].[kaprekar](@n int)<br />
 RETURNS bit<br />
WITH EXECUTE AS CALLER<br />
AS<br />
 BEGIN<br />
 DECLARE @result bit;<br />
 DECLARE @sq_n INT;<br />
 DECLARE @count_digits INT;<br />
 DECLARE @r_digits INT;<br />
 DECLARE @eq_parts INT;<br />
 DECLARE @sum INT;<br />
<br />
 SET @sq_n = @n * @n;<br />
 SET @count_digits=0;<br />
 WHILE @sq_n &lt;&gt; 0<br />
  BEGIN<br />
  SET @count_digits= @count_digits + @count_digits;<br />
  SET @sq_n=@sq_n/10;<br />
  END;<br />
   SET @sq_n = @n*@n;<br />
<br />
   WHILE @r_digits&lt;@count_digits<br />
   BEGIN<br />
   SET @eq_parts=POWER(10,@r_digits);<br />
   SET @sum = @sq_n/@eq_parts + @sq_n% @eq_parts;<br />
   END;<br />
<br />
<br />
	 IF @n = 1<br />
	BEGIN<br />
	SET @result=1;<br />
	END;<br />
	ELSE IF @eq_parts = @n<br />
	BEGIN<br />
	SET @result=0;<br />
<br />
	END;<br />
	ELSE IF @sum=@n<br />
	BEGIN<br />
	SET @result=1;<br />
<br />
	END;<br />
	ELSE<br />
	BEGIN<br />
	SET @result=0;<br />
	END;<br />
<br />
     RETURN @result;<br />
 END;<br />
<br />
```<br />
<br />
but it doesn&#039;t work. it only works with the number 1, not every other one. the inspection i made showed that the problem is the main part of code, not with the IF ELSE block. Can you help me?]]></description>
            <dc:creator>Святослав Тарадай</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Mon, 09 May 2022 16:31:02 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,703831,703831#msg-703831</guid>
            <title>crash when test sql server connection (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,703831,703831#msg-703831</link>
            <description><![CDATA[ os : mac monterey 12.3.1（21E258）<br />
mysql workbench : 8.0.28<br />
<br />
No matter what you set, it crashes immediately when testing sql server connection]]></description>
            <dc:creator>jim liu</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Thu, 07 Apr 2022 02:43:43 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,703572,703572#msg-703572</guid>
            <title>Binary_checksum() of MSSQL in MySQL (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,703572,703572#msg-703572</link>
            <description><![CDATA[ Is there any function that similar to Binary_checksum() of MSSQL in MySQL?<br />
<br />
TIA]]></description>
            <dc:creator>Trung Tran</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Wed, 23 Mar 2022 16:22:30 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,703519,703519#msg-703519</guid>
            <title>Local-name() in XML from MSSQL to MySQL (2 replies)</title>
            <link>https://forums.mysql.com/read.php?60,703519,703519#msg-703519</link>
            <description><![CDATA[ Hi experts, <br />
<br />
I&#039;m working on migrating some codes from MSSQL to MySQL, but I don&#039;t know the equivalent of local-name()in MySQL.<br />
<br />
The original MSSQL code is as followed:<br />
<br />
&lt;Attributes&gt;<br />
    &lt;Map&gt;<br />
        &lt;entry key=&quot;Trigger&quot; value = &quot;Action&quot;&gt;<br />
            &lt;value&gt;<br />
                &lt;Map&gt;<br />
                    &lt;entry key=&quot; Processing&quot;&gt;<br />
                        &lt;value&gt;<br />
                            &lt;Boolean&gt;true&lt;/Boolean&gt;<br />
                        &lt;/value&gt;<br />
                    &lt;/entry&gt;<br />
                &lt;/Map&gt;<br />
            &lt;/value&gt;<br />
        &lt;/entry&gt;<br />
    &lt;/Map&gt;<br />
&lt;/Attributes&gt;<br />
<br />
The output is:<br />
AttrKey ||AttrValue ||ValueType<br />
Trigger ||Action    ||Map<br />
<br />
1. How we can apply similar to local-name() in MySQL to return the ValueType = &quot;Map&quot;? When I tried something like &quot;//*[local-name()]&quot; in MySQL, it returned error.<br />
<br />
2.And what is the &quot;.&quot; in &quot;(.)&quot; meaning?<br />
<br />
Really appreciate your support.<br />
<br />
TIA]]></description>
            <dc:creator>Trung Tran</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 18 Mar 2022 14:55:00 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,698489,698489#msg-698489</guid>
            <title>How to import data from Microsoft SQL Server to MySQL Database Service (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,698489,698489#msg-698489</link>
            <description><![CDATA[ <a href="https://blogs.oracle.com/mysql/post/how-to-import-data-from-microsoft-sql-server-to-mysql-heatwave-database-service"  rel="nofollow">https://blogs.oracle.com/mysql/post/how-to-import-data-from-microsoft-sql-server-to-mysql-heatwave-database-service</a><br />
<br />
<a href="https://blogs.oracle.com/mysql/post/mysql-shell-generate-table-csv"  rel="nofollow">https://blogs.oracle.com/mysql/post/mysql-shell-generate-table-csv</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Wed, 25 Aug 2021 17:41:17 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,697040,697040#msg-697040</guid>
            <title>Workbench throws error in Data migration with online transfer option (4 replies)</title>
            <link>https://forums.mysql.com/read.php?60,697040,697040#msg-697040</link>
            <description><![CDATA[ Dear Team,<br />
<br />
I am facing following issue when database migration happening from SQL server to MySQL with large sets of data .<br />
<br />
Error:<br />
<br />
<br />
19:01:55 [INF][      copytable]: Re-enabling triggers for schema &#039;test&#039;<br />
<br />
19:01:55 [ERR][      copytable]: Exception: Querying Trigger Definitions: Lost connection to MySQL server during query<br />
ERROOR: Copy helper exited with an error: Worker exited with status.<br />
<br />
<br />
<br />
All the tables data copied successfully  to Mysql. Not able to finish tool  getting hanged and not able to get the report summary for the migration. <br />
<br />
Kindly help on how to solve this issue.<br />
<br />
I tried with 1.5 ,8 GB of database size ,In both the scenarios I am facing the same issue.<br />
<br />
I tried following settings  .<br />
<br />
increase the threads in online transfer to 10 threads  still same issue.<br />
<br />
I tried to update the connection-live time still the same issue.<br />
<br />
Please help on the same how to proceed.<br />
<br />
Thanks.]]></description>
            <dc:creator>kamesh bogg</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Thu, 17 Jun 2021 08:03:07 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,696569,696569#msg-696569</guid>
            <title>SQL Server 2000 code RRS feed (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,696569,696569#msg-696569</link>
            <description><![CDATA[ Hi,<br />
<br />
My name is Ajay owner of Ridhimanalloys.com my question is <br />
<br />
Anyone could help me to correct the script on SQL Server 2000? Thanks in advance<br />
<br />
--------------------<br />
<br />
USE [Data_ADM]<br />
GO<br />
/****** Object:  StoredProcedure [dbo].[CTRL_Spaceused]    Script Date: 11/02/2021 10:59:09 ******/<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
CREATE PROCEDURE [dbo].[CTRL_Spaceused]<br />
AS<br />
BEGIN<br />
/*<br />
Title : CTRL_Spaceused<br />
<br />
*/<br />
IF OBJECT_ID(&#039;tempdb..#Temp1&#039;) IS NOT NULL <br />
  DROP TABLE #Temp1<br />
DECLARE @drive varchar(100);<br />
CREATE TABLE #Temp1<br />
(<br />
[Database] varchar(128) NOT NULL,<br />
[FileGroupName] [sysname] NULL,<br />
[File Size] FLOAT NULL,<br />
[File Used Space] FLOAT NULL,<br />
[Max_size] Int,<br />
[physical_name] nvarchar(260) NOT NULL<br />
)<br />
DECLARE @Rundate datetime = getdate()<br />
EXEC sp_MSforeachdb &#039; USE [?];<br />
INSERT INTO #Temp1<br />
SELECT <br />
        DB_NAME() [Database] ,<br />
  &#039;&#039;FileGroupName&#039;&#039;= CASE<br />
        WHEN fg.name IS NULL THEN MF.type_desc<br />
        ELSE fg.name<br />
  END ,<br />
        MF.size / 128.0 ,<br />
        MF.size / 128.0 - ( ( size / 128.0 ) - CAST(FILEPROPERTY(MF.name, &#039;&#039;SPACEUSED&#039;&#039;) AS INT) / 128.0 ),<br />
  MF.Max_size,<br />
  MF.physical_name<br />
FROM    sys.database_files MF<br />
LEFT JOIN sys.filegroups fg<br />
ON MF.data_space_id = fg.data_space_id<br />
LEFT JOIN sys.data_spaces ds<br />
ON ds.data_space_id = MF.data_space_id<br />
WHERE MF.Type in (1,0)<br />
&#039;<br />
DECLARE @temp2 TABLE<br />
(<br />
[Database] varchar(128) NOT NULL,<br />
[FileGroupName] [sysname] NULL,<br />
[File Size] FLOAT NULL,<br />
[File Used Space] FLOAT NULL,<br />
[Max_size] Int,<br />
[physical_name] nvarchar(260) NOT NULL<br />
)<br />
INSERT INTO @temp2<br />
SELECT<br />
[Database] ,<br />
[FileGroupName] ,<br />
Sum([File Size]) as [File Size] ,<br />
Sum([File Used Space]) AS [File Used Space],<br />
[Max_size],<br />
[physical_name]<br />
FROM #temp1<br />
WHERE [Database] NOT IN (&#039;distribution&#039;, &#039;master&#039;, &#039;model&#039;, &#039;msdb&#039;)<br />
GROUP BY<br />
[Database] ,<br />
[FileGroupName],<br />
[Max_size],<br />
[physical_name]<br />
DECLARE @temp4 TABLE<br />
(<br />
[Database] varchar(128) NOT NULL,<br />
[FileGroupName] [sysname] NULL,<br />
[File Size_MB] FLOAT  NULL,<br />
[File Used Space_MB] FLOAT  NULL,<br />
[Percent_Free_%] nvarchar (6),<br />
[Autogrowth] nvarchar(260) NOT NULL,<br />
[Drive_Letter] Nvarchar(2) NOT NULL<br />
)<br />
<br />
INSERT INTO @temp4<br />
SELECT<br />
[Database] ,<br />
[FileGroupName] ,<br />
[File Size] as [File Size_MB] ,<br />
[File Used Space] AS [File Used Space_MB],<br />
100-(CONVERT(decimal(5,2),(CONVERT(DECIMAL(10, 2),[File Used Space])/CONVERT(DECIMAL(10, 2),[File Size])*100))) AS [% Free Space],<br />
&quot;Autogrowth&quot;  = CASE<br />
WHEN (Max_size) &lt;0 THEN &#039;File will grow until the disk is full&#039;<br />
WHEN (Max_size) = 0 THEN &#039;No growth is allowed&#039;<br />
ELSE cast(Max_size/128 as varchar (255))<br />
END,<br />
LEFT([physical_name] ,1) AS Drive_Letter<br />
FROM @Temp2<br />
DROP TABLE #Temp1<br />
DECLARE @temp3 TABLE<br />
(<br />
[Drive]  varchar(100) NOT NULL,<br />
[Total MB]  varchar(1000) NULL,<br />
[Total Free MB] varchar(1000) NULL,<br />
[Total Available MB]  varchar(1000) NULL,<br />
[Percent Free] varchar(32)<br />
)<br />
<br />
INSERT INTO @temp3<br />
SELECT distinct LEFT ((volume_mount_point),1),<br />
total_bytes/1048576 as Size_in_MB,<br />
available_bytes/1048576 as Free_in_MB,<br />
available_bytes/1048576 as Total_Available_MB,<br />
(select ((available_bytes/1048576* 1.0)/(total_bytes/1048576* 1.0) *100)) as FreePercentage<br />
FROM sys.master_files AS f CROSS APPLY<br />
sys.dm_os_volume_stats(f.database_id, f.file_id)<br />
group by volume_mount_point, total_bytes/1048576,<br />
available_bytes/1048576 order by 1<br />
<br />
DECLARE @Temp5 TABLE<br />
(<br />
[Database] varchar(128) NOT NULL,<br />
[FileGroupName] [sysname] NULL,<br />
[File Size_MB] FLOAT NULL,<br />
[File Used Space_MB] FLOAT NULL,<br />
[Percent_Free_%] nvarchar (6),<br />
[Autogrowth] nvarchar(260) NOT NULL,<br />
[Drive_Letter] Nvarchar(2) NOT NULL,<br />
[Total MB]  varchar(1000) NULL,<br />
[Total Free MB] varchar(1000) NULL,<br />
[Total Available MB]  varchar(1000) NULL,<br />
[Percent Free] varchar(32)<br />
)<br />
INSERT INTO @Temp5<br />
SELECT T4.*,T3.[Total MB]  ,T3.[Total Free MB] ,T3.[Total Available MB] ,T3.[Percent Free] FROM  @temp3 T3<br />
INNER JOIN @temp4 T4<br />
ON T3.Drive=T4.Drive_Letter<br />
DECLARE @Temp6 TABLE<br />
(<br />
[Msg] varchar(256) NOT NULL,<br />
[Status]  varchar(1000) NULL<br />
)<br />
INSERT INTO @Temp6<br />
SELECT [Database] +&#039; &#039;+[FileGroupName],<br />
&quot;STATUS&quot;  = CASE<br />
WHEN ([Autogrowth]) =&#039;File will grow until the disk is full&#039; AND (CONVERT(DECIMAL(5,2),[Percent_Free_%]) &gt;10 OR CONVERT(DECIMAL(5,2),[Percent Free]) &gt; 10) THEN &#039;0&#039;<br />
WHEN ([Autogrowth]) =&#039;No growth is allowed&#039; AND CONVERT(DECIMAL(5,2),[Percent Free]) &gt; 10 THEN &#039;0&#039;<br />
WHEN ([Autogrowth]) &lt;&gt; &#039;File will grow until the disk is full&#039; and Autogrowth &lt;&gt; &#039;No growth is allowed&#039; AND ([File Used Space_MB]/[Autogrowth]*100) &lt; 90 THEN &#039;0&#039;<br />
WHEN ([Autogrowth]) =&#039;File will grow until the disk is full&#039; AND CONVERT(DECIMAL(5,2),[Percent_Free_%]) &lt;10 AND CONVERT(DECIMAL(5,2),[Percent Free]) &lt;10 AND (CONVERT(DECIMAL(5,2),[Percent_Free_%]) &gt; 5 OR CONVERT(DECIMAL(5,2),[Percent Free]) &gt; 5) THEN &#039;1&#039;<br />
WHEN ([Autogrowth]) =&#039;No growth is allowed&#039; AND CONVERT(DECIMAL(5,2),LEFT([Percent Free],Charindex(&#039;%&#039;,[Percent Free])-1)) &gt;5 AND CONVERT(DECIMAL(5,2),[Percent Free]) &lt;10 THEN &#039;1&#039;<br />
WHEN ([Autogrowth]) &lt;&gt; &#039;File will grow until the disk is full&#039; and Autogrowth &lt;&gt; &#039;No growth is allowed&#039; AND ([File Used Space_MB]/[Autogrowth]*100) &gt;= 90 AND ([File Used Space_MB]/[Autogrowth]*100)&lt; 95 THEN &#039;1&#039;<br />
WHEN ([Autogrowth]) =&#039;File will grow until the disk is full&#039; AND  CONVERT(DECIMAL(5,2),[Percent_Free_%]) &lt;5 AND CONVERT(DECIMAL(5,2),[Percent Free]) &lt;5 THEN &#039;2&#039;<br />
WHEN ([Autogrowth]) =&#039;No growth is allowed&#039; AND CONVERT(DECIMAL(5,2),[Percent Free]) &lt; &#039;5&#039; THEN &#039;2&#039;<br />
WHEN ([Autogrowth]) &lt;&gt; &#039;File will grow until the disk is full&#039; and Autogrowth &lt;&gt; &#039;No growth is allowed&#039; AND ([File Used Space_MB]/[Autogrowth]*100) &gt;= 95 THEN &#039;2&#039;<br />
END<br />
FROM @Temp5<br />
SELECT top (1) [Status] as State,[Msg] FROM @temp6<br />
ORDER BY STATUS DESC<br />
END<br />
<br />
Result :<br />
<br />
Server: Msg 139, Level 15, State 1, Procedure Check_Spaceused, Line 29<br />
Cannot assign a default value to a local variable.<br />
Server: Msg 170, Level 15, State 1, Procedure Check_Spaceused, Line 125<br />
Line 125: Incorrect syntax near &#039;APPLY&#039;.<br />
Server: Msg 170, Level 15, State 1, Procedure Check_Spaceused, Line 174<br />
Line 174: Incorrect syntax near &#039;(&#039;.]]></description>
            <dc:creator>ridhiman alloys</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Mon, 17 May 2021 15:43:19 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,696416,696416#msg-696416</guid>
            <title>Issues/Doubts while doing Migration from SQL Server to MySQL DataBase  using MySQL Workbench (5 replies)</title>
            <link>https://forums.mysql.com/read.php?60,696416,696416#msg-696416</link>
            <description><![CDATA[ Dear Team,<br />
<br />
<br />
I am trying to explore on Database Migration from SQL server to MySQL . I am facing the following issues can you please clarify .<br />
<br />
MySQL workbench version : 8.0.23CE<br />
<br />
SQL server version: 2017<br />
<br />
MySQL version : 8.0<br />
<br />
<br />
Getting error message when I Select Multiple schemas from different catalogs. Is this feature not available ?  How to handle Multiple schemas migration using  workbench.?<br />
<br />
<br />
Can we Pause and Resume the Database Migration .Is there any option from MySQL Workbench?<br />
<br />
Is there any command line interface for MySQL workbench to work on with Database migration .If yes can you provide any helpful Link for the same.<br />
<br />
How to handle Incremental Database Migration using workbench?]]></description>
            <dc:creator>kamesh bogg</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 28 May 2021 08:15:40 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,690931,690931#msg-690931</guid>
            <title>MSSQL to MySQL source selection failure (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,690931,690931#msg-690931</link>
            <description><![CDATA[ Hello, <br />
<br />
I&#039;ve been trying to work through this for about 2 days now, and I&#039;ve tried everything.<br />
I&#039;m trying to get my MSSQL database to migrate to MySQL. I have created a ODBC Data Source using the windows ODBC Administrator. And the connection is successful. However, when i go into the Migration wizard, I select Start Migration and I change the Database System under Source Selection to Microsoft SQL Server. Instantly after changing it to Microsoft SQL Server, an error message pops up saying: <br />
<br />
&quot;An error occurred while retrieving values for option DSN from MssqlOdbcDSN - error calling Python module function DbMssqlIRE.getDataSourceNames&quot;<br />
<br />
This error pops up instantly upon making the database system Microsoft SQL Server, without even setting up the Connection Method. I don&#039;t understand whats going on here. It seems i&#039;m the only one who has had this issue since a few hundred google searches revealed nothing. I tried recreating my database. I tried uninstalling and reinstalling mySql. It&#039;s up to date. <br />
<br />
Please help!]]></description>
            <dc:creator>Cynthia Sidlauskas</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 15 Jan 2021 13:15:09 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,690372,690372#msg-690372</guid>
            <title>cross apply (2 replies)</title>
            <link>https://forums.mysql.com/read.php?60,690372,690372#msg-690372</link>
            <description><![CDATA[ I was a big fan of CROSS APPLY in mssql. I can&#039;t find a similar function in MySQL. Any suggestions on how to do the same thing in MySQL?]]></description>
            <dc:creator>JK Heydt</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 02 Oct 2020 10:07:21 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,690087,690087#msg-690087</guid>
            <title>How can I connect my local mysql server 2000 database to my website? (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,690087,690087#msg-690087</link>
            <description><![CDATA[ I currently host a mysql server 2000 database locally. I have a desktop application operating with this database. I would like to show some of my data from this database over the internet, using a website. Do you have any idea how I could make this work?]]></description>
            <dc:creator>Dustin Jourdan</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 15 Sep 2020 15:00:24 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,684207,684207#msg-684207</guid>
            <title>Connecting to MS SQL server from MySql database (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,684207,684207#msg-684207</link>
            <description><![CDATA[ Hi,<br />
One of my applications use MySql database. Now I need to retrieve data from a vendor app which uses MS SQL Server. I need to change some of the stored procedures to connect to the MS SQL Server and retrieve data from SQL Server into my MySql database.<br />
<br />
I could not find any documentation on even if this is possible and supported by Mysql.<br />
<br />
My questions:<br />
1) Does mysql support connecting to a remote database<br />
2) If yes to #1 how can I connect to SQL Server?<br />
<br />
I appreciate any/all help.<br />
<br />
Thanks<br />
Jaideep]]></description>
            <dc:creator>Jaideep Vinakota</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 07 Feb 2020 19:18:18 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,678808,678808#msg-678808</guid>
            <title>migration of mysql db to sql db by using bash scripts or power shell (2 replies)</title>
            <link>https://forums.mysql.com/read.php?60,678808,678808#msg-678808</link>
            <description><![CDATA[ I need to migrate the data from mysql database to sql database with powershell or by using bash scripts.How can be it achieved.]]></description>
            <dc:creator>sreekar b</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 29 Oct 2019 11:03:47 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,674284,674284#msg-674284</guid>
            <title>Microsoft SQL Migration Schemas Selection Empty (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,674284,674284#msg-674284</link>
            <description><![CDATA[ trying to migrate SQLServer to MySQL. There seems to be a problem with migrating remote databases. The SQLServer is on a different server. ODBC works, I can write programs to select and display data. The Workbench migration wizard accepts the ODBC connection as well but the Schema Selection is empty (yes, I omitted the database name). <br />
I have a local copy of the SQLServer (with example data), and when I try to migrate that, the Schema Selection page shows databases to choose from.<br />
Is it possible that the wizard only accepts local databases? then I&#039;m fucked.<br />
<br />
-Michael]]></description>
            <dc:creator>Michael Peters</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 23 Apr 2019 09:59:17 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,673631,673631#msg-673631</guid>
            <title>Equivalent collation for SQL_Latin1_General_CP1_CI_AS (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,673631,673631#msg-673631</link>
            <description><![CDATA[ I&#039;m migrating my MS SQL databases to MySQL. We use SQL_Latin1_General_CP1_CI_AS as database collation. Would like to know equivalent collation in MySQL.]]></description>
            <dc:creator>Arumugaperumal M</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Sun, 14 Jul 2019 07:36:56 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,672396,672396#msg-672396</guid>
            <title>SQL Server Migration Asistant (SSMA) doesn&#039;t recognise MySQL Columns (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,672396,672396#msg-672396</link>
            <description><![CDATA[ I am trying to migrate my MySQL DB to MsSQL.However, as you can see in the picture SQL Server Management Assistant cant recognise MySQL table columns.<br />
<br />
<a href="https://ibb.co/HXxKMBx"  rel="nofollow">https://ibb.co/HXxKMBx</a>]]></description>
            <dc:creator>mehmet barut</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 29 Jan 2019 07:14:39 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,672295,672295#msg-672295</guid>
            <title>How to connect my application to MySQL from MS SQL (5 replies)</title>
            <link>https://forums.mysql.com/read.php?60,672295,672295#msg-672295</link>
            <description><![CDATA[ I am the owner of ManagePro software, I just took over the company in April 2018, currently, the application requires an MSSQL instance to work, I want to use MySQL instead, but the app does not connect to the SQL server in the usual way that I have used in the past.<br />
<br />
When I start the app, and it can&#039;t find the default instance name it is looking for I get a settings box, to fix the issue I just change this .\MANAGEPRO to .\SQLEXPRESS  <br />
<br />
This, of course, is because the local machine has the server on it, and then I just point it to the instance name.<br />
<br />
If the server was remote it would be this servername\instance<br />
<br />
So my question is how do I mimic this with MySQL?]]></description>
            <dc:creator>Christopher Angulo-Bertram</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 25 Jan 2019 01:36:05 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,671137,671137#msg-671137</guid>
            <title>migration from sql server (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,671137,671137#msg-671137</link>
            <description><![CDATA[ Hello<br />
I&#039;m trying to migrate from SQL server to MySQL with MySql migration tool but it takes over than 30 hours to migrate :/ is there any other solution to do the work faster?!]]></description>
            <dc:creator>med ben</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 04 Dec 2018 08:41:21 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,670526,670526#msg-670526</guid>
            <title>Convert from sql server to MySql (no replies)</title>
            <link>https://forums.mysql.com/read.php?60,670526,670526#msg-670526</link>
            <description><![CDATA[ Hello all, can someone explain to me what the following line of code means in MS Sql and how i can convert it to MySql.<br />
<br />
declare @sources nvarchar(4000) = REPLACE(N&#039;insert into #sourceprts select src.* from ({{STATEMENT}}) src&#039;, N&#039;{{STATEMENT}}&#039;, @SourcePryStat)]]></description>
            <dc:creator>DeAndra Hayes</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Tue, 13 Nov 2018 22:11:54 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?60,668966,668966#msg-668966</guid>
            <title>Problem with migrating from SQL Server to MySQL (1 reply)</title>
            <link>https://forums.mysql.com/read.php?60,668966,668966#msg-668966</link>
            <description><![CDATA[ I&#039;ve got a problem during migration. To migrate data between SQL Server 2017 and MySQL I use MySQL workbench (version 8.0.12). When script for new tables generation is completed I can find that there are many places where int is set to default value of &#039;&#039;, for example:<br />
<br />
CREATE TABLE IF NOT EXISTS `myname`.`Table1` (<br />
  `version` INT NOT NULL DEFAULT &#039;&#039;,<br />
...<br />
)<br />
And this, of course, is not working in next steps. Since I&#039;ve got &#039;version&#039; column in each table, is there any way that I can change this globally?<br />
<br />
I know that I can go to each table and change it manually but it will be a lot of clicking...]]></description>
            <dc:creator>Michał Więckowski</dc:creator>
            <category>Microsoft SQL Server</category>
            <pubDate>Fri, 21 Sep 2018 12:50:39 +0000</pubDate>
        </item>
    </channel>
</rss>
