MIGRATION FROM SQL 2005 TO SQL 2012 (SP_MAKEWEBTASK)

  • hi,

    we are going to migrate from sql 2005 to sql 2012

    In testing we are facing issue in sp_makewebtask using sql 2005

    sp_makewebtask Its a depricated featue in sql 2012 how to achieve this procedure

    we are using this into lot of procedures

    ===============================================

    ITS AVAILBALE IN SQL 2005

    ====================

    DECLARE @strDBName VARCHAR(50);

    DECLARE @strQuery VARCHAR(800);

    DECLARE @cmdText VARCHAR(1000);

    DECLARE @strIncludeFilePath VARCHAR(255);

    DECLARE @strFilePath VARCHAR(255);

    DECLARE @strFileName VARCHAR(255);

    SELECT @strFilePath = strServerRoot, @strDBName = strDBName FROM xxx

    SELECT @strFilePath = @strFilePath + 'includes\'

    SELECT @strFileName = 'xxx'

    SELECT @strFileName = @strFileName + '.inc'

    PRINT @strFileName

    SELECT @strQuery = 'SELECT COUNT(a.iuserid) FROM xxx a, xxx b WHERE a.chActive = ''''Y'''' and

    a.iuserid = b.iuserid and b.strmember = ''''Member''''' + 'SELECT COUNT(a.iuserid) FROM tblUserInfo a,

    tblcontentinfo b WHERE a.chActive = ''''Y'''' and a.iuserid = b.iuserid and b.strmember = ''''Associate Member'''''

    PRINT @strQuery

    SELECT @cmdText = 'sp_makewebTask @outputfile = ''' +

    @strFilePath + @strFileName + ''', @query = ''' + @strQuery + '''' + ', @templatefile = ''' +

    @strFilePath + 'template\xxx.tpl'', @dbname = ''' + @strDBName + ''''

    PRINT 'cmdtext = '+ @cmdText

    EXECUTE(@cmdText)

    END

    please give any alternative solutions ........................

  • I've never used this, so I don't have a good answer for you. The suggested Microsoft answer is to switch to using SSRS to generate HTML. They don't have a single replacement.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • sp_makewebtask does not exist in SQL 2012. You will have to re-engineer anything that uses sp_makewebtask to use different facilities.

    As already noted, Microsoft suggests using SSRS to generate HTML. To my mind this is tactical rather than strategic advice.

    You should get your technology architects to look at what you need to achieve with your web-based output, and design the most appropriate solution for your requirements. The solution you implement may well need skills outside of the DBA area to develop it.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply