sql server
84 TopicsSql Server complexity
For someone who has worked in PostgreSQL env for a very long time, learning the ropes of Sql server looks like some task. I practice with SSMS everyday, creating DB objects - schemas, tables, views, indexes, triggers, sequences, users, roles. And have noticed that Sql server code is more verbose, complex and not as straightforward as PostgreSQL. The use of 'stored procedures' for modifying column/table name and 'severity level' and 'state number' parameters for triggers was really topsy-turvy. I guess, it will take some time before I get used to the 'proprietary' way of doing things.26Views1like0CommentsSql Query
Hi All, I have a requirement. want output data like below screen print CREATE TABLE [dbo].[Source_Table]( [Product] [varchar](10) NULL, [Trans_type] [varchar](10) NULL, [SalesCode] [varchar](10) NULL, [Profitamount] [int] NULL ) GO INSERT [dbo].[Source_Table] ([Product], [Trans_type], [SalesCode], [Profitamount]) VALUES (N'Product1', N'Type1', N'A', 7) GO INSERT [dbo].[Source_Table] ([Product], [Trans_type], [SalesCode], [Profitamount]) VALUES (N'Product2', N'Type1', N'B', 3) GO INSERT [dbo].[Source_Table] ([Product], [Trans_type], [SalesCode], [Profitamount]) VALUES (N'Product1', N'Type2', N'C', 4) GO INSERT [dbo].[Source_Table] ([Product], [Trans_type], [SalesCode], [Profitamount]) VALUES (N'Product2', N'Type2', N'A', 5) GO INSERT [dbo].[Source_Table] ([Product], [Trans_type], [SalesCode], [Profitamount]) VALUES (N'Product1', N'Type1', N'D', 9) GO Thanks in Advance...44Views0likes2CommentsSQL Server Config Manager Error "MMC could not create the snap-in"
Hi, I have seen this error elsewhere online. I have gone to mmc to enable the snap in and I still have had no fix. My computer is running Windows Server 2022, SQL Server Express 2022, and SSMS. I have reinstalled, repaired, and all of the other tricks. Help!Solved3.2KViews0likes4CommentsSERVERPROPERTY('IsClustered') does not return the correct value in a cluster configuration
Hi all! I'm testing some t-sql SQL properties for a data collection project and I got a strange case with the query below: SELECT SERVERPROPERTY(''MachineName') AS [MachineName], SERVERPROPERTY('ServerName') AS [ServerName], SERVERPROPERTY('InstanceName') AS [Instance], SERVERPROPERTY('IsClustered') AS [IsClustered], SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [ComputerNamePhysicalNetBIOS], SERVERPROPERTY('Edition') AS [Edition] I have two test instances of SQL Server 2019. They both belong to a cluster without shared storage, as the availability groups allow it: SQLAGCLU I don't understand why the query is returning "incorrect" properties. I expected them to have the value 1 for the "IsClustered" column. From the query that I use, I have no idea witch SQL instance are in a cluster... Some one can give a feedback about it? Thanks ALEN67Views0likes2CommentsCannot create an external table in SQL Server
Hi, I have an on-premise SQL Server 16.01.1135.2. I am trying to create an external file format: CREATE EXTERNAL FILE FORMAT skipHeader_CSV WITH (FORMAT_TYPE = DELIMITEDTEXT, FORMAT_OPTIONS( FIELD_TERMINATOR = ',', STRING_DELIMITER = '"', FIRST_ROW = 2, USE_TYPE_DEFAULT = True) ); but it gives me the following error: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'EXTERNAL'. Completion time: 2025-03-24T23:13:46.7487583+01:00 Table creation clause is copied from the documentation. What am I doing wrong?65Views0likes2CommentsWhat is the minimum version of Microsoft SQL Server that supports R2DBC?
I’m working on a Spring Boot WebFlux project and I’m planning to use R2DBC to interact with Microsoft SQL Server. However, I’m having difficulty finding clear information on which version of SQL Server supports R2DBC. Most of the resources I find seem to focus on Azure SQL Database, but I’m specifically interested in on-premises Microsoft SQL Server. Can anyone confirm what the minimum version of SQL Server that supports R2DBC is? Thanks in advance for your help69Views0likes2Comments[SQL Server2019 Standard]Order history now shows, but missing download link and product key
Hello, I'm experiencing an issue with a recent purchase from the Microsoft Store. I haven't received a confirmation email, and the order doesn't appear in my order history on the Microsoft Store website. However, the item is showing in my Microsoft Store library. When I click the download button, nothing happens, and the download doesn't start. Could anyone please help me understand what might be happening or suggest any troubleshooting steps? Thank you for your assistance.30Views0likes0CommentsSQL Server account locked out and password did not match?
Hi We have this situation that a SQL Server account has been having two different login failures recently. The errors appear in the SQL Server log without much details. Wonder if any one had encountered the same situation and if it had been resolved? The two different error messages are: 1. Login failed for user 'sql_account_name'.Reason: The account is currently locked out. The system administrator can unlock it. [CLIENT: ip_of_another_computer] 2. Login failed for user 'sql_account_name'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>] Note: I replaced the actual account name and ip with sql_account_name and ip_of_another_computer respectively. I found a query that displays the user account SQL agent jobs run under, but I did not see this SQL account. Also, I checked linked servers, but did not see this account. Furthermore, I checked Windows services of the two computers in the error messages, but I did not see that SQL account. I did look Windows task scheduler, but do not think we can use SQL account as run under for a task. Any idea or insight? Thanks166Views0likes3CommentsSQL Server Account locked out and password did not match?
Hi I posted this discussion earlier today, but could not find it! Perhaps I did not add a tag? In any case, I am reposting it. We have this situation that a SQL Server account has been having two different login failures recently. The errors appear in the SQL Server log without much details. Wonder if any one had encountered the same situation and if it had been resolved? The two different error messages are: 1. Login failed for user 'sql_account_name'.Reason: The account is currently locked out. The system administrator can unlock it. [CLIENT: ip_of_another_computer] 2. Login failed for user 'sql_account_name'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>] Note: I replaced the actual account name and ip with sql_account_name and ip_of_another_computer respectively. I found a query that displays the user account SQL agent jobs run under, but I did not see this SQL account. Also, I checked linked servers, but did not see this account. Furthermore, I checked Windows services of the two computers in the error messages, but I did not see that SQL account. I did look Windows task scheduler, but do not think we can use SQL account as run under for a task. Any idea or insight? Thanks187Views0likes3Comments