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 by Eli Leiba
computer keyboard with green sprouts between keys
Using the New OFFSET and FETCH NEXT Options 1
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 8
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.
IT/Dev Connections

Register now to get the best rate available!

From the Blogs
computer keyboard with blue save money key
Apr 15, 2014
blog

Save Thousands in Licensing Costs for SQL Server AlwaysOn Availability Groups

Windows Server 2012 or Windows Server 2012 R2 Standard Edition is a great way to save thousands on licensing—and save yourself some serious headaches when deploying SQL Server AlwaysOn Availabiliity Groups....More
Apr 8, 2014
blog

NoSQL: Eventual Consistency Yields Major Flaws

While I believe that NoSQL can have some places where it legitimately makes sense, I also believe that NoSQL is also the patently wrong choice for a number of different types of applications or use cases....More
Apr 1, 2014
News

SQL Server 2014 Now Available—No Joke

Initial word on the street is that SQL Server 2014 has been very stable so far—which is probably why it went to release so quickly and bypassed what would typically have been another pre-release....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) ×