This file contains hidden or 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
/* | |
-------------------------------------------------------------------------------------- | |
Stored Procedures are late-binding, so they will build even with references to non-existant objects, and will fail at runtime | |
This script attempts to find any missing references in a database, and can be run as a post deployment script in SSDT to | |
verify there are no unvalid references after a database has been deployed. | |
-------------------------------------------------------------------------------------- | |
*/ | |
DECLARE @ResultStr varchar(max) | |
DECLARE @ResultTable TABLE |
This file contains hidden or 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 extracts database to a dacpac | |
#path to store the dacpac | |
$localDbConnStrTemplate ="Data Source=tcp:localhost; Initial Catalog=<db;Integrated Security=True;" | |
#location to store dacpac | |
$dacpacTarget="c\testdac.dacpac" | |
#objects to exclude | |
$excludeObjectTypes="Aggregates;ApplicationRoles;Assemblies;AsymmetricKeys;BrokerPriorities;Certificates;ColumnEncryptionKeys;ColumnMasterKeys;Contracts;DatabaseRoles;Defaults;ExtendedProperties;ExternalDataSources;ExternalFileFormats;ExternalTables;Filegroups;FileTables;FullTextCatalogs;FullTextStoplists;MessageTypes;PartitionFunctions;PartitionSchemes;Permissions;Queues;RemoteServiceBindings;RoleMembership;Rules;SearchPropertyLists;SecurityPolicies;Sequences;Services;Signatures;SymmetricKeys;UserDefinedTableTypes;ClrUserDefinedTypes;Users;XmlSchemaCollections;Audits;Credentials;CryptographicProviders;DatabaseAuditSpecifications;DatabaseScopedCredentials;Endpoints;ErrorMessages;EventNotifications;EventSessions;LinkedServerLogins;LinkedServers;Logins;Routes;Serv |