2012. június 21., csütörtök

Migrating MySQL to MS SQL


I got a question about the available solutions of migration from MySQL to MS SQL. Well, I have you admit I haven’t experiences of this but I found this topic very interesting. So I looked for a difficulties and possibilities.

I had a guess that I can solve parts of this task with SSIS. But perhaps this isn’t the best solution because SSIS can’t migrate right the procedures, triggers, etc.

I found two better way, both are tools designed directly to this job. One of these options is Spectral Core’s SQLTRAN that you can buy for 999 USD. This can also translate between the two SQL dialects (i.e. inside of stored procedures).

The other way is the free Microsoft migration tool, called SQL Server Migration Assistant (SSMA). This has many options and features too. On the website of this application you will find many useful links and there is a guideline to migrating that contains the most important issues and the main differences between these two databases.

Update:
Additionally, I recently read about one more solution that's called SwisSQL.

2012. június 3., vasárnap

Hány bit egy byte?

Két napja kérdezték tőlem, hogy egy bit típusú oszlop mennyivel növeli meg egy sor méretét? Kis gondolkodás után azt válaszoltam, hogy egy byte-tal. És kettő? Két byte-tal - válaszoltam gyanútlanul, és már bele is sétáltam a csapdába.

Az SQL Server ugyanis trükkösen tárolja a bit típusú adatokat. Nyolc bit egy byte, ennek megfelelően nyolc bit típusú oszlop fér el egyetlen byte-on. Ha az oszlopok száma 1 és 8 között van, akkor 1 byte-ot foglalnak, ha 9 és 16 között, akkor 2 byte-ot, és így tovább.