297 0
Database Threats and how to Prevent them

I am tasked with security of the systems database, as the previous operation lacked securtiy and left gaping holes in the system. The Systems information was leaked, and clients refords were leaked as well as workers salaries. I need to find One technique or strategy to prevent this information loss, and propose how we will prevent this in future. I am relitivly new to DBMS, can you please help me.

...
Type
Question
279 0
How to update table variable in stored procedure from another user defined function in sql?

Scenario : User defined function return one table. If that table contains at least one row,one column in the table variable from another sp should get updated.

Should I use cross join on UDF to update table variable?

sql

...
Type
Question
204 2
Is sql server management studio free to use?

Hello, I can across a question earlier today while working at the office and would like to know if sql server management studio is free to use or we need to pay for it?

...
Type
Question
141 1
There is error while executing stored procedure

Getting error in SQL server stored procedure when executing it:

...
Type
Question
71 0
there is error while executing stored procedure
  1. USE [ConsumerBanking]  
  2. GO  
  3. SET ANSI_NULLS ON  
  4. GO  
  5. SET QUOTED_IDENTIFIER ON  
  6. GO  
  7.   
  8. CREATE  PROCEDURE [dbo].[GetCBLoginInfo]  
  9.     @UserName VARCHAR(20),  
  10.     @Password varchar(20)  
  11. AS  
  12. SET NOCOUNT ON  
  13. Declare @Failedcount AS INT  
  14. SET @Failedcount = (SELECT LoginFailedCount from CBLoginInfo WHERE UserName = @UserName)  
  15.   
  16. IF EXISTS(SELECT * FROM CBLoginInfo WHERE UserName = @UserName)  
  17.   
  18.  BEGIN  
  19.   
  20.  IF EXISTS(SELECT * FROM CBLoginInfo WHERE UserName = @UserName AND Password = @Password )  
  21.     SELECT 'Success' AS UserExists  
  22. ELSE  
  23.   
  24. Update CBLoginInfo set  LoginFailedCount = @Failedcount+1  WHERE UserName = @UserName  
  25.   
  26. Update CBLoginInfo set LastLoginDate=GETDATE()  WHERE UserName = @UserName  
  27.  BEGIN  
  28. IF @Failedcount >=5  
  29.   
  30.   
  31. SELECT 'Maximum Attempt Reached (5 times) .Your Account is locked now.' AS UserExists  
  32. ELSE  
  33.   
  34. select CONVERT(varchar(10), (SELECT LoginFailedCount from CBLoginInfo   WHERE UserName = @UserName))   AS UserFailedcount  
  35. END   
  36. END  
  37.  ELSE  
  38.   
  39.  BEGIN   
  40.   
  41. SELECT 'User Does not Exists' AS UserExists  
  42.  END  
...
Type
Question

Page 6 of 6