This user account () has been banned from the forums
Viewing 15 posts - 16 through 30 (of 44 total)
Find below script will help to get each table row count.
create table #rowcount
(
DB varchar(100),
Schemaname varchar(50),
TableName varchar(150),
Row_Count int,
RunDate Datetime
)
ALTER TABLE #rowcount ADD CONSTRAINT cDateRun DEFAULT GETDATE() FOR RunDate
exec sp_MSforeachdb
'
use [?]
IF DB_NAME()...
March 1, 2025 at 5:26 pm
Find below script for SQL server configuration and DB details.
--***********1. SQL Server version deatils**********
SELECT
SERVERPROPERTY('servername') AS [Server Name],@@ServiceName as [InstanceName],
CASE
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '8%' THEN 'SQL2000'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like...
March 1, 2025 at 5:21 pm
Find below script for SQL server configuration and DB details.
--***********1. SQL Server version deatils**********
SELECT
SERVERPROPERTY('servername') AS [Server Name],@@ServiceName as [InstanceName],
CASE
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '8%' THEN 'SQL2000'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like...
March 1, 2025 at 4:19 pm
Find below steps to fix the tempdb issues.
1)DBCC SHRINKFILE ('tempdev', 1024)
The query executed successfully but the size of the database did not change.
2)SELECT * FROM sys.dm_exec_requests WHERE database_id = 2
No...
February 28, 2025 at 6:01 am
Find below script will help to get table row count from database.
create table #rowcount
(
DB varchar(100),
Schemaname varchar(50),
TableName varchar(150),
Row_Count int,
RunDate Datetime
)
ALTER TABLE #rowcount ADD CONSTRAINT cDateRun DEFAULT GETDATE() FOR RunDate
exec sp_MSforeachdb
'
use [?]
IF...
February 28, 2025 at 6:00 am
Find below script will help to get table row count from database.
create table #rowcount
(
DB varchar(100),
Schemaname varchar(50),
TableName varchar(150),
Row_Count int,
RunDate Datetime
)
ALTER TABLE #rowcount ADD CONSTRAINT cDateRun DEFAULT GETDATE() FOR RunDate
exec sp_MSforeachdb
'
use [?]
IF...
February 28, 2025 at 5:59 am
Find below script to get last 6 months database growth.
DECLARE @endDate datetime, @months smallint;
SET @endDate = GetDate(); -- Include in the statistic all backups from today
SET @months = 6; ...
February 28, 2025 at 5:52 am
Find below steps to move system databases to another drive.
Auto generated script for Move System Databases from one drive to another Drive:
Syntax:
ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name...
February 28, 2025 at 5:35 am
Find below steps to move system databases to another drive.
Auto generated script for Move System Databases from one drive to another Drive:
Syntax:
ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name...
February 28, 2025 at 5:33 am
Refresh Steps from Prod database to non-prod database
1. Connect to Prod(Source) Server and Take the backup of Production database
Backup database AdventureWorks2017_Prod to disk='C:\SQLDBA\Backup\Practice\AdventureWorks2017_Prod_Full.bak'
2. Connect to Non-Prod(Target) server and Take the...
February 28, 2025 at 5:24 am
Refresh Steps from Prod database to non-prod database
1. Connect to Prod(Source) Server and Take the backup of Production database
Backup database AdventureWorks2017_Prod to disk='C:\SQLDBA\Backup\Practice\AdventureWorks2017_Prod_Full.bak'
2. Connect to Non-Prod(Target) server and Take the...
February 28, 2025 at 5:23 am
yes, if will restore DMK then may chance to impact the all Databases where we enable TDE on multiple databases.
February 28, 2025 at 5:07 am
yes, agree with above . Just given information about the script if we want to change the master key password
February 28, 2025 at 5:02 am
find below script to use the configure CDC on table-Database.
1. Enable CDC at the Database Level
USE YourDatabase;
GO
EXEC sys.sp_cdc_enable_db;
2. Enable CDC on a Table
After enabling CDC at the database level, you...
February 27, 2025 at 6:26 pm
TDE is used to keep the backup file in unreadable format.
Find below step to enable TDE one server and source backup file can restore in target environment with backup of...
February 27, 2025 at 6:22 pm
Viewing 15 posts - 16 through 30 (of 44 total)