Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add registration to all database #4

Open
MykolaDiachok opened this issue Aug 13, 2018 · 0 comments
Open

add registration to all database #4

MykolaDiachok opened this issue Aug 13, 2018 · 0 comments

Comments

@MykolaDiachok
Copy link

I tested your project, and had a little trouble with connecting from the worked database.
Please add script to registration
DECLARE @Sql NVARCHAR(MAX) = N'';

SELECT @Sql += CHAR(13) + CHAR(10)

  • 'USE ' + QUOTENAME(name) + ';

IF OBJECT_ID(''dbo.RegexSplit'', ''FN'') IS NOT NULL
DROP FUNCTION dbo.RegexSplit;

IF OBJECT_ID(''dbo.RegexSplit'', ''SN'') IS NOT NULL
DROP SYNONYM dbo.RegexSplit

CREATE SYNONYM dbo.RegexSplit FOR master.dbo.RegexSplit;'
FROM sys.databases WHERE name <> 'master';

PRINT @Sql;

EXEC sp_executesql @Sql;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant