Restoring databases when only data file available
A procedure too re-attach a data( MDF ) file when the log file is missing or not recoverable.
2002-11-22
4,858 reads
A procedure too re-attach a data( MDF ) file when the log file is missing or not recoverable.
2002-11-22
4,858 reads
Use this script to create a warm standby database server for all your user database. This new version has a new feature to allow the standby database to be in a ready-only mode so that users can access it. You can change the job schedule to suit your requirement. One bug has been fixed that […]
2002-10-31
299 reads
I use this script on some (not all) databases to backup the Logs when they reach a certain level of being full. For example, when the log is 60% full the log will be backed up.Change the ????? values and this script is ready to go.
2002-10-03
572 reads
This Stored Procedure create backup job for all user databases. You can customize SQLAdmin operator.See Creating Backup Devices
2002-09-12
896 reads
This Stored Procedure create backup devices for all user databases. You can customize path, name standard and type of device.See Creating Job Backup
2002-09-12
543 reads
Database backup made simple. You dont even have to pass any parameters if desired. It will all be handled for you.Capable of Net Send status notifications and writes status message to Windows event log.Side Effects:When not passing any @database params the the backup is done of the database where the proc resides. That means if […]
2002-09-06
576 reads
New feature to relocate files on the secondary server has been added to this script. If you don't need this feature please use my other script that is posted on this website.Run this script on a secondary SQL Server to replicate the data of all the user databases from the primary server every 15 minutes. […]
2002-08-09
300 reads
This script will do a full backup and transaction log backup of all the user database on the primary server and restore it over to the secondary server. The full backup/restore runs once every day and the transaction log backup/restore runs every minutes. Just provide the name of the primary and the secondary server and […]
2002-07-12
509 reads
this procedure is an interface to bcp it gets database name,table name , file and path,,mode E/I for export/import and seperator character user and password and exports/imports text files from / to SQLSERVER
2002-07-10
1,426 reads
There are various utilities for scripting MS SQL Server objects : Tables , Procedures , Functions .... etc ...Small piece of code that will allow you to script all jobs from your SQL Server using SQL DMO object.
2002-06-17
1,312 reads
By Vinay Thakur
Continuing from Day 4 where we learned Encoder, Decoder, and Attention Mechanism, today we...
By Vinay Thakur
Continuing from Day 3 where we covered LLM models open/closed and their parameters, Today...
By Steve Jones
One of the nice things about Flyway Desktop is that it helps you manage...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
hi everyone I am not sure how to write the query that will produce...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers