Forum Widgets
Latest Discussions
SQL Server does not reduce the size of MDF and LDF
I am a SQL Server 2017 user, I deleted a table that had too many records, but after the delete process, the size of the MDF and LDF files did not decrease, but increased. I have shrunk the file but the file size remains the same. What should I do to change the file size?riyantoMar 14, 2025Copper Contributor6Views0likes0CommentsTable
Hello everyone, I have a problem. Our products are dimension-dependent (width / height) and the prices are stored in a table [Costinformation]. The grid table is in the Pricetable column. Rows are separated with CRLF and the individual columns with Tab. Table [Costinformation] Mandant Code Text Category Pricetable 1 4711 Product Table 1 Window 1 4712 Product Table 2 Door Example Pricetable-Column W / H 100 200 300 400 100 10,00 20,00 30,00 40,00 200 20,00 30,00 40,00 50,00 300 30,00 40,00 50,00 60,00 400 40,00 50,00 60,00 70,00 Now it is so that there are always price adjustments. In 100% of cases, this is in percentage terms. This means that the prices in the grid table have to be extrapolated. I need a solution so that I no longer have to do this manually. Can it be done directly via an SQL statement? Example: Product Table 1 --> price + 5% Produkt Table 2 --> price + 3 % I hope it is understandable. My English is not so good. I can also provide an example table. Thank you very much for you help. Greetings from Germany CharlyStellaSolvedCharlyStellaMar 13, 2025Copper Contributor114Views0likes7CommentsParameterize OLE DB Destination?
I have a large number of tables to backfill and I was hoping to automate this process with a package parameter instead of creating a dataflow for each table (see screenshot below). Package parameter like 'tbl_a, tbl_b, tbl_c' Followed by an Execute Script that splits this string into an Array. The array would then be enumated in a Foreach loop container. 3a. SQL command from enumerated variable would be fed into an OLE DB Source SQL Command 'Select * from tbl_a', 'Select * from tbl_b', etc. 3b. Table name or view name variable in OLE Destination would be given different table names 'tbl_a' , 'tbl_bl', tbl_c' through the enumerated variables Where it fails is when tbl_a, tbl_b is enumarated into OLE DB Destination Error: 0xC020201B at Data Flow Task, OLE DB Destination [2]: The number of input columns for OLE DB Destination.Inputs[OLE DB Destination Input] cannot be zero. Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "OLE DB Destination" failed validation and returned validation status "VS_ISBROKEN". Is there a way to parameterize OLE DB Destination? Is there a way to avoid need column mappings or somehow query all the columns from the OLE DB Source to feed into OLE DB Destination? Each table is different and mapping the columns for one backfill would completely blow up the next backfill in the batch. Is there another Task I can use in place of OLE DB Destination that can be preceded by OLE DB Source? Thanks in advancejharper305Mar 12, 2025Copper Contributor19Views0likes0CommentsSQL Server - SOS_SCHEDULER_YIELD and Unbalanced NUMA Node Usage
Hi everyone, we've faced an unusual behavior on our SQL Server and would like to understand the cause and how to manage it properly. Our DB Server is a physical server with 64 cores (128 logical CPUs) and 4 NUMA nodes. During a peak in application requests/session, we noticed a significant increase in SOS_SCHEDULER_YIELD waits, with an unusual distribution of CPU load: only 2 NUMA nodes were heavily saturated, while the others remained underutilized. Our main questions are: At what point does SQL Server assign the execution NUMA node to a session/process? During connection establishment? When the statement starts executing? If processor affinity is left at its default setting (not manually configured at the instance level), what metrics can we monitor to better understand and manage this behavior? Any insights or experiences with similar cases would be greatly appreciated. Thanks in advance!StefanoPMar 12, 2025Copper Contributor28Views1like0CommentsCreating LinkedServer between On-Prem SQL to Azure SQL MI
Hi, is it possible to use security option (Be made using the login's current security context )with lnikedserver from on-prem SQL to MI ? Our MI is enabled for windows auth and we are successfully connect MI in SSMS using windows auth from on-prem client. when I use this option in linkedserver and try to access linked server with windows auth I get following error. Login failed for user '<token-identified principal>'. Reason: Could not find a user matching the name providedsksingh123Mar 12, 2025Copper Contributor17Views0likes1Comment- Bayas1200Mar 11, 2025Copper Contributor259Views0likes3Comments
Current SQL Server Certifications
Hello, I had a couple Microsoft certifications many years ago and am interested in getting re-certified in SQL Server. I looked on learning.microsoft.com but couldn't find any certification options. Am I looking in the right place? Does Microsoft still offer SQL Server certifications? Thanks, BrettMango42Mar 11, 2025Copper Contributor349Views0likes3CommentsHow to add existing log files to a newly created filegroup ?
I have two log files which are on different drives A: \logfile1.ldf & B:\logfile2.ldf which are not part of a file group. I want to remove logfile2.ldf , but I am unable to remove it because it is not empty. I tried emptying it by shrinking , but because it is not part of the filegroup, it failed. When I tried to add the files to a newly created filegroup, using ALTER DATABASE ADD FILE( name= 'logfile1', filename='A:\logfile1.ldf') TO FILEGROUP LOGFILE I got an error message The logical file name "logfile1" is already in use. Choose a different name. So, how can I add the log files to filegroup 'LOGFILE'? Thank you.SolvedwsunarkoMar 11, 2025Copper Contributor50Views0likes3CommentsTwo missing record from this query
I have the following query: SELECT '20'||SUBSTR(CAST(T1.LMDTM1 as VarCHar(15)), 2, 6) as Date, T1.LMFSTM as Status, T1.LMREF1 as CustPO, TRIM(T1.LMREF1) ||'-'||TRIM(T1.LMREF2) as Key, T1.LMREF2 as Order, T1.LMREF3 as GUID FROM EXTSYSFCC.EXLLMQLD T1 WHERE t1.LMDTM1 = ( SELECT MAX(t2.LMDTM1) FROM EXTSYSFCC.EXLLMQLD t2 WHERE t2.LMREF2 = t1.LMREF2 ) AND LMTPC1 = 'ABC' AND LMMSID = '123' For some unknown reason to me I detected at least two records that are not included, the date field is 20250217 and the part where it skips those two records, there is at least one record with the same date, is this: t1.LMDTM1 = ( SELECT MAX(t2.LMDTM1) FROM EXTSYSFCC.EXLLMQLD t2 WHERE t2.LMREF2 = t1.LMREF2 ) If I delete that part I can see those two records. Any help will be deeply appreciated. Thanks!martipe1Mar 07, 2025Copper Contributor27Views0likes2Comments
Resources
Tags
- Data Warehouse67 Topics
- Integration Services58 Topics
- sql server50 Topics
- SQL44 Topics
- Reporting Services43 Topics
- Business Intelligence35 Topics
- Analysis Services31 Topics
- Business Apps22 Topics
- analytics21 Topics
- ssms13 Topics