-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support SSMS scripting for Sequences
- Loading branch information
Ashish Prasad
committed
Oct 5, 2023
1 parent
30520ee
commit c2b315f
Showing
9 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
USE master | ||
GO | ||
|
||
DROP VIEW sys_sequences_vu_prepare_view | ||
GO | ||
|
||
DROP PROC sys_sequences_vu_prepare_proc | ||
GO | ||
|
||
DROP FUNCTION sys_sequences_vu_prepare_func | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
USE master | ||
GO | ||
|
||
CREATE VIEW sys_sequences_vu_prepare_view AS | ||
SELECT * FROM sys.sequences | ||
GO | ||
|
||
CREATE PROC sys_sequences_vu_prepare_proc AS | ||
SELECT * FROM sys.sequences | ||
GO | ||
|
||
CREATE FUNCTION sys_sequences_vu_prepare_func() | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
RETURN (SELECT COUNT(*) FROM sys.sequences WHERE is_cycling= 0) | ||
END | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
USE master | ||
GO | ||
|
||
SELECT * FROM sys.sequences | ||
GO | ||
~~START~~ | ||
varchar#!#int#!#int#!#int#!#int#!#char#!#nvarchar#!#datetime#!#datetime#!#bit#!#bit#!#bit#!#sql_variant#!#sql_variant#!#sql_variant#!#sql_variant#!#bit#!#bit#!#int#!#int#!#int#!#tinyint#!#tinyint#!#sql_variant#!#bit#!#sql_variant | ||
~~END~~ | ||
|
||
|
||
SELECT * FROM sys_sequences_vu_prepare_view | ||
GO | ||
~~START~~ | ||
varchar#!#int#!#int#!#int#!#int#!#char#!#nvarchar#!#datetime#!#datetime#!#bit#!#bit#!#bit#!#sql_variant#!#sql_variant#!#sql_variant#!#sql_variant#!#bit#!#bit#!#int#!#int#!#int#!#tinyint#!#tinyint#!#sql_variant#!#bit#!#sql_variant | ||
~~END~~ | ||
|
||
|
||
EXEC sys_sequences_vu_prepare_proc | ||
GO | ||
~~START~~ | ||
varchar#!#int#!#int#!#int#!#int#!#char#!#nvarchar#!#datetime#!#datetime#!#bit#!#bit#!#bit#!#sql_variant#!#sql_variant#!#sql_variant#!#sql_variant#!#bit#!#bit#!#int#!#int#!#int#!#tinyint#!#tinyint#!#sql_variant#!#bit#!#sql_variant | ||
~~END~~ | ||
|
||
|
||
SELECT sys_sequences_vu_prepare_func() | ||
GO | ||
~~START~~ | ||
int | ||
0 | ||
~~END~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
USE master | ||
GO | ||
|
||
DROP VIEW sys_sequences_vu_prepare_view | ||
GO | ||
|
||
DROP PROC sys_sequences_vu_prepare_proc | ||
GO | ||
|
||
DROP FUNCTION sys_sequences_vu_prepare_func | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
USE master | ||
GO | ||
|
||
CREATE VIEW sys_sequences_vu_prepare_view AS | ||
SELECT * FROM sys.sequences | ||
GO | ||
|
||
CREATE PROC sys_sequences_vu_prepare_proc AS | ||
SELECT * FROM sys.sequences | ||
GO | ||
|
||
CREATE FUNCTION sys_sequences_vu_prepare_func() | ||
RETURNS INT | ||
AS | ||
BEGIN | ||
RETURN (SELECT COUNT(*) FROM sys.sequences WHERE is_cycling= 0) | ||
END | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
USE master | ||
GO | ||
|
||
SELECT * FROM sys.sequences | ||
GO | ||
|
||
SELECT * FROM sys_sequences_vu_prepare_view | ||
GO | ||
|
||
EXEC sys_sequences_vu_prepare_proc | ||
GO | ||
|
||
SELECT sys_sequences_vu_prepare_func() | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -464,3 +464,4 @@ Test_ISNULL | |
BABEL-4270 | ||
BABEL-4410 | ||
BABEL-4231 | ||
sys_sequences |