I set up a local database (SQL Server 2017 Express). Everything works fine, but I'm getting errors when creating even a simple stored procedure in SSMS.
For example, this
CREATE PROCEDURE [dbo].[EMS_Operations_SyncAssetTableByID2]
@Table_Name VARCHAR(255),
@Ids_For_Update VARCHAR(255),
@Is_Test BIT = 0
AS
BEGIN
DECLARE @DB_String varchar(55) ='Redesign'
END
Will not run, and I get the error message:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'PROCEDURE'.Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'PROCEDURE'.Msg 8180, Level 16, State 1, Procedure sp_describe_parameter_encryption, Line 1 [Batch Start Line 0]
Statement(s) could not be prepared.Msg 8180, Level 16, State 1, Procedure sp_describe_parameter_encryption, Line 1 [Batch Start Line 0]
Statement(s) could not be prepared.An error occurred while executing batch. Error message is: Internal error. The format of the resultset returned by sp_describe_parameter_encryption is invalid. One of the resultsets is missing.
I'm not sure what is causing this, or if there is corruption in the database, as there is encryption in the database, and I'm not sure what it's calling.
I also notice that there is a blue line underneath the first SQL Statement in the batch that says
@DB_String will be converted into a System.Data.SqlClient.SqlParameter with the following properties: SqlDbType = varchar,Size 55, Precision=0
When I run the same code on our remote server, it completes without issue. Any idea what could be causing this?