Analysis of a Bug in your sqldba's lower version

Help people to analyze and solve a problem of your sqldba backup error reporting. I think it's a little interesting. I'll record the analysis ideas. The general solutions are as follows:   First, find the error message of YourSQLDba job yousqldba ﹣ fullbackups ﹣ and ﹣ maintenance or the error log information of the job, and check the error d ...

Posted on Fri, 08 May 2020 06:17:47 -0400 by brianlange

The art of Sql Service (2) SQL complex condition search

This time, I will talk about the more complex search conditions often used IN where sentences, including combined query conditions, IN operators, NOT operators, LIKE operators and related wildcards. To learn this section, you need to use the following two tables: CREATE TABLE TEACHER ( TNO INT NOT NULL, --Faculty No TNAME CHAR(10) NOT ...

Posted on Thu, 30 Apr 2020 16:15:58 -0400 by macinjosh

Configure SQL Server 2019 AG in Azure CentOS VM-

Configure Internal Load Balancer Create load balancer My three VM S are all located in the sqldemoVNET/linuxsubnet subnet. The AG Listener was previously configured in SQL as 172.17.2.7, so the fronterdn IP is the same here. az network lb create \ --resource-group SQL-DEMO-RG \ --name sql19agLB \ --frontend-ip-name sql19agL ...

Posted on Wed, 29 Apr 2020 10:12:42 -0400 by AngelicS

Take notes of boring database jobs

The topics are as follows: 1. Query all data in sC table.2. Check the name and age of students in Computer Department3. Inquire the student number, course number and score of students with score of 70-804. Check the names and ages of boys aged 18-20 in the computer departments. Query the highest score of C001 course6. Query the maximum and mini ...

Posted on Wed, 08 Apr 2020 04:51:56 -0400 by synted

Classification of transactions in SQL

Let's start with the transaction execution process: BEGIN and COMMIT PRINT @@TRANCOUNT --@@TRANCOUNT counts the number of transactions BEGIN TRAN PRINT @@TRANCOUNT BEGIN TRAN PRINT @@TRANCOUNT COMMIT TRAN -- only one transaction is submitted Result: ROLLBACK PRINT @@TRANCOUNT BEGIN TRAN PRINT @@TRANCOUNT BEGIN TRAN PRINT @@TR ...

Posted on Sat, 04 Apr 2020 01:40:39 -0400 by ugh82

A case of optimizing the algorithm of C ා query database

Recently, when modifying a program, we found that a program algorithm looks simple. However, because of multiple queries to the database, performance problems are caused. This program mainly uses EPPLUS to read Excel data, check whether the data has existed in the database, and if so, return the existing serial number The original code of the c ...

Posted on Fri, 03 Apr 2020 18:02:31 -0400 by daydreamer

The use of triggers in SQL

Creating a trigger is a special stored procedure, which is executed automatically without return value   Type: 1. After trigger (for) executes the corresponding statement first, and then the statement in the trigger 2. The pre trigger does not actually execute the trigger statement (insert, update,delete), but the statement after the execution ...

Posted on Fri, 03 Apr 2020 16:34:56 -0400 by minidak03

[Re-understanding of SQL SERVER] Simple exploration of data internal storage structure

Databases often have to deal with each other, but you never thought about how data is stored inside the database. Explore how data is stored inside a database today, from the following points How to store data inside a database How index data is stored Effect of operational data on storage summary How to store data inside a database 1. To ...

Posted on Thu, 02 Apr 2020 20:20:18 -0400 by t3l

Sql Server Proc

CREATE PRoc [Name] { @parameter Data type, @parameter data type OUTPUT[input] } AS begin select INSERT UPDATE (SQL) end --Basic statement fast --These are statement Libraries --Let's see the one without parameters first. It can take parameters or not (I haven't used the one without parameters several times, of course) --Get a table. It fee ...

Posted on Sat, 22 Feb 2020 02:42:30 -0500 by behrk2

Calculate the balance

A netizen asked that in SQL, the balance of each transaction should be calculated. His screenshot Description:     To achieve this function, the key is to obtain the value of the eqty field of the previous record. Next, Insus.NET tries to write it. The easiest way to do this is to loop through each record. Then you can calculate qty plus ...

Posted on Wed, 01 Jan 2020 17:27:54 -0500 by benracer