|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Can the Developer ALTER the Table? | |
I have created a new database on a development server and added the user, JoeUser, as a user in this database. This user has no rights other than to connect to the database. I then execute this code:
CREATE SCHEMA Dev GO GRANT CONTROL ON SCHEMA::Dev TO JoeUserJoeUser connects and runs this code: CREATE TABLE Dev.MyTable (myid INT)This works. However, can JoeUser now run this code successfully? ALTER TABLE dev.MyTable ADD newid INT GO | |
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) |
Azure Data Studio Server Group Colors I have a number of Server Groups in Azure Data Studio. I can edit any of these groups and there is a list of colors available: I want to add newer, yellow color to this list. How can I do this? Answer: You can edit the serverGroup.colors array in the settings json file. Explanation: You can edit the colors. In the settings JSON file, there is a serverGroups.colors array. Below, I added a yellow color: Now when I edit a server group, I have a yellow option. Ref: Server Groups in Azure Data Studio - https://docs.microsoft.com/en-us/sql/azure-data-studio/server-groups?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 |
AG upgrade - I will be running the application upgrade process which will run for couple of hours and behind the seen it will make couple of table changes such as create the new table with the field changes and then insert data into the new table from old table and rename it back to same as old […] |
SQL Server 2016 - Administration |
Index created in the last few days - Hello, I'm looking for a proper query to find the created indexes in the last few days. I use the below query but it does not appear to be perfect. Can anyone please share the proper query to use? select top 30 * from .sys.indexes i inner join .sys.objects o on i.object_id = o.object_id […] |
maintenance plan issue - one of our maintenance plan is geting failed with the below error , checked in logs but not able to find any thing The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed, and indicate the result using an "out" […] |
SQL Server 2016 - Development and T-SQL |
SQL server help with counting - I am including some sample data to explain the requirement. I need a column that gives the total of Prg1 to Prg6 if the values are different Ex: Need to compare each field data from prg1 to prg6. If all 6 fields have different values (p1, p2, p3, p4, p5, p6), I need the count as […] |
How to replicate data with increasing PK - I have a case where in non prod environment, i will have to replicate existing data multiple times with a increasing PK value. Can anyone please help achieving this without loops or cursors. For example CREATE TABLE Table_A (Id1 Numeric(5,0) not null PRIMARY KEY,Name1 Varchar(20) null,date1 datetime2(7) null) go INSERT INTO Table_A VALUES('1','A1',GETDATE()) INSERT INTO […] |
DateDiff days as column headings - Good Morning Have two tables Customers (Customer_ID CREATE TABLE UHC_customers ( customer_id int NOT null, --Primary key unique values AgeFallGroup varchar(6), InsuranceStartDate Date, Region varchar(20), CustStatus Varchar(10) ); INSERT INTO UHC_customers VALUES (1001, '20-29', '03/25/2022','North America','Active') INSERT INTO UHC_customers VALUES (1002, '40-49', '02/18/2022','Asia','Active'); INSERT INTO UHC_customers VALUES (1003, '20-29', '01/01/2022','Asia','Active'); INSERT INTO UHC_customers VALUES […] |
The step was retried the requested number of times (5) without succeeding. - We have one schedule job which is copying the backup to the offsite server through xcopy. This job successfully run for 4-5 days in a week and failed for 1-2 days due to following error. Executed as user: service_Account. The step was retried the requested number of times (5) without succeeding. The step failed. Sharing […] |
SQL Server 2019 - Administration |
Application connectivity is failing using listener - Hi , Here is the breaf explnation about the issue we are facing. performed db refresh from prod to dev. Taken the db backup from prod and restored in the new server. and transfered all the logins from prod to dev using sp_help_revlogin as well. We have setup Alwayson setup for new two servers. We […] |
sp_ssis_startup - I have a guardium db scan finding: Stored Procedures Execute Automatically at Startup. And the startup proc is sp_ssis_startup. They recommend this to be disabled. What's the impact to my SSIS packages if i disable sp_ssis_startup? will they still work? anything else i need to know about? Thanks |
SQL Server and Azure Blob Storage - I'm fairly new to Azure Blob Storage. Every once and awhile we will be restoring and the azure database backup file will be in use by another process. From what I understand, I need to break the lease on the backup file, so that my process can then acquire a lease. I'm really looking for […] |
SQL Server 2019 - Development |
How to get an SQL Statement that would clone a table with data? - Hello, I have a table and would like to clone it. I have an admin access to SQL queries. No access to Visual Studio. Ideally I would like to name the table in a VB dot net and it would generate a flat file like .sql. This file will containt the create table with the […] |
Get data for last 4 week and issue \"Arithmetic overflow error for type varchar\" - I am trying to get data only for last 4 weeks. My field where I have dates is called [WED], what I normally would do is: I would declare some variables DECLARE @CurrentDateTime DATETIME = GETDATE(); DECLARE @CurrentDate DATE = @CurrentDateTime; DECLARE @LastWeekDt DATE = DATEADD(WW, -1, DATEADD(DD, 7 - DATEPART(dw, @CurrentDate), @CurrentDate)); DECLARE @LWDATE […] |
SQL Server 2008 Administration |
how to Make a copy of Full Recovery DB and Restore it to a Simple Recovery Db - Hi, If this post is not in the correct forum, please let me know which forum it should be in and I will repost. Here is my issue. I need to make a Backup of a Full Recovery Model Db and Restore that Backup to a Copy Db that is being used for Development. The […] |
General Cloud Computing Questions |
Cloud path for beginners - Hi, I am in my junior year of an undergrad degree in electronics and communication. Looking for a way to enter the Cloud industry. As I don't belong to the computer science field, what are the basic pre-requisite for starting a career in the cloud? should I start looking for a job after my degree […] |
Azure Data Factory |
Pass Dynamic content from Trigger into pipeline for use - I am needing help in passing a dynamic value from the trigger into the parameters/variables of the ADF pipeline. What I have so far is: A snapshot_date parameter A snapshot_date variable With a Set variable activity where my variable name is snapshot_date and the value is @pipeline().parameters.snapshot_date When I hit Debug at the top, I […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |