Daily Coping 17 Aug 2020

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

Today’s tip is to spend time wishing for other people to be free of suffering.

em·pa·thy – the ability to understand and share the feelings of another.

As I get older, I try more and more to empathize with others. Put myself in their shoes and understand how they feel.

There is a lot of suffering in the world, all the time, but many people right now that have planned for the future, worked hard, put themselves in good situations, and with the changes of the pandemic, they are suffering.

Particularly, I think about many of the people I’ve met over the years in airports. Lots of them work in coffee shops, restaurants, bus drivers, and more. These are are people I used to see every month, sometimes every week. I know a couple of them are out of work. Furloughed or laid off because of a lack of business from travel.

For the few I personally know and have seen around town, I’m sure there are dozens or hundreds more in Denver. Likely thousands around the world that are suffering. Some might miss meals, some might have lost housing. Most, or all, are likely feeling a lot of stress from a situation that is out of their control.

I took a few minutes to sit and think about all the people I used to see in my travels that are hurting now. I hope they find a path through this pandemic world.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 17 Aug 2020

Daily Coping 14 Aug 2020

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

Today’s tip is to ask someone how they feel and really listen to their reply.

I know far too many people that don’t listen in conversations. They may have an idea of what you said, but really they want to do one of two things:

  • get away and not talk
  • get back to talking about what they want to speak to

I’ve been guilty of both of these, but I try to be better, and I try to listen to others more.

As a result, I tried this recently. My wife and I had dinner with a friend, and rather than impose my thoughts, I listened more. I did ask them about how they feel about the pandemic, and their coping, since their situation is much different than mine.

I didn’t give advice, or evaluate what they said, I listened and supported them, expressing sympathy for challenges, acknowledging things were hard, and enjoying the bright spots they pointed out.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 14 Aug 2020

Daily Coping 13 Aug 2020

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

Today’s tip is to treat everyone you interact with as though they are a friend.

This tip is a part of my world and life. I try hard to greet people warmly and treat them well. Whether it’s the cashier at the gas station, the produce person restocking the grocery, someone walking their dog in a park, and certainly people I meet at events.

It’s easy to get annoyed by life, or to retreat. It’s easy to be wary of others. It’s easy to assume things about another person based on their appearance. We all do it. We all have internal voices that pre-judge people and situations.

We sometimes have good reasons to do so. However, no matter what you worry, try to treat someone you interact with as a friend first. Greet them, talk with interest, listen, and enjoy their company.

You can always walk away. That’s a skill worth developing as well.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 13 Aug 2020

SQL Clone Works with FILESTREAM

SQL Clone is an amazing product that virtualizes your data, allowing multiple instances to share a read only image, but still produce writeable databases that look normal to SQL Server. It’s similar to how a container appears to a user, but this uses real SQL Server instances.

I need to write up a more detailed walkthrough of this, but someone asked the question today about SQL Clone and FILESTREAM and I didn’t see a proper article on the Redgate site, so I decided to run a test and post this.

Setting up FILESTREAM

We have some articles at SQLServerCentral on FILESTREAM, but essentially this feature uses a folder on your instance file system to store blog files, instead of putting them in the database. To enable this, you need to do it in Configuration Manager

2020-08-12 12_30_53-Window

and in SSMS

2020-08-12 12_31_19-Window

You do need to restart the database engine, but then you can create a database that includes a FILESTREAM filegroup.

CREATE DATABASE [FSTest]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'FSTest', FILENAME = N'D:\SQLServerData\SQL2017\FSTest.mdf' , SIZE = 8192KB , FILEGROWTH = 65536KB ), 
 FILEGROUP [FSFG] CONTAINS FILESTREAM 
( NAME = N'FSData', FILENAME = N'D:\SQLServerData\SQL2017\FSData' )
 LOG ON 
( NAME = N'FSTest_log', FILENAME = N'D:\SQLServerData\SQL2017\FSTest_log.ldf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
GO

Once this is done, create a table and load some data.

CREATE TABLE Books
(   BookKey     INT              IDENTITY(1, 1)
  , BookTitle   VARCHAR(100)
  , FSGIUD      UNIQUEIDENTIFIER ROWGUIDCOL UNIQUE NOT NULL
        DEFAULT NEWID()
  , BookContent VARBINARY(MAX)   FILESTREAM);
GO
DECLARE @Document AS VARBINARY(MAX)
 
-- Load the image data
SELECT @Document = CAST(bulkcolumn AS VARBINARY(MAX))
      FROM OPENROWSET(
            BULK
            'E:\Documents\Using Local and Hosted Agents for Build with Azure DevOps.docx',
            SINGLE_BLOB ) AS Doc
 INSERT dbo.Books
     (BookTitle, FSGIUD, BookContent)
 VALUES
     ('Using Local and Hosted Agents for Build with Azure DevOps'   -- varchar(100)
    , NEWID() -- uniqueidentifier
    , @Document
     )         
 ;
GO

This gives you a database table with some data in SQL Server, in the Books table, and some in this folder, FSData, on your file system.

2020-08-12 13_54_32-Window

DO NOT mess with this folder, but the contents here will be included in any backup.

Now, I showed how to make an image and clone in a previous post, which I’ll do from this database.

When I get done, I’ll deploy this to another instance. In this case, I was worried about a folder issue on the same instance, but I’ll test that another day.

Whoops, I need FILESTREAM on the second instance.

2020-08-12 12_52_32-Window

I’ll follow the same config steps as above and restart this instance. this time things work.

2020-08-12 12_52_28-Window

If I script the table, I see it is  a FILESTREAM enabled table.

2020-08-12 12_50_47-Window

That’s it for now, but I’ll get a proper article written for the Redgate Hub.

Posted in Blog | Tagged , , , | 1 Comment