Laden...
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Password Policy | |
How is password policy, as enforced when this is set for a login in SQL Server, changed? | |
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) |
Altering Database Roles In SQL Server 2019, how should I add or remove members from a Database-Level role? Answer: ALTER ROLE Explanation: The ALTER ROLE should be used to change members in roles. sp_addrolemember and sp_droprolemember work, but these are deprecated for SQL Server 2019. Ref: Database-Level Roles - https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles?view=sql-server-ver15 ALTER ROLE - https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-role-transact-sql?view=sql-server-ver15 |
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 - Development |
Query optimisation/execution plan - All, I'm working on improving my knowledge of query optimisation and reading execution plans. I'm using this table: /****** Object: Table [dbo].[CustTravelReqLocPlan] Script Date: 06/04/2021 12:40:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[CustTravelReqLocPlan]( [uniqueref] [uniqueidentifier] NOT NULL, [CustTravelReqRef] [uniqueidentifier] NULL, [LocationTypeRef] [uniqueidentifier] NULL, [AllocatedFlightRef] [uniqueidentifier] NULL, [AllocatedAreaRef] [uniqueidentifier] NULL, [RequiredArrivalTime] […] |
SQL Query Help - Without using Pivot - Need help with query. I want the output to be display in single row. We have 2 rows for each ID for Address Type and I want the Home and Mailing address city display in single row. create table #Test (ID int, HomeCity varchar(10), AddrType varchar(10)) insert into #Test values (10,'Phoenix','Home') insert into #Test values […] |
SQL Server 2016 - Administration |
Read_COMMITTED_SNAPSHOT && size tempdb - Hello everyone Is there a risk of tempdb saturation if I activate these fuction on my database does the shrinkfile always remain functional with this function USE [master] GO ALTER DATABASE [test] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT GO ALTER DATABASE [test] SET ALLOW_SNAPSHOT_ISOLATION ON GO |
Big difference between Estimated and Actual Actual rows in execution Plan. - Hi, This is an Index Seek which is 60% cost of the query. Now, I see there is a big difference between actual and estimated rows. ( 0 and 15600) , the statistics on the table and index are updated yesterday. What else I should look at to optimize the seek? Any thoughts, it is […] |
View using Cross Join and LIKE operator please suggest alternate syntax. - Hi, The below view is using cross join and as far as I know, Cross join is not good for performance. Can you please help me rewrite these views? Any suggestions are much appreciated on the below issues 1 & 2. FROM dbo.tbEmp er CROSS JOIN dbo.tbEmpType ect LEFT OUTER JOIN t ON t.Ece_ID = […] |
Non clustered Index on #temp table - Hi, In order to avoid a SORT operation in my execution plan, I want to create a Non clustered Index on a Temp table. However I am getting the below error which makes sense since it is a temp table that is created on the fly, however, is there any other way? please advise. ERROR […] |
how to properly uninstall SQL server 2008 ? - Hello , I will proceed to install SQL server 2016 after deleting SQL server 2008 properly I saw several programs that depend on SQL server all these propragrams must be uninstalled (Microsoft visual c++ 2008 redistrubutable , Microsoft SQL server CLR Type,SQL server Native client ...) |
SQL Server 2016 - Development and T-SQL |
Rounding to 0 - How do I preserve the value (and not result to 0). In the below calculation, how do I preserve the value? I want atleast 0.01 to come out instead of 0. declare @q int declare @weight decimal(33,13) set @q = 6 set @weight = 0.0000000060240 select Sum(@q *COALESCE(NULLIF(COALESCE(@Weight, 0), 0), 0.01)) Result = 0.0000000 |
SQL 2012 - General |
Odd performance issues - I am trying to figure what is going on? I have a SQL 2012 enterprise cluster running on 64 processors and 786 gig of ram. Our company was hit by ransomware and we had to build a whole new network. The server is twice as powerful then the old one running on a all flash […] |
Data.exist null value ? - Hi Can someone let me know what I'm doing wrong here? I'm trying to write a 1 if there is no value in "Name" within the XML CASE WHEN Data.exist('Data/Other_x0020_Members [Name is null]') = 1 THEN 1 ELSE NULL END AS TESTCASE Thanks Thanks |
SQL Server 2019 - Development |
Using REVERSE - I am trying to use the REVERSE function to "split" the field TreeMap into columns. The function works great if the string only has 3 commas in in. As you will see what I mean by using the attached SQL script. How can I get the REVERSE function to work with the rows that are […] |
Convert teradata REGEXP_INSTR into SQL SERVER - Hi, I need some guidelines to convert Teradata REGEXP_INSTR logic into SQL server code. Please find the attached file in which I had provided a sample script. Appreciate your reply in advance. Thanks |
If Statement in Computed Column - Greetings, Thank You for taking the time to read and hopefully answer my question. You will soon see how new I am to SQL Server. I am rebuilding in SQL Server a DB that I built in MS Access. Several of the columns in one of the MS Access tables are calculated using IIF statements. […] |
Azure Data Factory |
Extracting Data from Source->Calling API to Transform the data->Load to Destinat - Hi there, I have a requirement where I am getting data with sensitive information. My goal is to tokenize the sensitive information using the our centralized application via api's and then load the data to destination. I do not want to save the data anywhere untokenize. So practically, as data is coming, i want to […] |
Powershell |
Insert variable values into SQL Server table - I am having the worst time finding an example of the exact thing I'm looking for in a Google search. I'm hoping someone here can help. I need to parse a SFTP directory and push the contents into a SQL Server table so I can find the exact file I'm looking for. Because the provider […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024