How to find out whether your database is transactional, analytical or hybrid?
If you are a DBA, especially Infrastructure DBA, Production DBA or Operations DBA then you don't necessarily always know what...
2018-04-26
411 reads
If you are a DBA, especially Infrastructure DBA, Production DBA or Operations DBA then you don't necessarily always know what...
2018-04-26
411 reads
SELECT * FROM sys.master_files AS f
CROSS APPLY sys.dm_os_volume_stats(f.database_id, f.file_id) v;
2018-04-23
337 reads
2018-04-20
WMI has been around for a while and it has grown significantly over the years. With Microsoft's focus on powershell,...
2018-04-20
12,285 reads
USE master
exec sp_MSforeachdb '
use [?]
print ''?''
print cast(databasepropertyex(''?'', ''Updateability'') as varchar(200))
if databasepropertyex(''?'', ''Updateability'') = ''READ_WRITE ''
dbcc shrinkfile(2,1)
'
2018-04-20
319 reads
What SQL command do you use to pull and filter data from a table ?
SELECT [Column List] FROM [Table Name]...
2018-04-20
453 reads
When you restore a database, it will also restore all permissions along with it. But what if you are restoring...
2018-04-19
12,395 reads
I was working for a client on their very critical and heavily used database. The application was an E-commerce website...
2018-04-19
8,001 reads
If you ever had a need to start a SQL job using sp_start_job stored procedure in msdb then you know...
2018-04-19
15,875 reads
For one of my clients, I needed to know and document not only database names, size and locations but also...
2018-04-19
596 reads
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
By Steve Jones
It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers