|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Removing a Column | |
I added a new column to a table with this code:
ALTER TABLE dbo.Summit2022 ADD QuoteByURL VARCHAR(200)While I think this is a good idea, it needs to be tested by others and reviewed. Because this might be an issue, I also want an undo script that can be run to remove this change if it's a problem. What should I put in the undo script? | |
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) |
Another Conversion Question What is the result of this code? select 4444.0 * N'1111.0' Answer: 4937284.00 Explanation: This works and returns the actual sum. The datatype conversion requires that the character fit into the numeric. The numeric in this case is a numeric(5,1), which holds the 1111.0 value, so this works. Ref: Cast and Convert - https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver16 |
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 |
Large table, clustered columnstore index and NO perf. improvements. - Hello colleagues, we have SQL Server 2017 standard (14.0.3238.1) with 136GB vRAM and 20 vCPU on Windows Server 2019 standard. We have a table, [ID_vard] [int] IDENTITY(1,1) NOT NULL, [id_p] [int] NOT NULL, [id] [int] NOT NULL, [uid] [int] NOT NULL, [gor] [varchar](255) NOT NULL, [apt] [varchar](255) NOT NULL, [fed_ok] [varchar](255) NOT NULL, [sum] [real] […] |
Availability group with Automatic Tuning/Query Store - I am about to test Automatic Tuning on a availability group. I have not tested this yet but I am certain I will need to enable this on each replica database. Since it is expected each database will get a different set of read calls, then query store records should be different. Does anyone have […] |
Waits on temp db - Hello, I would like some input and ideas on my issue. I have two virtual servers. Prod and Test. A couple of weeks ago, out of the blue without any deployment of code, my production server started to get long wait time while processing procedure on large tables, something that will take 20 minutes the […] |
Administration - SQL Server 2014 |
Strange failed login isssue - Hello, From past few days, users are receiving failed login issue from the application. Although, user has updated the password, but after two days, he is till receiving the same error. This is not limited to only one user. Multiples users are facing the same problem. Here is the error. Microsoft (ODBC driver 11 for […] |
SQL 2012 - General |
MS SQL Server 2012 question regarding SSIS - OK so I have a customer with a hosted website with eCommerce options. Essentially if you a good CC and the shipping address matches the address on the card, they will take your order. This order information is stored in a MySQL database that they log into via a website, where they proceed to physically […] |
SQL Server 2019 - Administration |
new login unable to sign-on to SSMS - I created a new SQL login. Then i created a new user on database A and add this user to db_datareader role. When i tried to signin via SSMS with this new login, i get the following: Cannot connect to XXSERVERNAMEXX. =================================== The SELECT permission was denied on the object 'dm_os_host_info', database 'mssqlsystemresource', schema 'sys'. […] |
SQL ATP for Queries in Activity Monitor constantly suspended - Greetings. Our Organization has a VM in Azure running SQL 2019 (Not Azure SQL). We have been trying to pin down performance issues and one item I'd like to clarify is an entry in the Activity Monitor regarding SQL ATP for Queries which is suspended and has a wait state of XE_Live_Target_TVF with 0 memory […] |
List all permissions assigned to user defined SERVER roles - Kindly help me with a T-SQL for finding all permissions assigned to user defined SERVER roles. Thanks |
Query Store Complete plan - Hi , is it possible to retrieve the entire plan for an object from querystore rather than the plan "snippet" that it views as troublesome ? many thanks |
SQL Server 2019 - Development |
OT: Azure/Transact SQL Tutorials, not w3schools - I have four or five years of experience writing various kinds SQL. My colleague has very rudimentary SQL skills, but he obviously wants to acquire more. He would do better with a self-paced interactive tutorial, exercises, or an introductory project than a class or book. He would mostly be reporting, so emphasis on database design […] |
IMPLICIT TRANSACTION and Recursive Stored Procedure - I think I'm losing my mind! I have a stored procedure which needs to update a number of tables and ensure that the INSERT/UPDATE trigger fires for each record being inserted/amended. I want super tight control over this so I am setting IMPLICIT TRANSACTIONS SET IMPLICIT_TRANSACTIONS ON Before the first inster/update and SET IMPLICIT_TRANSACTIONS OFF […] |
IMPLICIT TRANSACTION and Recursive Stored Procedure - I think I'm losing my mind! I have a stored procedure which needs to update a number of tables and ensure that the INSERT/UPDATE trigger fires for each record being inserted/amended. I want super tight control over this so I am setting IMPLICIT TRANSACTIONS SET IMPLICIT_TRANSACTIONS ON Before the first inster/update and SET IMPLICIT_TRANSACTIONS OFF […] |
Convert Excel formulas to SQL language automatically - Is it possible convert Excel formula to SQL? I mean like this site for convert VB.NET to C#. I have to write lots of complicated excel function in format of SQL function like this: =VLOOKUP(D4,Table25,MATCH(ِDATA!AB$3,Table25[#Headers],0))*IF(OR(E4="W",E4="KW"),(2*((G4*VLOOKUP(D4,Table25,3,0))*IF(D4="COF",SUM(H4,I4),MAX(H4,I4))*VLOOKUP(D4,Table25,2,0))+2*(F4*IF(D4="COF",SUM(H4,I4),MAX(H4,I4))*VLOOKUP(D4,Table25,2,0))),0) and it is very hard and time consuming. Also this question asked in this place. |
SQL Azure - Administration |
TDE issue in SQL MI - Hi, I'm trying to disable TDE in SQL Managed Instance(Service Managed). After executing Alter statement for the DB (set encryption off), when I check sys.dm_database_encryption_keys for status, getting below output. DB Name encryption_state_desc percent_complete encryption_scan_state_desc Encryption_State […] |
General Cloud Computing Questions |
Google Cloud SQL pricing question - I'm trying to migrate a Django site to Google Cloud. Django uses a SQL database, so i'm trying to setup a simple SQL database. I don't think my site will be accesed at night, so I don't think I will be using the database at that time. I see that the first generation of GCP […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |