About

Latest & greatest news, updates and musings on Microsoft SQL Server from a certified Microsoft Technology Specialist in SQL Server. Come here to find what is the newest & exciting news from Microsoft SQL Server. Enjoy! Follow me on Twitter here.

2 responses to “About

  1. Hello, Your blog is really nice and am a regular read.

    I have a quick question…. how can i change following function to equivalent to SQL function. Any help will be appreciated.

    Thanks,
    Abi
    ===========================
    CREATE FUNCTION [dbo].[GET_MONTH_DATES]
    (
    )
    RETURNS varchar(8000)
    AS
    /*Generated by SQL Server Migration Assistant for Oracle version 5.1.1106.*/
    BEGIN

    DECLARE
    @active_spid INT,
    @login_time DATETIME

    SET @active_spid = sysdb.ssma_oracle.GET_ACTIVE_SPID()

    SET @login_time = sysdb.ssma_oracle.GET_ACTIVE_LOGIN_TIME()

    DECLARE
    @return_value_argument varchar(8000)

    /*
    * SSMA warning messages:
    * O2SS0452: “xp_ora2ms_exec2_ex” when called from within UDF cannot bind to outer transaction. It can lead to dead locks and losing transaction atomicity. Consider calling $impl procedure directly.
    */

    EXECUTE master.dbo.xp_ora2ms_exec2_ex
    @active_spid,
    @login_time,
    N’DB_USER’,
    N’DBO’,
    N’GET_MONTH_DATES$IMPL’,
    N’true’,
    @return_value_argument OUTPUT

    RETURN @return_value_argument

    END
    GO

    EXEC sys.sp_addextendedproperty @name=N’MS_SSMA_SOURCE’, @value=N’DB_USER.GET_MONTH_DATES’ , @level0type=N’SCHEMA’,@level0name=N’dbo’,
    @level1type=N’FUNCTION’,@level1name=N’GET_MONTH_DATES’
    GO

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s