1
Vote

Shutdown column name in Stored Procedure

description

The migration wizard will not script a stored procedure that contains a column named with "WSShutdown".
 
Error from script generator
StoredProcedure [dbo].[WorkstationBootGet] -- Shutdown is not supported in current version of SQL Azure
 
 
Stored Procedure
 
CREATE PROCEDURE [dbo].[WorkstationBootGet]
@WSID_K int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

SELECT [dbo].[tblWorkStation].[WSID_K], [WSStartup], [WSShutdown], [WorkstationLog_K]
FROM [dbo].[tblWorkStation] inner join [dbo].[tblWorkstationBootHistory]
    on [dbo].[tblWorkStation].WSID_K = [dbo].[tblWorkstationBootHistory].WSID_K
Where ([dbo].[tblWorkStation].[WSID_K] = @WSID_K)
order by WSStartup desc, WorkstationLog_K desc

END

comments

ghuey wrote Oct 6, 2011 at 2:17 PM

Just to be sure here, SQLAzureMW still scripts the stored procedure. It just flags an error that it found the word "Shutdown". You can ignore the warning and still have SQLAzureMW execute the script against your target server and procedure WorkstationBootGet should be there.

Also, edit NotSupportedByAzureFile.Config and go to line 329. There you should find “(SHUTDOWN|SIGN…”. Modify that to add a \n before SHUTDOWN to look like this:
    <NotSupported Text="(\nSHUTDOWN|SIGNBYASYMKEY|SIGNBYCERT|snapshots.fn_trace_getdata|(UPDATE|WRITE)TEXT|XML_SCHEMA_NAMESPACE)" ReplaceWith="" SeverityLevel="2" ReplaceString="false" DisplayWarning="true" DefaultMessage="true" WarningMessage="" />
That should tighten up the regex a little and not show the false warning. I have made this change in v3.7.8.

Regards,
George

achopp wrote Oct 6, 2011 at 5:48 PM

You are correct. The stored procedure was created. I was using the application to backup my SQLAzure database, so I didn't look to see if the stored procedure was created.