|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Catching a Deleted Column | |
I have this code in a SQL Server 2019 database:
CREATE TABLE moduletest( col1 int, col2 int, col3 int) GO CREATE OR ALTER PROC usp_getTest AS SELECT col1, col2, col3 FROM dbo.moduletest GO --run once to get proc in cache EXEC dbo.usp_getTest; GOI now run this code: ALTER TABLE dbo.moduletest DROP COLUMN col3 GOWhen I run this next code, what is returned? EXEC sp_refreshsqlmodule 'usp_getTest' GO | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Central Management Server Credentials How can I store credentials for each instance in a Central Management Server (CMS)? Answer: All CMS connections use Windows Auth with the current user credentials. Explanation: The CMS only stores the address of the instance. All security uses the credentials of the user that connects to the CMS. Ref: Create a Central Management Server and Server Group - https://learn.microsoft.com/en-us/sql/ssms/register-servers/create-a-central-management-server-and-server-group?view=sql-server-ver16 |
Featured Script |
User-Created GENERATE_SERIES() Function for Older SQL Server Versions Jonathan AC Roberts from SQLServerCentral In the world of SQL Server, adaptation is key. While the built-in GENERATE_SERIES() function was a valuable addition in SQL Server 2022, its absence in older versions created a functionality gap. Enter the user-written GENERATE_SERIES function. Adapted from Jeff Moden's "dbo.fnTally", it offers an efficient means to generate a series of numbers within a defined range in older SQL Server versions. Its design mirrors the built-in function in SQL Server 2022, making the transition between versions as simple as removing the dbo. prefix. This forward-thinking design reflects the ingenuity of the SQL Server community, ensuring a seamless, efficient database migration experience.
|
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
Listener IP - I have a listener which is listening to IP which is online. However, I have one of the IP which is showing failed status instead of offline. Is that something to be concern? |
delete as head blocker - Hi All, Need some help in finding out of what is the problem in the query and how can we make the query faster. On one of the production environment, a DELETE statement was running over 50 mins and blocked more than 100 sessions. I wasn't able to get the actual plan. However, including estimated […] |
Availability group - Looking for the options whenever the primary replica is refreshed then synching the secondary replica would need to be done and which would take long time if there are more that 1 secondary replica's. Checking to see is there a faster way to sync the secondary replica after the primary replica refresh? Thanks in Advance! |
SQL Server 2016 - Development and T-SQL |
SQLCLR functions - Hi all We've written some SQLCLR functions in C# to try and get rid of the UDF's we'd written (that were a lot slower). Is there any way to add in some sort of help text to explain what the functions does, what parameters are required, what format the parameters should be in, etc? […] |
Converting rows into columns - I have a table that contains three columns with ID, dates and value. I want to convert the contents into rows so that the date column will become a row and the FldVal will become the contents. Date and FldVal could contain different values. I think I can use Pivot, but not sure what to […] |
SQL Server 2019 - Administration |
Insert Token Replication in AG - Hello , I work in a context where my transactional replication is configured in AG the replication monitor is configured in a single node sometimes when I try to trace a Token for monitoring replication I get a message that tells me my database is in read ony Does anyone of you have an […] |
Restore script is not working - Below script is not working .Not sure what is wrong in it. Any suggessions pls. --get the last backup file name and path Declare @FileName varChar(255) Declare @cmdText varChar(255) Declare @BKFolder varchar(255) Declare @DT datetime set @FileName = null set @cmdText = null set @BKFolder = '\\xxxxx\xxxxx\' set @DT = getdate() create table #FileList […] |
Best Practice Analyzer for SQL Server 2019 - Hello All I am looing to run the BPA for SQL Server 2019 version , but don't see BPA available for SQL 2019. Please help me if any other same as BPA available ( replacing BPA ) to use for SQL Server 2019. Thanks, |
XE Module start histogram not show all - Hi, module_start doesn't find some events in non-filtered session, and finds them when filtering for database name. I exec manually from ssms procedure and it count in filtered XE but wasn't in non filtered XE. tried also NO_EVENT_LOSS option but still same. I found the same problem in other SQL instances. This can be problem […] |
SQL Azure - Administration |
Finding Last Time the Users Connected to a Particular Azure PaaS Database. - Can we Find the Last Time the Users Connected to a Particular Azure PaaS Database. If yes then please could the logic for that be shared as well. |
Reporting Services |
Redirecting HTTP to a new server being blocked by SSRS - We have migrated SSRS between servers as part of a SQL version upgrade. The original server has IIS on it (for MDS) and I want to use HTTP Redirection to send the traffic from the old server to the new one. If I go to "http://server" it redirects without issue but if I go to […] |
SSRS REPORT - Hi I have report in Crystal looks like below Is possible to create similar to this in SSRS? here is the one I already start working on |
Analysis Services |
Excel PivotTable Fields order different after upgrade to SQL 2022 SSAS tabular - Hello, We have upgraded one of our SSAS Tabular environments to SQL 2022, and are noticing changes in the way the measures and dimensions are shown in the “PivotTable Fields” section in Excel when connecting to models on this server. The tabular model we are using has compatibility level 1500, and when we deploy this […] |
SQL Server 2022 - Administration |
Devil's Advocate - We're planning to start upgrading all of our 200+ SQL Server 2016 instances to SQL Server 2022 over the coming year or two. We have a Volume Licence Agreement and all of our instances run either Enterprise or Developer edition. We have one Azure instance for a chatbot. The rest is on-premises. I'm combing through […] |
SQL Server 2022 - Development |
Why do my queries lose connection? - I've used SSMS for many years (currently v18.12.1) and only in the last few months have I seen this problem. I tend to open SSMS at the start of the working week and close it down at the end (5 days later). During that time I might open a dozen or more query windows and […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |