Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Always OnAavailability Group Read Traffic - Does anyone know of any good references on how to direct application reads and SSRS reads between the primary and read-only replicas? I would like to have all application reads go to the primary and not the read-only replica. |
SQL Server 2016 - Administration |
Retrieving the total number of records in a SQL instance - Hello, Is anyone aware of a good approach for retrieving the total number of records across all tables and all databases within a SQL instance? I've attempted to write a query for it, but it isn't working as expected. SET NOCOUNT ON DECLARE @Counter INT, @MaxId INT, @DbName VARCHAR(100), @Sql VARCHAR(100) SELECT @Counter = min(database_id) […] |
Monitoring SQL Server performance. SQL Server, Disks baselining - Hey everyone, hope you all are doing great. I got a couple of questions regarding OS/SQL Server information capture and its regarding how you guys capture data and baseline everything in your SQL Server/OS Performance. Here it goes, this might not make perfect sense at the beginning so I hope you guys could cut some […] |
SQL Server 2016 - Development and T-SQL |
Complex Join - I have to tables T1 and T2 that are related by two columns C1 and C2. Both columns are null-able so it's not as simple as: T1 join T2 on T1.C1 = T2.C1 and T1.C2 = T2.C2 So I've come up with this: T1 join T2 on ( T2.C1 = T1.C1 and T1.C2 is null […] |
Administration - SQL Server 2014 |
Distribution DB increasing in size - We have a transaction replication running. We then decided that on a certain application, they would enable a module that would increase data in one of the tables. Prior to this, the Distribution was only 10GB, after 3 days, it is now 27 GB and constantly increasing. I see on the autogrow event that it […] |
SQL 2012 - General |
High parallel processes - Hi, I have a SQL server 2012 instance (Ver-11.0.5058). We execute a stored procedure which fetches more than 24 million records after joining data from 3 different CTEs (each of which has 3 to 7 tables in join). The MAXDOP for the instance is set to 8 and server has 16 logical processors. When we […] |
Break AOAG - Hello, I'm looking for advice on breaking a 2 node cluster / AOAG down to a stand-alone instance, the catch being without changing the way the applications connect. There are about 8 different SW Dev. apps that have DBs on this instance. I was thinking of creating a DNS record with the listeners name and […] |
SQL Server 2019 - Development |
Silly SQL Question - I'm sure there's a simple way to do this, but I can't seem to figure it out. I have data something like this: ID, RESULT 1, Y 1, Y 1, Y 2, N 2, N 3, Y 3, N 4, Y 4, N I only want to pull records where the ID has both a […] |
Issues with SQL Trigger - I have created a SQL Trigger as below. create trigger testtrigger on testdb for insert as declare @sql varchar(8000) SELECT @sql = 'bcp "select * from testdb" queryout c:/test.txt -c -t -T -S localhost' exec xp_cmdshell @sql go But when a row inserted in the testdb, the text file is created, but there is no […] |
Reporting Services |
Access to Field!xxxx.value - I have not come across where I needed to do this, I have a report that uses multiple datsets, " I have done this before, but I need to take the value from one dataset field and subtract it from another, as you know when you bind the table to ds1 you get scope errors, […] |
SSRS 2017 Delivery Extension Deployment - In SSRS 2008 to 2012 the code block for permissions in rssrvpolicy.config is below. Does anyone know what code block is used in SSRS 2017? |
Connecting |
Connecting to SQL server 2019 from python/Jupyter Notebooks - Does anybody have an example of connecting to a local instance of SQL Server from Jupyter notebooks? Do I really have to create a DSN to do this? ## define some variables so this stuff is easier to modify server = 'DESKTOP-D19S9C8/NONALAND' database_name = 'AdventureWorks2017' query = 'SELECT TOP 10 BusinessEntityID,FirstName,LastName,ModifiedDate FROM Person.Person WHERE PersonType […] |
Powershell |
How to check if the file exists in S3 bucket. - Hi, I am trying to build a script to copy sql backups to an S3 bucket. The structure of the folders is like this: ServerName - FullBackups -- Daily -- Weekly -- Monthly Inside the lower level folders are the backups. But the structure may change. I have a script below which recursively looks through […] |
Suggestions |
Spam removal from https://www.sqlservercentral.com/forums/ page - Firstly I like the fact that as soon as a post is marked as spam it's hidden. Perhaps they could be hidden from the https://www.sqlservercentral.com/forums/ overview page as well? |
Business Intelligence |
Job fails with error : Failed to add row to output buffer SSIS - I have a data flow task with 2 components : source ODBC : with more than 3 000 000 rows OLEDB Destination : it's my table destination . the job works perfectly every day at 2:00 AM . But this day it fails with the folowing error message : The system reports 97 percent memory. […] |