Contents tagged with sql server
-
SQL Server TSQL Get Last Identity Seed After Insert
Use SCOPE_IDENTITY() if you are inserting a single row and want to retrieve the ID that was generated.
CREATE TABLE #a(identity_column INT IDENTITY(1,1), x CHAR(1));
INSERT #a(x) VALUES('a'); … more
-
Command Line equivalent of Generate Scripts Wizard in SQL Server Management Studio (SSMS)
https://github.com/microsoft/mssql-scripter more
-
Steps for Installing SQL Server AlwaysOn Availability Groups
Prerequisites
Windows
Do not install AlwaysOn on a domain controller
The operating system must be Windows 2012 or later
Install all available Windows hotfixes on every server (replica)
Windows … more
-
Restore an existing availability group database participating in SQL Server Always On Availability Groups
https://www.sqlshack.com/restore-an-existing-availability-group-database-participating-in-sql-server-always-on-availability-groups/
https://mlichtenberg.wordpress.com/2016/02/02/how-to-restore-a- … more
-
Connection to SQL Server using SSL encryption
SSL connection encryption can be initiated either from the client, which can be an IIS website or Desktop application, or can be enforced at the server side. Either way, a certificate needs to be … more
-
SQL Server Profiler in Azure Data Studio
https://www.sqlservercentral.com/articles/is-sql-server-profiler-in-azure-data-studio more
-
Access Front End to SQL Server Back End
https://social.msdn.microsoft.com/Forums/en-US/85757ab1-250e-460a-9e51-5a17516c5524/how-to-create-an-odbc-connection-for-runtime-access-to-sql-server-database-tables?forum=accessdev
https://support. … more
-
SQL Server Blocking
https://docs.microsoft.com/en-us/troubleshoot/sql/performance/understand-resolve-blocking
https://blog.sqlauthority.com/2020/04/20/sql-server-blocking-tree-identifying-blocking-chain-using-sql- … more
-
SQL Server Disaster Recovery (DR) and High Availability (HA) Licensing Benefits
https://cloudblogs.microsoft.com/sqlserver/2019/10/30/new-high-availability-and-disaster-recovery-benefits-for-sql-server/
https://www.quexcel.com/knowledge-base/knowledge-base/new-sql-server-high- … more
-
SQL Server Connection String for Integrated Security (Windows Authentication)
connectionString="data source=SERVER\INSTANCE;Initial Catalog=MyDB;Integrated Security=SSPI;If using an App Pool account, use the following example formats:IIS APPPOOL\DefaultAppPoolIIS APPPOOL\ … more
-
Prevent Object Create in Master Database in SQL Server
USE masterGOSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TRIGGER DDL_PreventObjectCreationInMasterDBON DATABASEFOR CREATE_TABLE, CREATE_VIEW, CREATE_PROCEDURE,CREATE_FUNCTIONASBEGIN-- SET … more
-
SQL Server Always On Availability Groups Step By Step
https://www.sqlrx.com/steps-for-installing-sql-server-alwayson-availability-groups/
https://argonsys.com/microsoft-cloud/library/step-by-step-creating-a-sql-server-alwayson-availability-group/ … more
-
SQL Server Ports: How to Find
https://www.sqlshack.com/overview-of-sql-server-ports/
-
Connection Strings for SQL Server and Other Databases
https://www.connectionstrings.com/ more
-
Logging SQL Server Logins
Source:
https://www.sqlservercentral.com/blogs/has-this-login-been-used-recently
--DROP TABLE #LogInfo
DECLARE @searchstring1 nvarchar(500) = ''
DECLARE @searchstring2 nvarchar(500) = '' … more
-
SQL Server Express LocalDB
You can connect with SSMS or visual studio with server name:
(localdb)\MSSQLLocalDB
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql- … more
-
SQL Server Ports
Using netstat is handy to research to see if a port is in use, but for this issue it is more direct to see what SQL Server thinks is going on, and fortunately there are some views that have the info … more
-
Regaining access to SQL server after changing the domain
https://www.sqlservercentral.com/articles/regaining-access-to-sql-server-after-changing-the-domain
-
Running SQL Server in Docker
https://octopus.com/blog/running-sql-server-developer-install-with-docker
https://hub.docker.com/_/microsoft-mssql-server
-
SQL SERVER – ERROR: FIX – Database diagram support objects cannot be installed
https://blog.sqlauthority.com/2019/03/04/sql-server-fix-database-diagram-error-15517-cannot-execute-as-the-database-principal-because-the-principal-dbo-does-not-exist/ more