|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Starting on Monday | |
How do I ensure that the T-SQL code I run recognizes Monday as the first day of the week? | |
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) |
Creating AAD Users in Azure SQL Database I want to create a user in an Azure SQL Database that will only authenticate in the database and not from the logical master database. This user is an AAD user in my Azure domain. What code is appropriate to create this user? Answer: CREATE USER [bob@contoso.com] FROM EXTERNAP PROVIDER Explanation: The CREATE USER with the EXTERNAL PROVIDER option will allow you to this. Ref: CREATE USER - https://docs.microsoft.com/en-us/sql/t-sql/statements/create-user-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 - Administration |
AG backup preference behavior - Hi All, We have 3-node AG setup in our Production environment. Primary site (2 nodes), (DR site 1node). SQL Version is :Microsoft SQL Server 2017 (RTM-CU23) Enterprise Edition:(64-bit) We have 3 user databases as part of AG. We had some performance issues and decided to offload the backup load to secondary node of AG. For […] |
Named instance connectivity - Hi We have a new named instance, I can able to connect using SSMS. However when I ping the instance name, it’s not working. It is enabled for mixed mode & enabled for the remote connections. TCP/IP port is enabled. I added the 1434 udp port in the firewall. Also changed the dynamic port to […] |
SQL Server 2017 - Development |
How to validate user if input formate no yyyy-MM-dd for created date ? - I work on sql server 2017 i need to validate user input of temp table if formate of created date not YYYY-MM-DD then reject by update status field of temp table to be Notvalid and if formate of created date is YYYY-MM-DD then update status by Valid CREATE TABLE #TempPC ( [ID] INT IDENTITY , […] |
Adding leading zeroes after the decimal - Hello, I have the following requirement to add leading zeros after the decimal from numeric string, please advice the same. Input -> OutPut 100 -> 100.0000 1.1 -> 1.0001 1.10 -> 1.0010 1.100 -> 1.0100 200.00 -> 200.0000 |
Administration - SQL Server 2014 |
StartDate & End Date parameters - Hi, I've created a view to populate data from existing tables In my report project I built using SSDT 2014, I created Dataset to read form this view. I also set a Startdate and Endate parameter with default calander values. The expectation is for the dates to filter the dates by above parameters. The Report […] |
Development - SQL Server 2014 |
Pivot - Unpivot - Hi everybody, i have a table in SQl Server 2014 like the following: And i woul like to abtain an output like this: any help is appreciated. Thank you |
Pivot Database Names - Hello, I have been trying and failing for days to create a query, or SSRS report, that makes a column for each database on the server, with each row representing a logon. The values of the database named columns would be the database role that logon has in the database. I have been trying with […] |
SQL 2012 - General |
SQL Server 2012 Standard Media/ISO - Does anyone have a copy of SQL Server 2012 Standard handy? I just need the ISO or DVD contents to install on a new server. I have the key already from the old server, but we don't have the media any longer. I checked online and can't seem to find a good place to download […] |
SQL Server 2019 - Development |
Using RTRIM, LTRIM with a LEFT Function. - Is there a particular order for using the LTRIM, RTRIM with a LEFT function? Example - I only want the Left 35 from a field and want to trim any unnecessary off it. Is this the correct Syntax - LEFT(RTRIM(LTRIM(Guar.First)),35) or should I use the TRIM's then the LEFT? |
Newbie Question:If else Sql Question - In this case i am expecting the else statement to execute. please correct dECLARE @BusinessEntityId INT SET @BusinessEntityId=1003 IF @BusinessEntityId<=(SELECT MAX(BusinessEntityId) AS BusinessEntityId FROM Person.Person) BEGIN SELECT * FROM Person.Person WHERE BusinessEntityID<=@BusinessEntityId END ELSE IF @BusinessEntityId>=1000 AND @BusinessEntityId<2000 SELECT * FROM Person.Person WHERE BusinessEntityID>=@BusinessEntityId AND BusinessEntityID<=@BusinessEntityId |
SQL Azure - Development |
Troubleshooting a pipeline error - I am creating a pipeline in a data factory per this page's instructions, https://docs.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-change-data-capture-feature-portal. I am a beginner with this and am trying to follow the instruction as closely as possible. The change, in my case, is that I am using a VM SQL installation, also in Azure, but not a managed instance. I have […] |
Amazon AWS and other cloud vendors |
Migrating Existing AWS Infrastructure into CM? - Have an old EC2 environment with dozens of Classic ELB's & AutoScale Groups/Launch Configs/CloudWatch Alarms/Policies/SecurityGroups etc, with different specifics etc. AWS is discontinuing Classic range in coming months I believe. So looking to transfer it all to App/Network ELB's. It'll be a combination of things be recreated eg. new ELB's and things being reused eg. […] |
Migrating Existing AWS Infrastructure into CM? - Have an old EC2 environment with dozens of Classic ELB's & AutoScale Groups/Launch Configs/CloudWatch Alarms/Policies/SecurityGroups etc, with different specifics etc. AWS is discontinuing Classic range in coming months I believe. So looking to transfer it all to App/Network ELB's. It'll be a combination of things be recreated eg. new ELB's and things being reused eg. […] |
Reporting Services |
SSRS subscription reporting as "Pending" - I have a data-driven subscription which emails a report to 82 recipients, with the email addresses returned by the data-driven dataset. The SSRS logfile reports 82 successful email entries for this subscription but the subscription page shows the result as "Pending". Any ideas why the result isn't showing as successful or failed? |
General |
Is SQL Express enough? - I am assisting a company in upgrading their server. It is a small business with 9 computers. The mostly have a few shared documents and spreadsheet on the server, and the server hosts and MS SQL database for their accounting software. The accounting software has a maximum of 6 users at a time. The database […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |