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
Dec 16, 2014
Sponsored

Eight SQL Server Signs the Illuminati Exist

Make no mistake about it, the signs that the Illuminati exist are all around us. You can find their markings on our buildings, on our currency and even in our music videos. That’s right, they’re everywhere!...More
Dec 2, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 16: Job Synchronization Checkup Logic

With Linked Servers configured to allow cross-host or cross-box communication between the servers you’re using to host your AlwaysOn Availability Groups, it’s time to start looking at some scripts that can be used to regularly check whether or not SQL Server Agent jobs are correctly synchronized across all servers in your topology....More
Abstract illustration of linked SQL Servers
Nov 18, 2014
blog

AlwaysOn Availability Groups and SQL Server Jobs, Part 15: Setting Up Linked Servers

Learn about setting up Linked Server definitions to let two (or more) servers in an AlwaysOn Availability Group talk to each other and check up on job statuses of jobs running on each other....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) ×