Author: Basit Aalishan Masood-Al-Farooq

SQL Server

User-defined functions (UDFs) – Part-2

User-defined functions (UDFs) – Part-2 Author: Basit A. Farooq Editor’s Note: In this second of the two part article series, you’ll about creating and using in-line table functions, and multi-statement table functions. You used CREATE FUNCTION, ALTER FUNCTION, DROP FUNCTION, and SQL Server Management Studio to create and manage functions. You learned about a related object, CLR aggregates. Creating a […]

SQL Server

SQL Server recovery procedures for a catastrophic failure – (Part-2)

SQL Server recovery procedures for a catastrophic failure – (Part-2) Author: Basit A. Farooq To rebuild master follow the instructions below: Execute Setup.exe as follows: start /wait setup.exe /qn INSTANCENAME=instance_name REINSTALL = SQL_Engine REBUILDDATABASE=1 SAPWD=strongpassword Setup recreates the resource database and the master database. Install any necessary service packs. Attach any user databases or restore databases from backup. If the […]

SQL Server

User-defined functions (UDFs) – Part-1

User-defined functions (UDFs) – Part-1 Author: Basit A. Farooq Editor’s Note: In this first of the two part article series, you’ll compare and contrast stored procedures for creating and using scalar valued functions, in-line table functions, and multi-statement table functions. You’ll learn about syntax and parameters of CREATE FUNCTION statement. User-defined functions (UDFs) are similar to system functions, except that […]

SQL Server

SQL Server recovery procedures for a catastrophic failure – (Part 1)

SQL Server recovery procedures for a catastrophic failure – (Part-1) Author: Basit A. Farooq A database server is usually a mission-critical component. Having a recovery plan in place is essential to ensuring the business can continue to operate in the event of hardware failure, natural disaster, or other catastrophe. A backup or standby server is an option, but not always […]

SQL Server

SQL Server 2014: User Views – (Part-2)

SQL Server 2014: User Views – (Part-2) Author: Basit A. Farooq     Editor’s Note: In this second part, you’ll learn about the SCHEMABINDING requirement for creating indexed views, which are persisted views. You’ll also learn that local partitioned views are being deprecated, though partitioned views based on federated servers are still commonly used.   Creating views by using SQL […]

SQL Server

SQL Server security – (Part 7)

SQL Server security – (Part 7) Author: Basit A. Farooq In this part, you’ll first learn how SQL Server manages ownership chaining and learned how to change an object’s owner. You changed the security context for a session. Then, you’ll learn how to manage security for CLR assemblies. Finally, you’ll learn when to use SAFE, EXTERNAL_ACCESS, and UNSAFE permissions sets. […]

SQL Server

SQL Server security – (Part 6)

SQL Server security – (Part 6) Author: Basit A. Farooq Editor’s note: In this part, you’ll learn how to create and manage application roles. Application roles You create an application role when you want an application to have a specific level of access, regardless of who’s using the application. You can use an application role to ensure that certain functions […]

SQL Server

SQL Server security – (Part 5)

SQL Server security – (Part 5) Author: Basit A. Farooq Editor’s note: In this part, you’ll learn how to manage securables at the database and schema scope. You’ll learn how to use fixed database roles and how to create custom database roles to manage permissions. Database and schema securables – Overview Each database has a number of securables that inherit […]

SQL Server

SQL Server security – (Part 4)

SQL Server security – (Part 4) Author: Basit A. Farooq In this forth part of the SQL Server security article series, you’ll first learn how to manage securables at the server scope. Then, you learn how to set permissions using GRANT, DENY, and REVOKE. You’ll also learn how to use fixed server roles to configure access permissions to server-scoped objects. […]