Eli Leiba

Eli
Leiba

Eli Leiba works at Israel Electric Company as a senior application DBA in Oracle and Microsoft SQL Server. He has a bachelor of science degree in computer science and 21 years of experience working with databases. Eli holds certifications from Microsoft and Brainbench in Oracle and SQL Server database administration and implementation.

Eli Leiba works at Israel Electric Company as a senior application DBA in Oracle and Microsoft SQL Server. He has a bachelor of science degree in computer science and 21 years of experience working with databases. Eli holds certifications from Microsoft and Brainbench in Oracle and SQL Server database administration and implementation. He also teaches SQL Server DBA and development courses at Microsoft CTEC and serves as a senior database consultant for several Israeli start-up companies.

Articles
computer keyboard with green sprouts between keys
Using the New OFFSET and FETCH NEXT Options 3
New in SQL Server 2012, these T-SQL options can be quite useful for retrieving a fixed number of rows from sorted output.
Automated SQL Server Health Check Solution 9
Manually monitor SQL Server instances for problems daily using this automated solution that checks CPU utilization, database status, available disk space, and more.
computer keyboard with read question mark key
Execute a Stored Procedure Within a Query
Stored procedures are typically executed with an EXEC statement. However, you can execute a stored procedure implicitly from within a SELECT statement, provided that the stored procedure returns a result set. The OPENROWSET function is key to this technique.
fingers typing on a laptop
Simple String Encryption and Decryption
In SQL Server 2008 and SQL Server 2005, one of the easiest ways to encrypt and decrypt strings is to use T-SQL's ENCRYPTBYPASSPHRASE and DECRYPTBYPASSPHRASE functions.
Change Many Server Configuration Options in One Fell Swoop 1
You can change many configuration options in SQL Server 2005 and SQL Server 2000 simultaneously by using a.config file and a T-SQL stored procedure that automates the use of the sp_configure system stored procedure.
Find Weak Database Passwords 2
Use this password-cracking tool to check the complexity of the passwords being used for SQL Server database logins.
Use a Stored Procedure to Move User Tables Between File Groups
Here's a T-SQL stored procedure that finds and moves the clustered-indexes user tables you specify from old file groups to new file groups.
T-SQL Stored Procedure Creates Trace Tables from Trace Files
LoadTraceFileToTable loads the data from a trace file into a trace table so that you can easily sort and analyze that data.
T-SQL UDF Quickly Determines How Often a Substring Appears 3
To determine the number of occurrences of a substring within a string, a user-defined function (UDF) performs a simple arithmetic calculation.
Protect Your T-SQL Objects from Deletion 1
The sp_markAllMasterDBasSystem stored procedure can help protect the T-SQL objects you've created by marking them as system objects.
Procedure Helps Pinpoint Problematic Processes 1
Here's a stored procedure that displays all the T-SQL statements currently being executed along with the IDs of the processes running those statements.
Easily Find Rows That Violate Constraints 3
The showViolatingRows procedure automates the tedious task of finding rows that violate check and foreign-key constraints.
Summarize All the Constraints for a Table
The sp_showConstraints stored procedure is an alternative to using sp_helpconstraint when you need to find all the constraints for a table.
Rename Files or Directories On the Fly in T-SQL Scripts 1
Extend the sp_spaceUsed Procedure’s Usefulness in Obtaining Transaction Log Statistics
By compiling sp_LogSpace in a master database and calling it from an updated version of sp_SpaceUsed, you can extend the ability of sp_SpaceUsed to obtain transaction log statistics.

Digital Magazine Archives

Browse back issues of SQL Server Pro, from January 2007 through the last issue published in April 2014. Find the back issues here.

 

From the Blogs
Jul 28, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 29: Practical Implementation Tips

My initial goal in writing this series of posts was to outline some of the concerns surrounding Availability Groups (AGs) and SQL Server Agent Jobs – and call out how there is virtually no guidance from Microsoft on this front and then detail some of the pitfalls and options available for tackling this problem domain. I initially expected this series of posts to have between 25 and 30 posts – according to some of the early outlines I created ‘way back when’....More
Jul 6, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 28: Additional Options for Tackling Jobs Failover

Throughout this series of posts I’ve taken a somewhat pessimistic view of how SQL Server Agent jobs are managed within most organizations – meaning that most of the code and examples I’ve provided up until this point were based on assumptions about how CHANGE to jobs is managed. That pessimism, to date, has come in two forms:...More
Jul 1, 2015
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 27: Options and Concerns for More Advanced Deployments

In this series of posts I’ve called out some of the concerns related to SQL Server AlwaysOn Availability Groups and their interaction with SQL Server Agent jobs – both in the form of Batch Jobs (see post #3) and backups....More
SQL Server Pro Forums

Get answers to questions, share tips, and engage with the SQL Server community in our Forums.

Sponsored Introduction Continue on to (or wait seconds) ×