Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Huge Table archive from One server to Another server - Hi All, I have a huge table of DataSpace 200 GB data and 450 GB of Index Space, Compression type is ColumnStore. Currently, I am using a power shell script with SqlbulkCopy Object to copy the data with a batch size of 10000. As the destination table size grows the copy is becoming slower and […] |
SQL Server 2017 - Development |
Insert data using view - Hello! I have to create a view called Customer_Age. I need to pick distinct birth year values from Customer table. Then using that I need to calculate Age as per today. And based on Age, I need to calculate Age group, Group Name etc. The data should look like: How do I create a […] |
SQL Server 2016 - Administration |
reconfiguring tempdb - hi folks i have a sql server that has 15 tempdb files split over 2 drives, and autogrowth of 10mb or 64 mb depending on location the server has only access to 8 cpu's. i want to reduce the files to 8, size them up equally with plenty of space and put them all onto […] |
Trans Log backups not running - I set up 2 servers with AG and a secondary is readonly. SQLSERVER 2016 on Windows 2016 Everything is up, AG is synced up and data comes back. The odd part is the databases in the AG won't take a trans log backup? I can run the statement, but nothing happens. It doesn't come up […] |
SQL Server 2016 - Development and T-SQL |
How to Query Arrays with T-SQL - Hello Community, Can someone let me know how to query Array with T-SQL? For example, for the sample table below I would like to query the field 'ce_data' to find the following: where applicationSubmittedData = 2021-05-17 and applicationType = personal and deceasedDiedEngOrWales = No The sample data is as follows: CREATE TABLE #tmpTable ( ce_data […] |
Recursive query problem - find ALL related records for a given record - I'm stumped but confident that there's a solution. I'm hoping someone can help. I need a way to find all of the related records in a set of relationships given any record ID in the set. The nature of the relationships is variable. The 'happy path' is that the relationships represent a simple 'daisy-chain' where […] |
SQL 2012 - General |
How to update generated number field with number to every group from 1 to 4 ? - I work on SQL server 2012 I face issue I need to update Generated Number on table test to get UNIQUE number to every group id from 1 to 4 so first group from groupid 1 to 4 will be as 1000 so second group from groupid 1 to 4 will be as 1001 so […] |
SQL Server 2019 - Administration |
log shipping LSAlert showing false error - We updated our production servers from SQL 2016 to SQL 2019 over the weekend, and we setup log shipping between our main SQL Server instance and our BI server... log shipping seems to be working as expected - logs are getting backed up on the primary and restored on the secondary, no errors, and I've […] |
SQL Server 2019 - Development |
SQL If not null then insert N - Is there a way to write a line into a SQL so that the column only shows a N if there is something in the field it is reading from? i.e. PERSON.TERMINATION_DATE, Only want this column to show an N if there is a termination date. |
XML Parsing - Unable to switch encodiing using utf-8 when casting from NVARCHAR - Hi there I have a piece of code which takes an input parameter of NVARCHAR(Max) and then attempts to cast it to XML as follows declare @DataSheetXML NVARCHAR(max) declare @DataSheetXML2 xml set @DataSheetXML = N' ' set @DataSheetXML2= CONVERT(XML,CONVERT(NVARCHAR(MAX),@DataSheetXML)) This fails because I get the following error message: Msg 9402, […] |
SQL Server 2008 - General |
Help with SUBSTRING CHARINDEX - I have a field that coonsistently has data in this style: (b) Joe Brown -12563, (a) Mary Edwards -15425 I need to pull out only the name. I have the below which will pull out the name but it won't trim the space, hyphen, and number off. Any ideas? SUBSTRING([AGENT],CHARINDEX(')', [AGENT])+1, LEN([AGENT])-CHARINDEX(')', [AGENT])) name |
Lock table for Insert/Update/delete - I am using SQL Sever 2008. I want to lock the whole table for insert/delete/update operation,but should allow other users to read. can anyone please suggest How to lock SQL table from insert/delete/update, but allow read , until certain operation is completed on that table ? |
SSRS 2012 |
SSRS required services - Good day to all. I would like to know what are the ff. required services on SSRS2012? My acquired service unit has a pre-installed MSSQL 2012 from the previous developer. Is there a testing port after activating/installing the report service. Appreciate your kind help. |
Powershell |
Can't reach site to install MS Reporting Services Tools - Hello experts, I found what seems like the perfect set of tools that I need to migrate reports from one SSRS instance to another. The info I used is here: https://www.mssqltips.com/sqlservertip/4738/powershell-commands-for-sql-server-reporting-services/ The first step is to install the tools using this command in PowerShell: Install-Module -Name ReportingServicesTools However, I get this message when I try […] |
Integration Services |
SSIS executing older child package - Dear all, I have a weird problem. Our client has in the MS SQL Server Integration Services Catalog, a parent Package deployed. That package calls some child packages using the Execute Package Task and calls the child ssis from the filesystem. I changed the child package, but it seems the parent package executes the previous […] |