|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Query Some Files | |
I have a SQL Server 2019 database that has two filegroups, PRIMARY and ARCHIVE. I take one file offline with this code:
ALTER DATABASE FGTest MODIFY FILE (NAME = N'FGArchive1', OFFLINE) GOI had created two tables with this code: CREATE TABLE [dbo].[MyTable]( [myid] [int] NULL, [mychar] [varchar](200) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[MyTable2]( [myid] [int] NULL, [mychar] [varchar](200) NULL ) ON [Archive] GOI then run this code: SELECT top 10 * FROM dbo.MyTable2 AS mtWhat happens? | |
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) |
BDC Orchestration What technology is used to orchestrate the various components of a BDC (Big Data Cluster)? Answer: Kubernetes Explanation: A SQL Server big data cluster is a cluster of Linux containers orchestrated by Kubernetes. Ref: What are Big Data Clusters? - https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview?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 |
How to get drive space using Queries on SQL Server hosted on Linux - Hi, I need to get the free drive space details on SQL Server using queries, this server is hosted on a Linux Server. Require a query to give drive free space details. Thanks |
SQL Server 2016 - Administration |
Query optimization - Hello..i am running into an issue where below query is requesting large amount of memory grant. I think the problem is at the left join inner query on table dn_t it has to do a full scan because there is no index. Wondering if there is any better way to write this? SELECT [P2].[c1] […] |
Cannot insert duplicate key in object - In table tUSERI primary key was added in the column [Email]. I deleted a user abc@gmail.com from tUSER. When I try to add the same user abc@gmail.com got the following error. What causes the error? Please help clean and update the table tUSER. Violation of PRIMARY KEY constraint 'PK_tuser_2'. Cannot insert duplicate key in object […] |
Much lines from soms in audit - I had the requirement to put on auditing. I made the server specifications, put in a file, and read the file info a database only the security officer can read. But now he sees too much. Every action in ssms is put in the database. The activity monitor is one of the worst. Can I […] |
Availability groups - licencing considerations - Hi all I'm trying to my facts in a row before I go to managers with this one. We have one copy of our production data (from the software vendor) on server A (I know, it's the only copy and I've been shouting about that forever). What we want to do is set […] |
Folders in C:\Users - are they really needed? - I have some time on my hands (sadly) and am using some of it to clean up my computer. The computer in question runs Windows 7 (no, 'upgrading' to Windows 10 is not an option) and I have used it for many years. Over time, I have installed at least three versions of MS SQL, […] |
SQL Server 2016 - Development and T-SQL |
Using Pivot in SQL - I am trying to create a query from this table: above is my table, and below is what I need my query to show. I tried many things: first, I tried using UNIONs, but it did not allow me to sum/average. Then I tried to experiment with the PIVOT function, but again, the issue is […] |
Flattening XML - I'm sure this has been asked a 1000 times before, but every example I've seen works great, but doesn't seem to translate well into my XML format - I have no control over the XML I have the following XML: DECLARE @xml XML = ' […] |
Administration - SQL Server 2014 |
rename sa - i want to rename the sa login with different name , is the jobs will impacted if we rename the sa login ? |
Development - SQL Server 2014 |
Previous row where condition exists - Hello, I have a table of data in which I've identified some duplicate records. I need to pull all of the duplicate records for someone to review. My problem is that I'm only able to pull one of the duplicates and not both. The sample below just includes those values which are actually matching (duplicates) […] |
SQL 2012 - General |
Why aren't the backups working? - You've heard of "the accidental DBA", right? Well, I'm the accidental TFS admin. I have a bit more knowledge of TFS, than the average developer, ergo when the former TFS admin left, I got stuck with it. But my question is more about SQL Server, than TFS. Our TFS backups haven't worked in over a […] |
SQL Server 2008 Performance Tuning |
how to find why the stored procedure took time to execute - Hi, This is one of the incident at our clients side and does not happen regularly. A stored procedure(stp) which usually executes in few seconds took 10 mins to execute. i want to analyse why that stp took time to execute or which other factors were the cause of slow execution of the stp. we […] |
SQL Azure - Development |
Create a User in Azure SQL Database - I need to create a user in Azure SQL Database and map the user to a specific database. does anyone have the syntax to make this happen? The GUI is restricted and you cant do it as you would in SSMS on-prem as you cant view the properties. Also I am after a decent script […] |
Azure Data Factory |
Does anyone have experience of using securetrading.net as a data src within ADF? - Hi, Does anyone have experience of using securetrading.net as a data source within Azure Data Factory? If you do, any help would be greatly appreciated. Kind Regards, Kieran. |
Analysis Services |
Random excessive CPU consumption - Hi all. I'm in a bit of a quandary with one of our Analysis Services servers, and I'm hoping you may have some suggestions on how to solve our issue. Basically we have 7 Cube servers, all with identical system specs. Startup log: (8/6/2020 11:23:20 AM) Message: Service stopped. (Source: \\?\R:\Analysis\Log\msmdsrv.log, Type: 1, Category: 289, […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |