February 4, 2022 at 3:44 pm
hello ,
i want creat indexs in my base on prod , can i do it when users are connected ans the base is used please ? thank you
February 4, 2022 at 3:52 pm
What is a base? It's not quite clear what you mean?
Note: I moved this to a new topic. Please don't add an unrelated question to existing threads. Start a new one if you have a different question.
February 4, 2022 at 5:21 pm
If I understand your question right, you are asking if you can add an index to a table on production while users are using the table. If so, yes. It MAY cause a performance impact, but SQL does let you do that. The index won't be able to be used until it finishes being created obviously, but it will allow the creation.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
February 4, 2022 at 6:13 pm
hello ,
i want creat indexs in my base on prod , can i do it when users are connected ans the base is used please ? thank you
"It Depends". You haven't identified which edition or version of SQL Server that you're using nor the type of indexes that you want to create. We need that information in order to be able to answer for your scenario.
It would also be nice to know things like what Recovery Model the databases are in, do you have replication/AG or anything else that may be impacted running, etc, etc .
Another piece of information we need is is it ok to block only writers to the table while leaving read access available?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply