Activity overview
Latest activity by Lxocram
One way to do this is to add views to the msdb databases on both nodes/servers that act as a non-system-object "proxy" You can then use SQL DATA Compare with the option "include views" and then set comparison keys in SQL DATA COMPARE tables & views to use the names instead of uuids and then exclude identifier/modified/version columns from comparison e.g
USE msdb;
GO
CREATE OR ALTER VIEW sysjobs_proxy
AS
SELECT *
FROM msdb.dbo.sysjobs AS j;
GO
CREATE OR ALTER VIEW sysjobsteps_proxy
AS
SELECT st.*,
j.job_id AS j_job_id,
j.name AS job_name
FROM dbo.sysjobsteps AS st
INNER JOIN dbo.sysjobs AS j
ON j.job_id = st.job_id;
GO
CREATE OR ALTER VIEW sysjobschedules_proxy
AS
SELECT jsc.*,
j.job_id AS j_job_id,
j.name AS job_name,
sc.name AS shedule_name,
sc.schedule_id AS sc_schedule_id
FROM msdb.dbo.sysjobschedules AS jsc
INNER JOIN dbo.sysjobs AS j
ON j.job_id = jsc.job_id
INNER JOIN dbo.sysschedules AS sc
ON sc.schedule_id = jsc.schedule_id;
GO
CREATE OR ALTER VIEW sysschedules_proxy
AS
SELECT *
FROM msdb.dbo.sysschedules AS s; However - this does not yield any usable scripts to switch job-step order etc.. It's easier to script out the job with DROP and CREATE and alter top portion
IF EXISTS (SELECT 1 FROM msdb.dbo.sysjobs WHERE name='JOBNAME'
BEGIN
DECLARE @jobId BINARY(16)
SELECT @jobId=job_id FROM msdb.dbo.sysjobs WHERE name='JOBNAME'
EXEC msdb.dbo.sp_delete_job @job_id=@jobId, @delete_unused_schedule=1
END
/ comments
One way to do this is to add views to the msdb databases on both nodes/servers that act as a non-system-object "proxy"You can then use SQL DATA Compare with the option "include views"and then set c...
SQL source control crashing SSMS
First I get a windows error
Problem signature:
Problem Event Name: APPCRASH
Application Name: RedGate.AppHost.Client.exe
Application Version: 0.0.1.130
Application Timestamp: 583f0748
Fault Module ...
See https://redgate.uservoice.com/forums/14 ... al-objects / comments
See https://redgate.uservoice.com/forums/14 ... al-objects
The changes are not flagged by SQL Compare because they are not there yet.
I'm trying to use the SQL compare to script out a selected range of objects in one script and then implement the changes on that script.
Think big refactors eg:
*changing a column name in a range of tables and/or views that are not always "interdependent"
*replacing a UDF with inline code
*changing filters and business rules in a range of views
*applying style-formatting to a range of objects
so i'd have a script like :
ALTER VIEW vw1
ALTER VIEW vw2
... / comments
The changes are not flagged by SQL Compare because they are not there yet.
I'm trying to use the SQL compare to script out a selected range of objects in one script and then implement the changes o...
Include some identical objects in deployment script
Is there an option to include identical objects in the selected objects for deployment?
I know you can include them in the "change report" html but i can't select them in object selected for deplo...
Eddie
Thanks for the feedback.
We use the dedicated model. I was mostly just wondering why tempdb is used and why these suggested indices would not be pre-included.
I often use the missing_indices DMV (performance dashboard) to spot performance problems and I stumbled upon these suggested indices many of times so I thought I'd ask around on the forum to satisfy my curiosity
Btw I was wrong to blame the DTA (in this instance) , it was the missing indices dmv/report
Lx / comments
Eddie
Thanks for the feedback.
We use the dedicated model. I was mostly just wondering why tempdb is used and why these suggested indices would not be pre-included.
I often use the missing_indices ...
Multi database support - commit changes from a list of DBs
We have multible databases under source control.(some main-db's and some more modular/auxiliary "side"-databases). They're on the same server.
Each has their own repository. They're not part of one...
Suggested Indexes on RG_AllObjects_V4
Database Engine Tuning Advisor ( :twisted: ) keeps advising me to add indices on some tables in tempdb related to SQL Source Control.
Why is tempdb used for this table and not a dedicated redgate d...
Now we can import/export styles care to share yours?
I sometimes wish to switch styles depending on the length/complexity of the code i'm viewing.
e.g. im doing some analysing of data with a whole bunch of other queries in the same window
SELECT fiel...
ALTER PROC MS_PerfDashboard.usp_Main_GetRequestWaits
as
begin
SELECT
r.session_id,
MS_PerfDashboard.fn_WaitTypeCategory(r.wait_type) AS wait_category,
r.wait_type,
r.wait_time
FROM sys.dm_exec_requests AS r
INNER JOIN sys.dm_exec_sessions AS s ON r.session_id = s.session_id
WHERE r.wait_type IS NOT NULL
AND s.is_user_process = 0x1 AND r.wait_type<>'WAITFOR' / comments
ALTER PROC MS_PerfDashboard.usp_Main_GetRequestWaits
as
begin
SELECT
r.session_id,
MS_PerfDashboard.fn_WaitTypeCategory(r.wait_type) AS wait_category,
r.wait_type,
r.wait_time
FROM sys.dm_exec_requ...