teleren/devto huggingface dataset:
Read this to get your SQL Server migration team on the same page
Tags: blog, sql, aws
Published: 2023-07-11 22:19:18

---
title: Read this to get your SQL Server migration team on the same page
published: true
date: 2023-06-28 23:22:32 UTC
tags: Blog,SQL,AWS
canonical_url: https://clumio.com/blog/read-this-to-get-your-sql-server-migration-team-on-the-same-page
---

Microsoft SQL Server is a longstanding relational database that has enjoyed continued popularity since its initial release in 1989. As the database has evolved over the years, so have the ways in which it is hosted. Many enterprises that are longtime users of SQL Server are migrating to the cloud, and are choosing to rehost these databases and the applications they power on AWS. There are several ways to rehost SQL Server with AWS, each with its own advantages and disadvantages. SQL Server can be hosted as a managed database on Amazon RDS, self-managed on Amazon EC2, or customers coming from VMware may choose VMware Cloud on AWS.

Whichever option you choose to host your SQL Server database, your application’s uptime depends on the database’s performance and availability. An often overlooked consideration is how backup and recovery will affect performance, so it’s important to pick the right solution. To help with the decision process, we’ve created The essential guide to backing up SQL Server DBs on AWS, an ebook that comprehensively covers SQL Server backup in AWS.

You will learn:

- Foundational concepts every data professional should know to understand SQL Server data protection
- The different methods of backing up SQL Server in AWS, with uses, advantages and disadvantages of each
- Clumio’s unique capabilities and architecture, and how to back up your SQL Server databases in AWS using Clumio
- And more

Making the jump from on-premises to cloud hosting can be a lengthy process involving multiple teams with different backgrounds, objectives, and priorities. Bringing all contributors to a mutual understanding of the environment, challenges, and solutions is key to a successful migration. The essential guide to backing up SQL Server DBs on AWS is a useful aid in achieving that mutual understanding. [Download the free ebook](/essential-guide-to-backing-up-sql-server-in-aws) and share it with anyone in your organization who would benefit from a better understanding of SQL Server backup strategies.

**You might also like:**  
Catch the replay of the webinar, [Finally, a SQL Server Backup that DBAs Won’t Hate](/resources/webinar/finally-a-sql-server-backup-that-dbas-wont-hate), with renowned database technologist David Klee to hear about the concerns he hears most commonly from the community about backup options, and what advice his clients find most useful.

The post [Read this to get your SQL Server migration team on the same page](https://clumio.com/blog/read-this-to-get-your-sql-server-migration-team-on-the-same-page) appeared first on [Clumio](https://clumio.com).
Continuation to Shell Scripting
Tags: beginners, devops, cloudcomputing, 120daysofdevops
Published: 2023-06-28 23:18:27

**Basic Bash commands (echo, read, etc.)**

Here is a list of some of the most commonly used bash commands:

cd: Change the directory to a different location.
ls: List the contents of the current directory.
mkdir: Create a new directory.
touch: Create a new file.
rm: Remove a file or directory.
cp: Copy a file or directory.
mv: Move or rename a file or directory.
echo: Print text to the terminal.
cat: Concatenate and print the contents of a file.
grep: Search for a pattern in a file.
chmod: Change the permissions of a file or directory.
sudo: Run a command with administrative privileges.
df: Display the amount of disk space available.
history: Show a list of previously executed commands.
ps: Display information about running processes.

**Reading user input**  

We can read the user input using the read command.
* read -p* where the p stands for prompt

![reading user input](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aijypakn9wr6wd68ikwj.png)
when you run this command on the terminal, it gives the user the option to input his name into it before it echo the last command given to it.
 we will have something like this below:

![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/run40bnt9nly62ww0g72.png)
amazing right? let's try out some more commands "using the reading user input"
let's add more options to where users can input more details.

![Input](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w78yxxtnjzcp4l3ll0kd.png)

![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iudzjg124pqnukrfsc0a.png)
you can play with more examples.

i Tired something different, lets assume you work in an organization, and you are ask to write a script that will ask for a user name and also create a directory for the user, how do you go about it? here it is:

![Input](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n03t38pufs63kiz0pfer.png)

![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmkhvd6h2gbu7ei5z66t.png)
just follow the prompt "ls" to check the folder/directory created.

easy and interesting right? 
now let create files in that same directory/folders created for the users. 

![Input](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iq7um6qi7jos2i5j5k7i.png)

![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysbk7rthj4x2ogc35iyt.png)
That is how to create a directory and a file to a user using the name provided.

thanks guys for following through; Day 11 loading very soon
Day 772 : Always a Good Thing
Tags: hiphop, code, coding, lifelongdev
Published: 2023-06-28 22:32:14

_liner notes_:
- Professional : Not a bad day. Had a couple of meetings. It was good to catch up with everyone. Updated the API Reference based on a meeting I had yesterday. Made some good progress. Ran into an issue where someone wants to discuss a choice that was determined in that meeting. Looks like I'll be in another meeting to get that detail worked out. Literally, there is something always new popping up with task. haha I should be creating new tickets every time because it looks like I'm taking forever with this one ticket. haha Good thing I'm documenting everything and keeping my manager in the loop. So that's always a good thing.  

- Personal : Went through some tracks for the radio show. I got the canvas to show up in my dashboard and then the information sent to the backend. Problem is that when I save it to GitHub, it's just a string and not an image.

![Mountain side of the Caucasus Mountains with grass and flowers extending into the distance at sunset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gdmwd6f920y89xid35g.jpg)

Basically going to do what I did last night: listen to tracks and figure out how to upload images to GitHub for my side project. Also, already download the new "Secret Invasion" episode on Disney+. Going to get started.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube pYooYBdhEA0 %}
Internals of PostgreSQL - Chapter 6
Published: 2023-06-28 21:26:17

In chapter 6 we discuss vacuum processing in PostgreSQL. It is a maintenance process which helps to ensure efficient operation of the database. It mainly involves removing dead tuples and freezing transaction IDs to improve performance and free up space.

Vacuum processing was executed manually until version 8.0 when autovacuum daemon was introduced which automated the process. There are two main modes for vacuum processing, Concurrent VACUUM and Full VACUUM.

Concurrent VACUUM, also known as VACUUM, removes dead tuples for each page while also allowing other transactions to read the table at the same time. On the other hand, Full VACUUM removes dead tuples and defragments live tuples for the entire file but it locks the table which prevents other transactions from accessing it during the process.

In this chapter, we look at the steps involved in concurrent vacuum processing. These include removing dead tuples and index tuples which point to dead tuples, freezing old transaction IDs, updating system catalogs and performing various cleanup tasks.

A key optimization which has been introduced in version 8.4 is the Visibility Map or VM. It increases the efficiency of removing dead tuples by keeping track of the page visibility. VM allows the vacuum process to skip pages which do not have any dead tuples and thus reduces the overall cost of the process.

**Freeze processing** is an important part of vacuum processing. It involves freezing old transaction IDs to prevent the wraparound of transaction IDs and to ensure the stability of the database in the long-run. It operates in two modes: lazy mode and eager mode.

In lazy mode, freeze processing scans only pages that contain dead tuples, meanwhile in eager mode, it scans all pages and also performs some additional tasks such as updating system catalogs and removing unnecessary files. The mode used can depend on certain conditions, such as the value of the freezeLimit transaction ID and the state of the pg_database system catalog.

Finally, the chapter briefly talks about the PARALLEL option, which allows vacuuming and index cleaning to be performed in parallel for tables with multiple indexes. This is supported in the VACUUM command but not in autovacuum.
Rumour: Bazaars BZR in Discussions to List on Dubai Nasdaq
Tags: blockchain, cryptocurrency, defi
Published: 2023-06-28 21:42:19

There is a rumour circulating that Bazaars BZR, a decentralized marketplace built on the Ethereum blockchain, is in discussions to list on the Dubai Nasdaq. The Dubai Nasdaq is a stock exchange located in Dubai, United Arab Emirates. If Bazaars BZR is able to list on the Dubai Nasdaq, it would be a major milestone for the project and could significantly increase its user base and trading volume.
The rumour was started by a post on the Bazaars BZR subreddit. The post claimed that a source within the Bazaars BZR team had confirmed that the project was in discussions with the Dubai Nasdaq about listing. The post also claimed that the listing could happen as early as Q4 2023.
Bazaars BZR has not yet made any official announcement about listing on any exchanges. However, the project has been growing in popularity in recent months. In February, Bazaars BZR raised $10 million in a Series A funding round. The funding round was a major vote of confidence for the project and could help it to achieve its goal of listing on tier 1 exchanges.
If Bazaars BZR is able to list on the Dubai Nasdaq, it would be a major milestone for the project. It would increase the project's visibility and accessibility to a wider audience. It would also increase the project's liquidity and trading volume. This would be beneficial for both buyers and sellers on the Bazaars BZR platform.
Of course, there is no guarantee that Bazaars BZR will be able to list on the Dubai Nasdaq. The Dubai Nasdaq has its own criteria for listing projects, and Bazaars may not meet their requirements. However, the rumour is a positive sign for the project and suggests that it is making progress towards its goal of becoming a major player in the decentralized finance (DeFi) space.
Here are some additional details about the rumour:
The source of the rumour is anonymous.
There is no official confirmation from Bazaars that the rumour is true.
The rumour could be false or it could be based on inaccurate information.
It is important to note that the rumour is just that - a rumour. There is no guarantee that it is true. However, the rumour is a sign that there is interest in Bazaars BZR and that the project is on the right track.
Here are some of the benefits of Bazaars BZR listing on the Dubai Nasdaq:
Increased visibility and accessibility to a wider audience.
Increased liquidity and trading volume.
Increased credibility and legitimacy.
Access to capital markets.
Increased brand awareness.
Enhanced competitive positioning.
Overall, the rumour that Bazaars BZR is in discussions to list on the Dubai Nasdaq is a positive sign for the project. It suggests that the project is making progress towards its goal of becoming a major player in the decentralized finance (DeFi) space.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aj3gfgh2h63ytolkjfn7.png)
Debugging Session for AGE using VSCode
Tags: apacheage, postgres
Published: 2023-06-28 21:05:17

In this blog we will have a debugging session using vscode it looks similar to the previous blog using GDB but here we will add some configurations for vscode.

After opening vscode on the age project directory, you will see `.vscode` directory. Make sure that to put all the following configurations
`Note: replace 'yourUserName' in the following files with your current system username`
launch.json
```json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Attach",
            "type": "cppdbg",
            "request": "attach",
            "program": "/home/yourUserName/postgresql-14.7/bin/postgres",
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        }

    ]
}
```

settings.json

```json
{
    "files.associations": {
        "postgres.h": "c",
        "genam.h": "c",
        "heapam.h": "c",
        "tableam.h": "c",
        "table.h": "c",
        "htup_details.h": "c",
        "skey.h": "c",
        "pg_operator.h": "c",
        "namespace.h": "c"
    }
}
```

c_cpp_properties.json
```json
{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "/usr/include/**/**",
                "${workspaceFolder}/**",
                "/usr/include/**",
                "/usr/local/pgsql/include/**",
                "/usr/local/pgsql/include/server/**",
                "/home/yourUserName/postgresql-14.7/src/**",
                "/home/yourUserName/postgresql-14.7/**",
                "/home/yourUserName/postgresql-14.7/src/backend/**",
                "/usr/local/pgsql/lib/**",
                "${workspaceFolder}/src/include/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "gnu++17",
            "intelliSenseMode": "linux-gcc-x64",
            "configurationProvider": "ms-vscode.makefile-tools"
        }
    ],
    "version": 4
}
```

Now we can start debugging 
- START postgres server and CONNECT through psql session
- In the psql terminal get the session pid using command `SELECT pg_backend_pid();` 
- Set your breakpoints
- press F5 then type PID that you got in a previous step

run a query on the `psql` terminal and the debugging will begin.

Ref:
[apache age repo](https://github.com/apache/age)
Foreign Data Wrappers (FDWs) in PostgresSQL
Published: 2023-06-28 20:49:59

In this blog we will understand foreign data wrappers. 
Foreign Data Wrappers(FDWs) is the library in PostgresSQL that allows to access the data like tables from External sources. To manage the foreign tables that are on a remote server, FDWs use SQL Management of External Data (SQL/MED). 

- The analyzer/analyser creates the query tree of the input SQL using definitions of the foreign tables which are stored in catalog.

- To get connected to the remote server, the planner uses specific libraries. For example, while connecting to the remote PostgresSQL server, the library that will be used by postgres_fdw is _libpq_. 

- `use_remote_estimate` is used to control the _EXPLAIN_ command use. If the use_remote_estimate` option is _ON_, then the planner wil execute the _EXPLAIN_ command to estimate the cost of each path.

- The planner uses the plan tree's scan paths of the foreign tables to create the plain SQL statements and this process is known as deparsing.

- After the process of deparsing, the executor takes those plain SQL statements and send them to the remote server. The method of sending those SQL statements depends on the developer of each extension. For instance, the foreign data wrappers in mysql i.e. mysql_fdw sends the SQL statement without using a transaction. 
 
Then FDW receive the results from the remote server and converts it into the PostgresSQL readable data.

##References:
[https://www.interdb.jp/pg/pgsql04.html](url)
Debugging Session for AGE using GDB
Tags: apacheage, postgres
Published: 2023-06-28 20:39:21

After have Postgres configured with enabling debugging flags and a running Postgres instance. An open session running and age extension is loaded

- Get PID of the current session
```SELECT pg_backend_pid();```
- Open new terminal tab and run `sudo gdb` to run the debugger
- Attach gdb to to the PID that we got from the previous step e.g. PID: 123
```(gdb) attach 123```
- Add a break point to a specific line or function  at some where
```(gdb) b <function_name>```

The following are The basic GDB commands:

- b for breakpoint, (b <function_name>)
- c for continue - continues to the next breakpoint
- n for next line
- s for step into
- p for print, (p *) for pointers
- d for delete all breakpoints
- q for quit

Ref:
[apache age repo](https://github.com/apache/age)
[GDB Docs](https://www.sourceware.org/gdb/documentation/)
The 19th Day of the 100 Days of Code challenge
Published: 2023-06-28 20:20:25

Today, I improved the "Diarizator" I created yesterday to implement Speaker Diarization in my real-time transcription app project. Since I'm using Whisper, I optimized it to work specifically with Whisper transcriptions. Instead of finding segments of speech in recordings, identifying the speakers, linking that to the transcription text somehow and only then being able to determine what was said by the speaker, Whisper transcriptions also include the segments it transcribed. It includes each segment with a transcription.

The approach I took was to identify the speaker in those provided segments, and that was enough. I already knew what was said, I just needd to find the speaker which wasn't that hard.

It's not that accurate, but that's something I'll work on when I improve the project. Right now, what I need is a starting point where all components work together in real-time with a decent amount of accuracy that I'll improve from there.

So the Diarizator worked across multiple recordings, but not in real-time since there are still no transcriptions being made in real time. But that was enough of a simulation, so in theory, it should work. However, the short transcriptions will have shorter recordings to identify the speaker with, and I still don't know the effect this will have on accuracy.

Having completed the Diarization part, I had to move on to receiving audio in real-time and transcribing it. That was the part I got stuck on yesterday.

Today, I didn't have much luck either. To be completely honest, that was a part I tried doing completely with ChatGPT as I understood the logic but didn't want to completely write it myself. All I needed was a starting point and then I could've worked from there.

However, every time, something didn't work quite right. So tomorrow, I'll be "less productive" and write it by myself. Right now, what matters is that I achieve a real-time audio stream to the server.

Achieving good real-time audio streaming is quite important, since I plan on making this an easily usable API for developers looking to implement real-time transcription in their apps with Whisper.

This day didn't feel too productive, but those happen. Tomorrow, I'll make up for it and more! Hoping and aimingto get at least one project or simple demo on GitHub.

That's it for today,
Happy coding everyone!
3 Ways to Clone Objects in JavaScript
Tags: javascript, object, cloning
Published: 2023-06-28 20:19:41

---
title: 3 Ways to Clone Objects in JavaScript
published: true
description: Cloning objects in JavaScript is an essential skill for developers, as it allows you to create independent copies of objects without referencing the original. Whether you're working on a complex web application or building a JavaScript-based game, understanding object cloning is crucial for maintaining data integrity and preventing unintended side effects.
tags: JavaScript, object, cloning
---
Automating Content Creation
Published: 2023-06-28 20:18:20

Hey everyone, 

Wanted to share our new open-source project with the dev community. We've been working on how to get AI personas to collaborate together to create imagery and content and we've been able to automate content curation. Thought you guys might like it. 

QuasarAI: https://lnkd.in/gaRMNEy6

Empowering journalists, publishers, and content creators with superior AI tools, streamlining the entire content curation workflow.

It's fully open-source and built with:

OpenAI API
◆ 
Midjourney
◆ 
Feedly AI

You can also read our article about our journey as a startup trying to compete with larger organizations here. https://lnkd.in/gHbEJ3cG

#ai #contentmarketing #startups
Typescript Nominal Type: The Right Way
Tags: webdev, javascript, typescript, tutorial
Published: 2023-06-28 19:56:45

[In case you don't know what RighFminal typing](https://flow.org/en/docs/lang/nominal-structural/)

Typescript is a structural typing language, but it is possible to mimic the behavior of nominal typing language, very closely.

We start with the easiest method:

```ts
type AB = { a:number, b:number, x:never}
type BA = { a:number, b:number, y:never}

const ab:AB = {a:1, b:2}
const ba:BA = ab // error !!
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3b4oh7vhbyn4c0ewcdj.png)



[playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAggQlAvFA3lAhgLgHYFcC2ARhAE4A0UhOBx5UAHjhAG6kC+AUKJFHDEqgzUipClTwi6IJqxKcOAYwD22AM7AMhASiwBGMZgBMbDKthxFK9ZSx8B6LQHpHUUiSUkoAQi9A)

It works

## BUT THIS IS NOT GOOD ENOUGH !!

Today we are going to learn how to create a proper nominal type in Typescript

Let us review why the first method is not good enough.

First, it uses type assertion. Avoid type assertion if possible, personally I only assert type when I am creating wrappers.

Second, users can access the extra property: _brand_ via static typing. In this case, our brand is `ab.x` and `ba.y`.

As a craftsman, we don't want that to happen

## Solution

```ts
declare class AB_Class { 
    protected x?:never
}

declare class BA_Class { 
    protected x?:never
}

interface AB extends AB_Class{
    a:number, b:number
}

interface BA extends BA_Class{
    a:number, b:number
}

const ab:AB = {a:1, b:2} 
const ba:BA = ab // error !!
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4bjmsr4qur3mko60csjz.png)


[playground](https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEkoGdnwIICED6Bhaq8A3vAFDwXwAOMA9gC7iPDwAeA-AFwB2IAbiBikAvqVKgkcRATSZ0eGcTKVqdRmGZsuvAUNGkAlt0YwAZlDAIs8EK0bdgaLApTIi5SlB4BXALYAjQQAaeH8fAMERMSMTc0t4ORs7EAdZeXxXdxUvbj9AmBCw3Ii9MTBabmR6eCgw6wBeYi8ARkLOACZhMnLK6v8vRMba+AB6EZsYOhh4AEIZoA)

The key is to use class and declare **optional protected brands with never as type.**

The brands name don't have to be the same name, you can assign different names.

1. no type assertion
2. users cannot access brand

now, you may ask, why `protected`, why not `private`?

This is because, take this example

```ts
declare class AB_Class { 
    private x?:never
}
```
after `tsc` compilation, the output is 

```ts
declare class AB_Class { 
    private x?
}
```
do you notice the difference?

[Typescript strips away the type of `private` and fails type assertion](https://github.com/microsoft/TypeScript/issues/38953)

so please stick with `protected`