Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Tuesday, April 9, 2013

Convert MSSQL to MYSQL

For the sake of speed I developed a lot of ETL procedures in MSSQL 2008 and now have to convert them to MYSQL.

Some notes writing TSQL so that conversion is as painless as possible:
  • table aliasses are case sensitive
  • comments ("--") only work if there is a space after the dashes
  • Use Cast() instead of Convert(). MYSQL does have a Convert function, but the syntax is different. Also, the names of the data types you can convert to are different
When converting your code:
  • Datepart() does not work so change to Date_Format() instead. link
  • Dateadd() does not work so change to Date_Add() or Interval instead. link
  • All statements should be ended with a ";"
  • DateDiff is available in MYSQL but has different parameters. link
  • Cast() works in MYSQL but the type names differ. link
Be sure to run a find replace on the following:
  • "dbo." replaced with "MYSQLSchemaName."
  • ISNULL replaced with IFNULL
  • "[" replaced with "`" 
  • and "]" replaced with "`"

Thursday, February 21, 2008

SSRS - Report Subscription Error



We got an error when trying to create any type of report subscription.

Error Given:
The EXECUTE permission was denied on the object 'sp_verify_job_identifiers', database 'msdb', schema 'dbo'. The SELECT permission was denied on the object 'sysjobs', database 'msdb', schema 'dbo'.

Part of the solution can be found at:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1520081&SiteID=1

This only states that you should redo the databse connection. We tried that and it did not work. What you should do is: Go into your Report Services Config Manager, goto the set the Credential Type to "Windows Credentials" and then use sqlservice as the "Account Name"




Hope this saves some time