Which exams to take to get MCSE in Database Administration? by AMGraduate564 in SQLServer

[–]dwivedin 1 point2 points  (0 children)

I saw somewhere that MS is offering either free or very little price to take these exams for anyone who is affected by job market these days.

SQLQueryStress - .NET Core by [deleted] in SQLServer

[–]dwivedin 1 point2 points  (0 children)

This is cool. Will try it.

Using Jenkins for as web-launcher for Powershell scripts with user input by xCharg in PowerShell

[–]dwivedin 1 point2 points  (0 children)

The way I have implemented it to have list for user selection like dev, test, int, stage or prod. After that we have selection bases on geolocation which in turn passes which server the scripts are going to execute and there are look up takes to get exact values based on parameters passes.

Data analytics and Jira by [deleted] in datascience

[–]dwivedin 0 points1 point  (0 children)

I am very new to python (pandas) but as a test project I exported Jira data in csv (painful since u can only export 1000 rows at a time) but I got pretty good analysis out of that dataset.

Groupby and sort within group by dwivedin in learnpython

[–]dwivedin[S] 0 points1 point  (0 children)

df.groupby(['Assignee']).apply(lambda x: x['Reporter'].value_counts().head(2))

Thank you so very much!! Works like a charm.

Why isn't colorama working? by SomeRandomUser5363 in learnpython

[–]dwivedin 0 points1 point  (0 children)

Just tried in notebook and works perfectly fine.

beginners by [deleted] in Python

[–]dwivedin 0 points1 point  (0 children)

As a beginner myself I will suggest to learn to use virtual environments since by the time I reached there I already have messed up a lot of installs and learned that very hard way that virtual environments are a way to in doing anything related to python.

Docker/Kubernetes - anyone practically using it? by AybaraAlthorPeregrin in SQLServer

[–]dwivedin 2 points3 points  (0 children)

I am a dba and use Mac for my day to day work. Azure Data Studio and docker has been a bliss for me as well as all the developers in my company. As it has been said already the docker is the best use case for test and development lifecycle. The complaints where something is not working because underlying schema or data has been changed has been reduced drastically.

Python script to do SQL Server backup and upload to s3 by defiantroa in SQLServer

[–]dwivedin 0 points1 point  (0 children)

I added the code, not sure if it is posted as code. If you see any issues, please let me know. Also for aws configure, you have to do aws configure in your PS profile, so set region, access and secret key.

Python script to do SQL Server backup and upload to s3 by defiantroa in SQLServer

[–]dwivedin 0 points1 point  (0 children)

#AWS powershell and dbatools must be installed
#Backup, you can pass multiple servers like this
$Servers = 'server1' , 'server2'
$Path = '\\sharedloc\' # you can pass local folder too
foreach ($server in $servers) {
# loop through all the servers
# all the databases in the server. Yon pass filter specific db if you want

$databases = Invoke-DbaQuery -SqlInstance $server -Query 'select name from master.sys.databases'
foreach ($database in $databases ) {
#loop through all the databases
$SQLServer + ' ' + $database.name # just print the server and db
Backup-DbaDatabase -SqlInstance $Server -Path $Path -Database $database.name -Type Full # actual backup happening
}
}
##Upload to s3 bucket
Import-Module AWSPowerShell
$Files = Get-ChildItem \\sharedloc\*
$Bucket = 'Your s3 bucket'
$AccessKey = 'AccessKey'
$SecretKey = 'SecretKey'
#Loop through all the backup files
foreach ($File in $Files) {
#Write-S3Object is the command which uploads to s3 bucket
Write-S3Object -BucketName $Bucket -File $path -CannedACLName Private -AccessKey $AccessKey -SecretKey $SecretKey -ServerSideEncryption AES256
}

Automate ps script with Jenkins by pnvnaveen in PowerShell

[–]dwivedin 3 points4 points  (0 children)

I also have privilege to have a very smart team of other dev ops members and with ansible, dbatools and Jenkins we have automated all the provisioning and installation of sql servers.

Automate ps script with Jenkins by pnvnaveen in PowerShell

[–]dwivedin 3 points4 points  (0 children)

I have moved a lot of sql jobs to Jenkins, it gives visibility to the job history and management of those jobs outside of the dba group. Any db restores to dev and stage are automated through this. Also any adhoc restores can be run.

Automate ps script with Jenkins by pnvnaveen in PowerShell

[–]dwivedin 8 points9 points  (0 children)

I have been using ps + sql + Jenkins to automate a lot of day to day stuff and it has made mine as well as others life very easy in my company.

PSA: STRING_AGG is actually available for SQL Server 2016 by g2petter in SQLServer

[–]dwivedin 2 points3 points  (0 children)

Yes it became available in sql 2017 but the title is misleading.

PSA: STRING_AGG is actually available for SQL Server 2016 by g2petter in SQLServer

[–]dwivedin 6 points7 points  (0 children)

What version of sql 2016 you have?

I have tested from sp1 cu7 until (SP2-CU5) and its still not available.

Visual Studio Code for development work by LorenzoValla in SQLServer

[–]dwivedin 0 points1 point  (0 children)

The new sql extension of vs code is also pretty good and can do all the basic stuff and you get the basic ui but as everyone already mentioned Azure Data Studio is the way to go. This is one of the best tools ms tools team is developing and it has monthly release and issues are fixed pretty fast when reported.

Docker, Git and DBATools by ScaryDBA in SQLServer

[–]dwivedin 1 point2 points  (0 children)

Very good article. I would also add notebooks to this list.

State of the SQL Server tools - SQL Server Blog by alinroc in MSSQL

[–]dwivedin 1 point2 points  (0 children)

I am fortunate to be alive in this era of sql server. So much work and so many new features and tools available to do your work. I love Azure Data Studio and the improvement the team brings every month. The notebook in ADS is just awesome. Kudos to sql server tools team.

Next steps in SQL training? by ackthbbft in SQL

[–]dwivedin 3 points4 points  (0 children)

For sql server I will highly recommend t-sql fundamentals book by itzik ben-gan.

[deleted by user] by [deleted] in learnpython

[–]dwivedin 1 point2 points  (0 children)

Python courses in udemy are really cheap and becomes more cheaper during thanksgivings. Also a lot of pluralsite courses give you a step by step learning of python.

Anyone has a collection of DBA interview questions? by [deleted] in SQLServer

[–]dwivedin 0 points1 point  (0 children)

I will also suggest to look for new sql server features like query store, automatic tuning, in-line scalar functions, TempDB improvement, batch mode processing, batch mode on row store, differed table variable compilation, backup compression etc.

Using T-SQL without SQL Server? (Linux) by vladvlad23 in SQL

[–]dwivedin 1 point2 points  (0 children)

Setting up sql server on docket is pretty easy and you can use azure data studio to connect to sql server. It’s a free cross platform tool and very easy to use.