Showing posts with label Sql. Show all posts
Showing posts with label Sql. Show all posts

Saturday, September 29, 2012

login failed for user ‘rob’ reason the account has expired

 

image

Promoting this error message my application has stopped working.The reason for that is expiration of the user which i have use to connect to sql server.later on i have investigate the user account in sqlserver and identified the root cause for that.

when i was creating the user i have checked the Enforce Password Expiration Check

Untitled

Finally i uncheck the check and changed the password again.now its work fine

Thursday, May 10, 2012

execute scalar function in sql server

As follows you can test your scalar function in sql server.Result holding variable type should be same as the function return type.

DECLARE @RESULT VARCHAR(2500)

EXEC @RESULT= FUNC_GET_VC_COLUMNS_ENCODED 'CO_LINE','PRI1234',0,1,1,1

PRINT @RESULT

Note:My sql server  version is 2008 R2.If you use sql server  2008 some time you might have to use schema also.

EXEC @RESULT= dbo.FUNC_GET_VC_COLUMNS_ENCODED 'CO_LINE','PRI1234',0,1,1,1