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

Daily Coping Tip

Be willing to share how you feel and ask for help when needed

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.

Assembling Your Own Toolbox

Last month Brent Ozar posted that September was community tools month. He had a number of posts that highlighted tools and a number of other people (Francesco, Erik, VladDBA ) did as well. I didn't do any blogging because, well, it was a busy month for me. I was gone from home for 21 days, so a bit harried in life.

As a part of this effort, I saw Ken Fisher write about being a Script Magpie, which is an interesting analogy. A magpie is a bird that collects various shiny objects. Ken collects scripts in the same way. Things that catch his eye are added to his repo of scripts that he keeps handy.

I used to do something similar. I didn't have a repo back then, though I should have. However, all VCSes in the past lacked some of the ubiquity of Git. Instead I had a folder that I kept synched on various flash drives that I carried from job to job. I've also usually had a share inside companies where a team of developers or DBAs could share SQL scripts.

I'd hope that most technology professionals would share scripts, especially when they can be tokenized or added as SQL Prompt snippets. Reusing work is a big part of working with computers and why many people have embraced tools and utilities that they didn't write themselves. I certainly think having a toolbox is important, especially tools that integrate well with an existing environment.

I don't think it's worth rewriting many tools inside a company. I work for a software vendor, and I've seen the effort put into building tools. Both free and paid tools can save you a lot of time and effort inside your job, not the least of which is maintaining the tools over time as versions and editions change.

What are the contents of your toolbox? Which things are those that you'd bring to a new position if you moved organizations or groups? Let us know today.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Data Masking: Static vs Dynamic

maxtardiveau from SQLServerCentral

Learn about how static data masking differs from dynamic masking and learn which one might be best for your organization.

External Article

Improving the Quality of Data Governance: Where to Start?

Additional Articles from Redgate

How do we set about improving the quality of data governance within an organization? What are the priorities? Data Governance is generally considered to mean providing clear roles, responsibilities, policies, principles, and organizational structures that can ensure that data is managed well, in a way that benefits the whole organization. Where do you start?

External Article

Build Conditional Logic - SQL IF, BEGIN, END, ELSE, ELSEIF

Additional Articles from MSSQLTips.com

Learn how to build conditional logic when writing SQL code using IF, BEGIN, END, ELSE, and ELSEIF logic.

From the SQL Server Central Blogs - Understanding Microsoft Purview Pricing

Mr Fox SQL from Mr. Fox SQL

Ever since its official launch around October 2021, Microsoft Purview has been one of the more popular services in Azure, with a steady stream of new features expanding the...

Blog Post

From the SQL Server Central Blogs - Why I tweet about work and personal topics from the same account

Meagan Longoria from Data Savvy

Over the last few years, I’ve had a few people ask me why I don’t create two Twitter accounts so I can separate work and personal things. I choose...

 

 Question of the Day

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

 

What's the CEIP?

What is the CEIP service in SQL Server?

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)

Shutdown without NOWAIT

If I run a Shutdown in SQL Server and don't use NOWAIT, what things happen? (choose 2)

Answer: A checkpoint is run in each database, Currently running t-sql statements or procedure procedures complete

Explanation: When you run shutdown without NOWAIT, these things happen:

  1. logins are disabled (except sysadmin and serveradmin)
  2. currently running T-SQL and procs complete
  3. a checkpoint inserted in every database

Ref: SHUTDOWN - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/shutdown-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 2016 - Administration
Shrink database issue - In my database, I have few temp tables that total up to 50GB in size. I already removed the data from the table. When I set the shrinkdatabase in my maintenance plan, it runs successfully but doesn't shrink the database. I tried dbcc shrinkfile(1,truncateonly) and got the same result. However, from sql management studio when […]
TCP Provider: A connection attempt failed for target server - Hi. In source SQL Instance target linked server has been created and connection tested succeeded. but while executing stored procedure execution failed as below errors. how to fix this issues? checked it is enabled at target instance allow remote connection. TCP Provider: A connection attempt failed because the connected party did not properly respond after […]
SQL Server 2016 - Development and T-SQL
How to copy XML converted data to file on local drive? - Hi everyone, So I have been working on converting my SQL tables data into XML files. I have designed a query that looks like this: --START OF TABLE List SELECT ( SELECT --(SELECT COALESCE (List_ID,'')) AS List_ID, (SELECT COALESCE (List_Type,'')) AS List_Type, --(SELECT COALESCE (List_Description,'')) AS List_Description, --(SELECT COALESCE (List_Provider,'')) AS List_Provider, --(SELECT COALESCE (Issuing_Body,'')) […]
How to calculate orders historically, during month - Good Morning There, CREATE TABLE Customers ( CID int NOT NULL PRIMARY KEY, GroupName varchar(255) NOT NULL, FirstName varchar(255), Age int, CustomerStatus SMALLINT, ---1 Means Active, 0 Inactive CustomerJoinDate Date ) CREATE TABLE Customers_Orders ( CID int NOT NULL PRIMARY KEY, Day_Date Date, ORDER_INDICATOR SMALLINT, --- 1 means made order 0 means no order Account_CashDeposit […]
Insert data into multiple tables after each batch of 100000 rows - Hello! I have a table with 2 million rows. I need to insert data into new table for each batch of 100000 rows.     Thanks in advance.  
SQL Server 2012 - T-SQL
table design for user "matching" - I am finding users that have liked each other. I have a user table and matched table: create table matched (match_id int identity not null primary key ,user_id char(1) ,interested_in_user_id char(1) ,interested_by_user_id char(1) ,mutual_yn char(1) ); insert into matched values('A','C',null,'N'), ('A','D',null,'N'), ('C','B',null,'N'), ('C','A',null,'N'); select * from matched;​   query results: When a record is inserted […]
SQL Server 2019 - Development
Migration of simple SPs from 120 to 150 COMPATIBILITY_LEVEL issue. - Migration of simple SPs from 120 to 150 COMPATIBILITY_LEVEL issue. Execution time for the first time run of any SP is close to 3 min. After the first execution, it takes ms to repeated execution. The execution plan is identical in 120 and 150. Recompile did not help. SPs are sitting on wait: PAGEIOLATCH_SH for […]
Referencing a SQLCMD variable in a Post Deployment script using SqlPackage - Ive got a Database project running in JetBrains Rider. The project publishes a DACPAC to create or update a target database. Now I have a set of reference data scripts which run (in Create mode) and these are reference through the Script.PostDeployment which looks like this: :r .\LoadDeviceConnectionType.sql :r .\LoadUser.sql :r .\LoadConversionType.sql :r .\LoadChannelType.sql :r […]
Calling stored procedure to bulk import from SSIS causes access denied - Hi, I'm working on building a data validation engine, which is supposed to check a number of items, such as existence of fields in CSV files before they are imported by SSIS. This is done with the bulk import command via a stored procedure. What I'm trying to do is the following [SSIS] Gather filenames […]
undocumented syntax? - I recently saw this syntax used in an example - SELECT INTO FROM (SELECT 'Literal') AS EX();      Now I have figured out what it accomplishes but I have yet to find any documentation for the EX() syntax.  Can anyone point me to it or is this an undocumented feature?
Missing weekend data to Zero - Hi All, I have a requirement that if there is no weekend data then i should mark the next row with zero. Here for 123 , A there is no sales received for week 4 and so we need to make it to zero. and the same for 123,B there is no sales for week […]
Save Query Results to Excel and Automatically run it - Hello,   I have a very simple query Select * from Employees where company = 'Company A' order by firstName   I want to run this query to run automatically on a daily basis and save the results in excel. Is their any way I can achieve this purpose? I tried using SQL server jobs […]
BlobColumn to String - I have this column in sql server that has value of "dog,cat,mouse" so I want to fetch this data into SSIS then transform it into an array using script so I can loop through it but I'm having an error when doing so. var columnfromDB = "1,2,3"; // Need population so that Split won't throw […]
SSRS 2014
Get Part number and display in Header - Hello, so I have a part number, and I want to display it in the header, however I do see it available as "FIRST" meaning it will only display the FIRST part, however this particular report, the user has a chance to select Multiple parts, so the report is grouped by parts to show the […]
General
How and where did you learn SQL from? - Could you give me advice on where I should learn SQL and Python to become high-skill engineer? Most tutorials and courses seem here to focus on the querying part of SQL. But I want to learn how to design, structure and create Data and databases.
 

 

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

 

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