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 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 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
business people around a table and laptop
Oct 9, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 10: Dynamic Detection Gotcha #3

You can interject a SQL Server Job Step into your Jobs and have this new/injected Job Step do some checking for you. Here's a look at everything that’s involved in such an approach....More
Man holding a piece of paper with the word GOTCHA
Oct 7, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 9: Dynamic Detection Gotcha #2 3

Given that a USE statement is parsed before code is actually run, there are a few options that could be used as a around when it comes to detecting whether or not code should be run....More
iceberg
Oct 2, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 8: Dynamic Detection Gotcha #1 1

Learn about why the option of dynamically detecting whether or not to run a SQL Server Job at execution time is quite a bit more problematic than you might think....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) ×