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

Daily Coping Tip

Say positive things to the people you meet today

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.

Default Credentials

Years ago I got a call to help someone with a database. I walked over to their desk (when this was possible) and sat down. They asked me how they could get into a database they had been told about. I quickly realized this was an Oracle database and asked for credentials for SQL*Plus. This person didn't have any, but I was able to log in with SYSTEM and MANAGER.

This was a small department system of some sort, but it always struck me that the default credentials were available. Since then, every time I've encountered an Oracle database, I've tried those credentials. I've been amazed how often they worked, even for production systems.

Recently there was a report that the Nissan corporation had some of their source code leaked. While I would prefer that the code running inside cars was open and widely examined, I was more dismayed that the leak was from an internal Git server with default credentials. Maybe even worse is the defaults are admin and admin, something that might not be hard to guess.

I understand people make mistakes, and I do get that there are pressures people feel to get work done, but there isn't a good excuse to stand up any server in production with default credentials, and I'd argue a VCS server is production. Even if you didn't install the server and were just moving it to a new role, or you take over administration, you can't leave default credentials around. You certainly can't accept "admin" as a password in 2021.

To me, this is grounds for termination. If nothing else, it's certainly a reason to remove someone from a privileged position. Being this lax with security would worry me, and I don't know that I could trust that you'd been careful with other parts of your job. If I encountered this, I would request that every other system under management be audited for improper admin accounts.

Steve Jones - SSC Editor

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

 
 Featured Contents

Using an RDL File Locally in .NET to Print Reports

bkubicek from SQLServerCentral

The need to print doesn't seem to go away. Using RDL format report file you can print local reports in .net to PDF without having to connect to a Reporting Service Server.

SQL Server Monitoring for all Availability Groups

Additional Articles from MSSQLTips.com

In this article we present a PowerShell script that can help you monitor all of your SQL Server Availability Groups in your environment.

From the SQL Server Central Blogs - Git in 10 commands to do 99% of gitting and keeping out of trouble

Ed Elliott from Ed Elliott's Sql Developer Blog

Git is hard, probably harder than it needs to be but I have been using it for about 5 years and have a workflow that works for me. I...

From the SQL Server Central Blogs - How does Query Store capture cross database queries?

matthew.mcgiffen 73574 from Matthew McGiffen DBA

Query Store is a configuration that is enabled per database, and the plans and stats for queries executed in that database are stored in the database itself. So what...

 

 Question of the Day

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

 

Re-OPENing a Cursor

I have this data:
RSSFeedID   FeedName
----------- -----------------------------------
1           SQL Server
2           .NET
3           Azure SQL Database
12          Azure SQL Data Warehouse
I now run this code:
DECLARE mycurs CURSOR FOR
SELECT rf.RSSFeedID, rf.FeedName FROM dbo.RSSFeeds AS rf ORDER BY rf.RSSFeedID;
DECLARE
    @id INT
  , @feed VARCHAR(50);
OPEN mycurs;
FETCH NEXT FROM mycurs
INTO
    @id
  , @feed;
FETCH NEXT FROM mycurs
INTO
    @id
  , @feed;
SELECT @id, @feed;
CLOSE mycurs;
OPEN mycurs;
FETCH NEXT FROM mycurs
INTO
    @id
  , @feed;
SELECT @id, @feed;
CLOSE mycurs;
DEALLOCATE mycurs;
What ID is returned by the last (third) SELECT?

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)

Checkout One File

I am working in git and I get an email that another developer has changed the GetCustomer.sql file in his featureCustomerUpdate branch. I am working on the featureOrderChange branch.

How can I easily get the changes another developer made in his branch into mine?

Answer: You can run "git checkout featureCustomerUpdate -- GetCustomer.sql

Explanation: You can pull one file from another branch with git checkout. You can also use this with other commits. Ref:

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 - Administration
Performance - I am assisting with a migration. doing a V to V migration from a legacy environment to the hosted infrastructure. I want to do some baseline testing and wondered if there are some scripts i could run in SQL that i could run on the legacy and on the new environment to compare so I […]
SQL Server 2017 - Development
Temp Table Strategy - I have a set of reports - with user defined criteria.  And an optional set of statistics which are produced on the report.  These are not db table stats, but things like aggregates, trends and statistical analysis of the data.  The happy user then downloads their data and moves on to something else. The reports […]
SQL Server 2016 - Administration
Statistics issues - Hi All, Looking for some clarifications on UPDATING STATISTICS. In our production env, we have 3 TB database with Auto_create stats option is set to true. Every weekend on Saturday midnight we run update stats with full scan. However, during the mid of the week, application developers keep complaining that few queries are running slow. […]
memory utilisation - How can we calculate the memory and cpu utilisation of sql for the last 3 months ?
SQL Server 2016 - Development and T-SQL
Update large table rows within a group - I have a large employee table with lots of columns and versions and one org lookup table also with some versions. I need to update a column org_id in employee table  which is all nulls now with no history. An employee can have multiple versions records each with same empid but same or different rc_code. […]
CAST(NULL AS varchar(1)) - Hello All, I have been tasked to improve a very old SQL code we have and first thing I see (may not necessarily be the candidate for performance improvement though) going through the code is many CASE records with CASE WHEN myColumn IS NULL THEN CAST(NULL AS varchar(1)) .... Can one advise why someone would […]
SQL 2012 - General
SSIS ForEach Loop not finding file - I used to know how to do this, I think, but I wonder if my memory is playing tricks on me. I need a ForEach loop to find a file that the name changes daily. Normally, I'd use a wildcard (*), but in this case it doesn't seem to be working. I've searched all my […]
SQL Server 2019 - Administration
SQL Permissions - My understanding is you can't grant access to users with select, View database and view definitions etc. at instance level without any user databases created on it. Please advise?
authgrowth log during rebuil index - Good morning all , Have any idea how I can reduce disk consumption during the reindexing phase I use the IndexOptimize procedure of the olla script  
SQL Server 2019 - Development
Better way to flatten meta type data? - I have the following table how would I be able to get a view similar to SELECT [ID], [NAME], [Imaging], [Long Term], [Auto], [Factory], [Central Office], [Pizza] FROM [Some SQL Magic Code]; The best I've come up with is multiple selects with where clauses to create tables and then join all of them.  I'm not […]
Filling in Empty Rows - Given a date parameter I've a query that will return a two column result set.  The first column is a number (1 -6) that represents a condition and the second column is a number that represents the count of records in that condition.  A typical result set may look like this: 1, 30; 2, 100; […]
SQL Server Newbies
SQL update to replace undetermined string value - Hello, I have a varchar column called "Message".  Sometimes, this column contains a bit of text that begins with "**" and ends with "**".  There can be text before and after, but what I'm looking to do is only remove the bits of text that follow the "**%**" pattern (which should only ever happen once […]
Reporting Services
Connection Pool Timeout with Data Driven Subscription - Hi, Each morning, we run several data driven subscriptions which generate about 10,000 reports and email them as excel attachments. Recently we have resolved some issues we had with the subscriptions (such as bad email addresses) that were causing subscription errors. Most days, we run through these subscriptions error-free. Some days, we get a few […]
Analysis Services
SSAS Tabular SSDT DAX Drillthrough Issue - Hello, I've come across a scenario where the drillthrough functionality is not working when multiple dates from a fact table is joined to a single date dimension. If I have a fact table with multiple status dates e.g. Resolved Date, Logged Date and join it to one Date dimension table, one of the relationship would […]
Integration Services
SSIS Custom Task for creating Excel with formulae - Hello everyone, I am currently looking for a way to create Excel reports that include formulae (probably also Pivot tables and other stuff) from Reporting Services. Searching the web and the forums on SSC I found that therer is no simple way to achieve this. Would it be possible to do such a creation in […]
 

 

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

 

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