SQL Under Siege: The Hidden Threats Lurking in Your Databases
Categories
- Free tools
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Inventory Manager
- SQL Query Tuner for SQL Server
- SQL Safe Backup
- SQL Secure
- SQL Workload Analysis for SQL Server
- Uptime Infrastructure Monitor Formerly Uptime
Changing GPO Description/Comment
GroupPolicy Module When you create a new Group Policy, you can set a comment (or description). There is no apparent way, however, to change the description later. Here is code that allows you to retrieve a group policy, then read and/or change the description. Make...
2 Ways to identify that we have a bad plan in SQL Server
SQL Server is a complex RDBMS with a lot of capabilities in it. I am sure most of us have just scratched the surface when it comes to working with SQL Server (including myself). In this article, I thought to take a more complex topic and will try to demystify some of...
Top 3 Sample Databases for PostgreSQL
If a developer is attempting to learn a new process or test some code, it’s best to utilize a test environment such as a sandbox rather than the production server. A sandbox environment is the place where there are scenarios like the real world but no real world data....
Replacing NTFS Permissions with SDDL Information
All PowerShell versions With Get-Acl, you can output the security information from files and folders as plain text in SDDL format (Security Descriptor Definition Language): $FolderToRead = 'C:\folder1' $securityDescriptor = Get-Acl -Path $FolderToRead...
Top 4 Startup Parameters DBAs Must Know
Introduction Working on a server is always something DBAs cherish. With every environment that they monitor, they want to know how applications can be optimally run on a specific server. In this constant pursuit of performance tuning, they always find unique ways of...
Pinging via IPv4
All PowerShell versions You can use ping.exe just like any other command inside PowerShell scripts. By adding “-4” to the command line, you can force ping to use IPv4 (add “-6” to force IPv6 instead). PS> ping localhost -4 ReTweet this...
Disable Scientific Notation for Sybase ASE FLOAT Data
How do we turn off scientific notation? I’m getting this in both text and grid results for Sybase ASE servers. create table myfloat ( floater float NOT NULL) go insert myfloat select (10000000000.00) go select * from myfloat go (Output)...
Execute IBM DB2 UDB Admin Commands in Aqua Data Studio
How to execute IBM DB2 UDB Admin Functions in Aqua Data Studio ? IBM DB2 has server SQL commands, and commands that are part of their command line tool. SQL Commands are executed on the server, while the command line commands are executed on the client by the native...
5 Different Ways to Start SQL Server Services
If nothing works, then a restart works. This is the exact sentiments that an Administrator has when it comes to working with software. If you are working as SQL Server DBA, you must have done this many times – restart SQL Server Services. It’s always interesting to...
Getting the Number of Lines in a String
All PowerShell Versions Here is a clever trick how to find out how many lines a string (not a string array!) contains: $text = @' This is some sample text Let's find out the number of lines. '@ $text.Length - $text.Replace("`n",'').Length...
Finding Minimum and Maximum Values
All PowerShell Versions To find the smallest and largest item in a range of numbers, use Measure-Object: $list = 1,4,3,1,3,12,990 $result = $list | Measure-Object -Minimum -Maximum $result.Minimum $result.Maximum This works for any input data and any data type. Here...
Getting Files with Specific Extensions Only
All PowerShell versions When you use Get-ChildItem to get a list of files, you may have noticed that the -Filter parameter occasionally returns more files than you’ve expected. Here is an example of this. This line does not just return files with a...
DBAs and Dinosaurs
You have to admit that title is catchier than yet another “Death of the DBA” blog. And that was exactly the direction I was headed until I ran a quick search to find a reference that not only exposed actual predictions of the death of the DBA as a profession but...
Testing UNC Paths
Test-Path can test whether or not a given file or folder exists. This works fine for paths that use a drive letter, but can fail with pure UNC paths. At its simplest, this should return $true, and it does (provided you did not disable your administrative shares):...
Exporting and Importing Credentials in PowerShell
Credential objects contain a username and a password. You can create them using Get-Credential, and then supply this object to any cmdlet that has the -Credential parameter. However, what do you do if you want your scripts to run without user intervention yet...
Use $PSScriptRoot to Load Resources
Beginning in PowerShell 3.0, there is a new automatic variable available called $PSScriptRoot. This variable previously was only available within modules. It always points to the folder the current script is located in (so it only starts to be useful once you actually...
Changing FireMonkey style at runtime
Last month Sarina DuPont blogged about loading custom FireMonkey styles on a mobile device at runtime ("How to load custom styles at runtime"). That's a very interesting approach to compile a custom style as a resource into the mobile app. This week...
Getting More Than 1000 Active Directory Results
By default, Active Directory returns only the first 1000 search results when you use an ADSISearcher. This is a security mechanism designed to prevent unspecific LDAP queries from causing domain controller load. If you do need all search results and know that it will...
Converting Binary SID to String SID
Converting SID from Binary to String Active Directory accounts contain the SID in binary form. To convert the byte array into a string representation, use a .NET function like this: # get current user $searcher =...
Converting Excel CSV to UTF8
When you export Microsoft Excel spreadsheets to CSV files, Excel by default saves CSV files in ANSI encoding. That's bad because special characters will break once you import the data into PowerShell using Import-Csv. Ensuring UTF-8 Encoding for CSV Files To make sure...