SQLCMD to export data in txt file
SQLCMD is one of many methods to export your database data to some text file
2016-10-12 (first published: 2016-09-27)
22,200 reads
SQLCMD is one of many methods to export your database data to some text file
2016-10-12 (first published: 2016-09-27)
22,200 reads
DBA many a times need to shrink the log files if that grows very large. Though I am not recommending to do it daily or often but if space is an issue and you want to release space to OS, you may use the script.
2016-10-11 (first published: 2016-09-22)
967 reads
If you have any requirement to extract next 100 sequential date from a present date, you can use the below script. You can change the @datetimeformat value and the output will appear in the same format.
2016-10-10 (first published: 2016-09-26)
534 reads
2016-10-07 (first published: 2016-09-20)
1,578 reads
If you have a requirement to enable email notification to all the SQL Jobs, then you may use my script.
2016-10-06 (first published: 2016-09-20)
1,086 reads
Checks currently running sessions and blocking queries with session information
2016-10-05 (first published: 2016-09-16)
816 reads
2016-10-04 (first published: 2016-09-19)
483 reads
Server principal 'xx\yy' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal. (Microsoft SQL Server, Error: 15173). If you are gett
2016-10-03 (first published: 2016-09-16)
3,187 reads
One way to calculate how many minutes a person has worked considering holidays and shifts, being given starting and ending date / time
2016-09-29 (first published: 2016-09-08)
620 reads
This Simple script will help to do a Server wide search for an object name or usage of a String in Object Code like Function, Procedure, Views
2016-09-26 (first published: 2016-08-25)
478 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