Category Archive: MSSQL

Dec 13 2011

Using RAND() in user defined function

Ever wanted to use a random number in a TSQL UDF? And getting an error message like this: Msg 443, Level 16, State 1, Procedure RandomString, Line 22 Invalid use of a side-effecting operator ‘rand’ within a function. There’s a quick (and dirty) solution for this.

Continue reading »

Aug 29 2011

Failed to generate a user instance – MSSQL

Failed to generate a user instance of SQL Server due to failure in retrieving the user’s local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Continue reading »