Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Daily Coping Tip

Connect with someone from a different generation

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Securing Your Instances

I wrote a post about finding the port number of a SQL instance using PowerShell. Almost immediately I was taken to task by someone that noted port scanners can easily find SQL ports, so it's silly to move off 1433. Just use it because applications expect it. I can see that, and changing ports doesn't provide much security, but it does provide some obscurity, which may or may not be helpful. Certainly this also creates administrative and support burdens for a system. If you want other opinions, there's a Q&A on Stack Exchange for this topic as well.

Tom LaRock wote a post that this can be a way to obfuscate your database, prevent simple default connections, and potentially detect security issues before they become a problem. I tend to learn towards this approach as well, because these small changes can potentially provide a little protection. A port scan is quick, but firewalls are getting better at detecting these. Certainly criminals get smarter, but changing a port number isn't intended to stop everyone. If it stops a few, then that's fine.

Security comes about because of layers, and limitations, and will never be perfect. There will always be ways that someone can get around security, but the more layers, the more obstacles you place in their way, the fewer people that will overcome all of them. I'd also note that plenty of attacks come from vandals. People that are just bored and looking for easy ways to get into a system. Most of these people are using pre-written scripts and programs that try out defaults. These aren't concerted, directed attacks. They're attacks from boredom.

I'm curious today how many of you think a little bit of security from obfuscating ports is a good idea. I wouldn't recommend the SQL Browser be open, but that legitimate connections know about the port needed, and use that in their connection strings. I think it helps, and if this limits some attacks, especially inside-the-firewall virus attacks from trusted machines, I think it's worth doing.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents
SQLServerCentral Article

Conditional Formatting with SSRS

Thom A from SQLServerCentral

An introduction on how to implement condition formatting of cells, such as the font and background colour or font weight, within SSRS using SSRS Expressions.

External Article

Is Azure SQL Database a Good Choice for your Database Applications?

Additional Articles from MSSQLTips.com

In this article, we cover things you should know about Azure SQL Database and why this may be a good choice for your database applications.

External Article

Why bother automating?

Additional Articles from Redgate

Bob Pusateri, Database Engineering Lead at Salesforce, joined our recent Summit to discuss how automation can enable digital transformation. Listen in full.

From the SQL Server Central Blogs - PASS Summit 2022 - Day 1 In Pictures

@DBA_ANDY from Nebraska SQL from @DBA_ANDY

The first "full" day of PASS 2022 kicked off with a bang when Rohan Kumar (@RohanKData) stepped out on the keynote stage to announce SQL Server 2022 was GA...

Blog Post

From the SQL Server Central Blogs - Select All in a Power BI Slicer–#SQLNewBlogger

Steve Jones - SSC Editor from The Voice of the DBA

One of the things I’ve been working on this year is a Power BI report for the kids I coaco in volleyball. As a part of this, I want...

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

The Black Friday Sale

I noticed that Brent Ozar is having a Black Friday sale on courses. The Level 1 Bundle is quite a deal at US$395 instead of $1785. If I wanted to determine what is the percentage savings of this bundle from the original price, which of these code lines would I run?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Searching Strings

I have a table of address values that looks like this:

If I run this code, what happens to the addresses in the result set?

SELECT SUBSTRING(at.AddressValue, PATINDEX('%[^9]%', at.AddressValue), LEN(at.AddressValue))
FROM dbo.AddressTable AS at

Answer: The 9 is stripped from the numerical part of the address is not returned when it starts with a 9

Explanation: This regular expression looks for the index where the first number is not a 9. For most rows, this is 1. For those that start with a 9, this is two, so this strips the 9 from the beginning of a numerical address. Ref: PATINDEX - https://learn.microsoft.com/en-us/sql/t-sql/functions/patindex-transact-sql?view=sql-server-ver16

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Development
query help - Hi All, I have 2 tables. both tables hold db file sizes. I want the difference of sizes using tsql. As of now, I am using excel for this. During prod refresh activity to non-prod environments , we are falling short of drive spaces. So, Checking for script to find size differences using tsql. Providing […]
equivalent of SET DATEFORMAT DMY that can be used in a function - I have a table function that needs to strip some text from a string and see if the remaining string is a valid date.  (Don't ask... crappy database design and application over which I have no control!) The problem is that we are in the UK and the database/instance has been set up to default […]
SQL Server 2016 - Administration
Update Statistics - In AG, mirroring, Log Shipping and Transactional replication if I Update statistics on primary will it run on secondary also?
SQL Server 2016 - Development and T-SQL
hex conversion -   I am trying to convert some numbers pulled from a char field. I would like to pull the 1 and 46 from the 000.001.070.000.0 to return as 1.46 . I tried a couple of things but not quite hitting the mark. create table Models ( Modelid integer, Modelnameid char(17) ); insert into Models values […]
change field length - Old Sql2008 box and I need to change 4 fields length on a table which contains 18+ million records. It's going from varchar(10) to varchar(12) I tried from SSMS but timed out ... If I do an alter ALTER TABLE [xxx] ALTER COLUMN yyy VARCHAR (12) NULL. I have 8 active connections to the database. […]
SQL Server 2019 - Administration
SQL server service account to choose - Hi All, We are  running on small online web based application and server is workgroup cannot create domain account. Which is best account to the SQL server -- Default it is running under "NT Service\MSSQLSERVER", can I change this is to local service account. Since our server is getting log on failure and hack as […]
Apply restore to a database with full and differential at different time. - I am trying to test to restore database from prod server to test server. It is a small database. On production server we have full backup at weekend, and then differential at weekday nights, I am using UNC drive to connect to the backup location on production. I can add files of a full backup […]
Error on sql server : cannot find account that is causing this error - Log entry: Error: 17806, Severity: 20, State: 14. SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The operating system error code indicates the cause of failure. The logon attempt failed [CLIENT: IP Address]   Can anyone help me resolve […]
SQL Server 2019 - Development
Issues with creating a foreign key - Hello, my name is Di, and its the second time I wrote a topic for this forum, I am having some issues for writing a query where I need to create a foreign key, I already search on some places at internet, but none of then helped me, can you guys help me?
Uploading CSV into PosgreSQL - CREATE TABLE movie_data ( id SERIAL Movie_Title VARCHAR (100), Release_date VARCHAR (100), Wikipedia_URL VARCHAR (100), Genre VARCHAR (50), Director_1 VARCHAR (50), Director_2 VARCHAR (50), Cast_1 VARCHAR (100), Cast_2 VARCHAR (100), Cast_3 VARCHAR (100), Cast_4 VARCHAR (100), Cat_5 VARCHAR (100), Budget MONEY (50), Revenue MONEY (50), Primary Key (id) )
SQL Azure - Administration
How can I create a table in Power BI Datamart using SSMS? - Here is a little information on what Power BI Datamart is: "Datamarts help bridge the gap between business users and IT. Datamarts are self-service analytics solutions, enabling users to store and explore data that is loaded in a fully managed database. Datamarts provide a simple and optionally no-code experience to ingest data from different data […]
Amazon AWS and other cloud vendors
Lambda authorizer and Parameter Store dilemma - I've been using an authorizer in front of all my lambdas. The authorizer simply tries to decode the bearer token received, and if it's decoded correctly, authorizes the integration lambda to execute (and passes the user id to the event). My issue is that I realized I'm spending a lot of money in Parameter Store […]
Reporting Services
Export to Excel - how long does it take - Hello, I have not used SSRS in a number of years so hoping for some anecdotal feedback. Recently I have joined project where it takes ~ 5 min to export 50k rows to excel. Export to csv is within 40 seconds typically. This is on a plain tabular grid - no fancy formatting. Care to […]
General
SQL 2022 RTM Install - Hi there, I have previously installed SQL 2022 RC1 on a dev server and now i'm looking to upgrade this to the recently released  RTM version. I've not yet run through the install yet, however  from what i can see this may require a new SQL install or is there an in place upgrade option […]
Disaster Recovery
log shipping what if I need transaction logs backup on my primary database. - I am trying to understand  log shipping. Try to see if it can be used for our disaster recovery purpose on another location. we will only use the second location when main location has a disaster. I understand we have to stop our regular maintenance plan for transaction log backups otherwise it will be conflict. […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -