Viewing 15 posts - 1 through 15 (of 15 total)
Thanks Beatrix,
Can developers use "Secondary instance name" from management studio so that they can connect to Secondary replica databases?
August 12, 2019 at 9:25 pm
This is how our AAG configured:
Having this configuration, how do I restrict developers running select queries to go to secondary replica ?
August 8, 2019 at 10:51 pm
SELECT UnitId, ProductID, Occurences = COUNT(*)
FROM dbo.Product
GROUP BY UnitId, ProductID WITH ROLLUP
having count(*)>1
Results:
UnitId ProductID Occurences
NULL NULL 2208020
NULL NULL 2208020
I...
August 8, 2019 at 6:53 pm
Hi Jeff,
Below is the index that key lookup is using. Can you please let me know how I can use COUNT with a GROUP BY that matches the keys ?...
August 8, 2019 at 5:36 pm
I have a query which shows the differences but it is not giving if the column datatype changes. How do I get that?
select isnull(db1.table_name, db2.table_name) as
August 2, 2019 at 10:01 pm
found it.
delete from table output deleted.*
August 1, 2019 at 8:16 pm
thanks bmg002. I really appreciate your help.
And also I want to do a schema comparison for the source database and Archive database tables ?
I want to perform a check before...
July 30, 2019 at 3:56 pm
Thanks so much!
Can you please advise me how exactly I should add @@rowcount to row count for inserts into each tables also deletes from each table?
I tired to have below...
July 15, 2019 at 6:38 pm
Thank you.
Yes, Transaction table has duplicate values for OperatorID but they are unique with TransactionID. Please see the screenshot.
I have updated the insert logic in archive.dbo.operator table as you advised....
July 9, 2019 at 8:09 pm
Thanks Steve,
Here is the DDL for the tables:
Transaction:
CREATE TABLE [dbo].Transaction(
[TransactionID] [int] NOT NULL,
[OperatorID] [nchar](32) NOT NULL,
[CustomerID] [char](100) NULL,
[TransactionNumber] [int] NOT NULL,
[TransactionDateTime] [datetime] NOT NULL,
[CreateDateTime] [datetime] NOT NULL,
PRIMARY KEY CLUSTERED
(
[TransactionID] ASC
)WITH...
July 9, 2019 at 6:34 pm
I found that the issue why I'm getting primary key violation while inserting to archive database.
Here the query failing in the stored procedure:
insert into archive.dbo.operator
select * from...
July 9, 2019 at 5:30 pm
Thanks bmg002,
I will try SSIS for data archiving and see if that helps.
June 24, 2019 at 11:13 pm
I have used below procedure and it is working fine but unable to create keys and Indexes.
declare @tablename varchar(500)
declare @sql varchar(5000)
declare @idname varchar(50)
declare @tablearchive varchar(500)
--Select all the...
June 24, 2019 at 7:42 pm
I use datapump, expdp and impdp in Oracle to refresh lower environments. Do we have similar functionality in SQL Sever instead of backup/restore ?
June 21, 2019 at 3:49 pm
Viewing 15 posts - 1 through 15 (of 15 total)