Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2016 - Administration |
Over period of time application stop connecting to AG database - Hello. SQL version - 2016 , windows 2019 both are enterprise edition Over period of time application stop connecting to Alwayson availability group database. what could be reason why application stop working automatically? please suggest. Checked SQL Error logs not found any errors regarding connections. also windows event viewer not found cluster related errors. application […] |
SQL Server 2016 - Development and T-SQL |
Calculating Numerator and Denominator - Good evening, I have a rather peculiar issue while trying to calculate Numerator and Denominator for a Final Temporary Table I have built (using a couple of Intermediary Temporary Tables along the way). ATTEMPT 1 The following two lines were my initial attempt (on the Final Temp): Cast(SUM(CASE When Then 1 Else 0 […] |
trying to call powershell from TSQL statement - Hello, trying to call a powershell file I created, locally on the server, but also, made sure since this has an always on cluster, to first check if its PRIMARY, BUT, what i am having trouble with, is using the xp_cmdshell command... when i run the following: EXEC xp_cmdshell 'powershell.exe -File E:\folder\RunToExport.ps1' it gives the […] |
Administration - SQL Server 2014 |
Getting below error - An error occurred during recovery, preventing the database 'XXXXX' (28:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support. (.Net SqlClient Data Provider) (Microsoft SQL Server, Error: 3414) Version : Microsoft SQL Server 2012 (SP4-GDR) (KB4583465) - 11.0.7507.2 […] |
Development - SQL Server 2014 |
Why is "SELECT *" about 10 times faster than "SELECT (ALL Columns)" - Dear all, I have noticed that a "SELECT * ..." is about 10 time faster than "SELECT Column1, Column2, ... LastColumn FROM Table WHERE ID = (number)" 70 ms <-> 650 ms The Queryplans are equal and so are the costs - in both cases it is a grouped index scan with a Cost of […] |
SQL Server 2019 - Administration |
File date from Extended Event .xel files - I know this, but I do not remember it. I have scoured by saved scripts as well a lot of google-fu. I have multiple extended event files. Activity_0_133820397244150000.xel Activity_0_133820364382140000.xel Activity_0_133820332071900000.xel This portion of the file name is a representation of the date and time, correct??? 133820397244150000 133820364382140000 133820332071900000 How can I calculate this???? |
restore db as db_copy. resolve hardcoded references within procedures to db. - So I backup & restore db as db_copy. within both there is a proc that does: update [db]..[column] I need it to say: update [db_copy]..[column] (Simplified, above x 1000) Is there a step in backup / restore to do this? Is there a quick resolution? Is this poor coding in the first place? Thank […] |
SQL Server 2019 - Development |
Is it possible to create a parameter and use different datasets? - Hello, I have an SSRS report, version 2019, that has two parameters, which will call for three different datasets. Parameter: Continent > 3 values (Label) = ASIA, EUROPE, SOUTH_AMERICA Parameter: Country -> cascading from the first parameter. Values are generated from the following datasets. Datasets - DS_Asia; Fields: Continent, Country; DS_Europe: Fields: Continent, Country; DS_South_America: […] |
Select statement with in using multiple columns - I inherited a mess. The previous developer did not understand how to set up a database properly. Beside not using proper data types, he did not use normalization, One of the things I need to do now is query on a table, see below, that has 4 columns now (it was multiple tables, 1 for […] |
any thoughts on datasphere? - hi my boss asked me to take a look at sap's datasphere product as a reporting alternative to ssrs. does the community have any thoughts on it? specifically how it compares to ssrs in user friendliness, time to market, cost of ownership maintenance wise? we have maybe one user who writes ssrs. in IT one […] |
Final SELECT with WHERE based on passing in variable from Dropdown box - Is there a way to base the final select statement based on whether a user chooses, from a report dropdown box, a date range based on e.g.: PaidDate or DateOfService similar to the below (which doesn't work): SELECT CASE WHEN @dateChoice = 'DOS' THEN ( SELECT DISTINCT tp.client_id AS Member_ID ,tp.PaidDate AS Paid_Date ,tp.DOS FROM […] |
AD, powershell and ssis - Hi, i have a requirement that involves visiting multiple folders in AD for active, disabled etc computers. Other attributes might need to be extracted as well including associated users and locations. From what im seeing in AD, at least sometimes the description column here has the user name. And the folder can be the location. […] |
SQL Server 2022 - Administration |
DbDefence - how does work this tool? - How it is implemented? I have installed, tried, it is free for dbs <=30 mb. I have asked their support: MS declared XP's are legacy and do not use them, they will be removed in the future versions. It was written some versions ago. What you will do? But DbDefence support answered: MS wrote but […] |
SSMS gets very messy - At work we have quite a few databases that I'm frequently browsing. This is quickly becoming a real mess when I need to switch between different SSMS'es (I need to start them with different credentials) and different databases. My questions is, do you guys have any hints to make working with lots of databases/tables within […] |
SQL Server 2022 - Development |
Transpose sql table rows into columns - I want to transpose sql table rows to columns. I have written a query for that already but its taking a very long time (around 15 min) as the number of rows in the table is high like 8M+. Is there any other way to write the query to get the same output with improved […] |