зеркало из https://github.com/microsoft/bobsql.git
More files for the devops for sql demos
This commit is contained in:
Родитель
77a38c466d
Коммит
4444157d88
|
@ -0,0 +1,2 @@
|
|||
CREATE NONCLUSTERED INDEX [idx_customer_id]
|
||||
ON [dbo].[customers] ([customer_id]);
|
|
@ -0,0 +1,4 @@
|
|||
CREATE TABLE [dbo].[customers]
|
||||
(
|
||||
tabkey int, customer_id nvarchar(10), customer_information varchar(1000)
|
||||
)
|
|
@ -0,0 +1,5 @@
|
|||
CREATE PROCEDURE [dbo].[getcustomer_byid]
|
||||
@customer_id nvarchar(10)
|
||||
AS
|
||||
SELECT * FROM customers WHERE customer_id = @customer_id;
|
||||
RETURN 0
|
|
@ -0,0 +1,8 @@
|
|||
truncate table customers;
|
||||
with cte
|
||||
as
|
||||
(
|
||||
select ROW_NUMBER() over(order by c1.object_id) id from sys.columns c1 cross join sys.columns c2
|
||||
)
|
||||
insert customers
|
||||
select id, convert(nvarchar(10), id),'customer details' from cte;
|
|
@ -0,0 +1,11 @@
|
|||
USE bwsql;
|
||||
GO
|
||||
declare @qplan XML;
|
||||
SELECT @qplan = qp.query_plan
|
||||
FROM sys.dm_exec_cached_plans cp
|
||||
CROSS APPLY sys.dm_exec_query_plan (cp.plan_handle) qp
|
||||
INNER JOIN sys.dm_exec_procedure_stats qs ON qs.plan_handle = cp.plan_handle
|
||||
INNER JOIN sys.objects o ON qs.object_id = o.object_id
|
||||
WHERE o.name = 'getcustomer_byid';
|
||||
with xmlnamespaces (default 'http://schemas.microsoft.com/sqlserver/2004/07/showplan')
|
||||
select @qplan.query('/ShowPlanXML/BatchSequence/Batch/Statements/StmtSimple/QueryPlan/Warnings');
|
|
@ -0,0 +1,15 @@
|
|||
# Demos for DevOps using SQL Server Containers
|
||||
|
||||
These are scripts to show demos for DevOps using SQL Server Containers
|
||||
|
||||
## sqlcontainers
|
||||
|
||||
These are demos for showing the fundamentals of using SQL Server Containers
|
||||
|
||||
## databaseprojects
|
||||
|
||||
These are demos for showing the fundamentals of using SDK-Style database projects using Visual Studio code and the Database Projects extension.
|
||||
|
||||
## githubactions
|
||||
|
||||
These are demos to show how to use GitHub in combination with a database project and GitHub actions to automatically build database projects and validate any changes using the SQL GitHub action.
|
Загрузка…
Ссылка в новой задаче