Skip to content

Commit 7b3e40f

Browse files
author
Ajay Dwivedi
committed
Adding script to keep skype alive
1 parent b131511 commit 7b3e40f

23 files changed

+1452
-36
lines changed
11.5 KB
Binary file not shown.

Backup-Restore/Backup-Restore.ssmssqlproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@
116116
<FullPath>8) Fix Orphan Logins for All DBs.sql</FullPath>
117117
</FileNode>
118118
<FileNode Name="Get-LatestBackups.sql">
119-
<AssociatedConnectionMoniker />
120-
<AssociatedConnSrvName />
119+
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:(local):True</AssociatedConnectionMoniker>
120+
<AssociatedConnSrvName>(local)</AssociatedConnSrvName>
121121
<AssociatedConnUserName />
122122
<FullPath>Get-LatestBackups.sql</FullPath>
123123
</FileNode>

Backup-Restore/Query - Restore History.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ SELECT rs.[restore_history_id]
2424
on rs.backup_set_id = bs.backup_set_id
2525
INNER JOIN msdb.dbo.backupmediafamily bmf
2626
ON bs.media_set_id = bmf.media_set_id
27-
where rs.[destination_database_name] = 'Mosaic'
27+
where rs.[destination_database_name] = 'Harvester'
2828
order by rs.[restore_date] desc
2929
GO

BlitzQueries/whoIsActive.sql

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,22 @@ where r.collection_time >= '2019-06-21 00:00:01.743' and r.collection_time <= '2
8787
order by collection_time asc
8888
8989
90-
*/
90+
*/
91+
92+
/*
93+
declare @p_DbName varchar(200) = 'Staging';
94+
95+
;WITH t_results as
96+
(
97+
SELECT @p_DbName as dbName, *
98+
FROM [DBA]..[WhoIsActive_ResultSets] r
99+
WHERE r.database_name <> @p_DbName
100+
AND r.collection_time >= '2020-02-04 01:59:00.000'
101+
and r.collection_time <= '2020-02-04 04:46:13.417'
102+
)
103+
--SELECT *
104+
SELECT r.collection_time, r.session_id, r.sql_command, r.login_name, r.wait_info, r.blocked_session_count, r.reads, r.database_name, r.program_name, r.host_name
105+
from t_results as r
106+
WHERE r.locks.exist( '/Database[@name=sql:column("dbName")]') = 1;
107+
108+
*/

Experiments/Experiments.ssmssqlproj

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22
<SqlWorkbenchSqlProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Experiments">
33
<Items>
44
<LogicalFolder Name="Connections" Type="2" Sorted="true">
5-
<Items />
5+
<Items>
6+
<ConnectionNode Name="LOCALHOST:CORPORATE\adwivedi">
7+
<Created>2020-02-07T06:20:38.9372522+05:30</Created>
8+
<Type>SQL</Type>
9+
<Server>LOCALHOST</Server>
10+
<UserName />
11+
<Authentication>Windows Authentication</Authentication>
12+
<InitialDB />
13+
<LoginTimeout>30</LoginTimeout>
14+
<ExecutionTimeout>0</ExecutionTimeout>
15+
<ConnectionProtocol>NotSpecified</ConnectionProtocol>
16+
<ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName>
17+
</ConnectionNode>
18+
</Items>
619
</LogicalFolder>
720
<LogicalFolder Name="Queries" Type="0" Sorted="true">
821
<Items>
@@ -30,6 +43,12 @@
3043
<AssociatedConnUserName />
3144
<FullPath>InsertDummyData.sql</FullPath>
3245
</FileNode>
46+
<FileNode Name="whats-new-in-sql-server-2019.sql">
47+
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:LOCALHOST:True</AssociatedConnectionMoniker>
48+
<AssociatedConnSrvName>LOCALHOST</AssociatedConnSrvName>
49+
<AssociatedConnUserName />
50+
<FullPath>whats-new-in-sql-server-2019.sql</FullPath>
51+
</FileNode>
3352
</Items>
3453
</LogicalFolder>
3554
<LogicalFolder Name="Miscellaneous" Type="3" Sorted="true">

0 commit comments

Comments
 (0)