|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Combining Lists | |
I have two lists in Python:
>>> a = ["SQL Prompt", "SQL Compare", "SQL Data Compare"] >>> b = ["SQL Source Control", "SQL Change Automation", "DLM Dashboard"]I now want to combine these into 1 list, under the variable a, which is a single dimension. Which of these will work? | |
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) |
Moving a Table I have a developer that has built this table in his own schema on a SQL Server 2017 database: CREATE TABLE SallyDev.CustomerLoad ( LoadKey INT , CustomerKey INT , LoadTimestamp DATETIME2 , CustomerName VARCHAR(200) , CustomerCompany VARCHAR(200) , Status TINYINT); They now want me to move this to the ETL schema for further testing with our application. What code will move this table? Answer: ALTER SCHEMA ETL TRANSFER SallyDev.CustomerLoad Explanation: The ALTER SCHEMA with the TRANSFER command is used. The target schema is altered, with the transfer specifying the old schema and object. Ref: ALTER SCHEMA - https://docs.microsoft.com/pt-br/sql/t-sql/statements/alter-schema-transact-sql?view=sql-server-2017 |
Featured Script |
A simple powershell script to look up server hardware and OS information SQLPals from SQLServerCentral This is a simple powershell script to query and display hardware and OS information from a remote computer. It uses CIM (Common Information Model) that is available since Powershell version 3 so as long as you have version 3 and up, you should be able to run this script against any server that you have access to.
|
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 |
Can't add user to db_owner role - I have a simple SQL Server 2017 database in which I am unable to add one of the database users to the db_owner role. I have confirmed the user is actually setup in the database. When I try to add it to the db_owner role from my own machine, using SSMS or t-sql, I get […] |
SQL Server 2017 - Development |
In-Memory OLTP - N00b Question - I am new to the In-Memory OLTP world (yes, I am a little behind the times, mock me if you must :)) My question is the following: If I have a time tracking which is written most often but has occasional updates applied. Data is not deleted. Would these tables be good candidates for In-Memory […] |
SQL Server 2016 - Administration |
Getting counts before deleting data - Hi, I'm working on data archiving to Archive database from source database. I have to insert data from source database table to archive database and then delete from source. But I want to perform a check by getting no.of rows inserted is equal to no.of rows that are selected to delete. Table1 is parent table […] |
Access and rights - Vendor app is requesting for db_owner role to do some development, when I asked for the reason for db_owner then they requested the following access for development. Rights to execute following actions. Table creation, Stored procedure, trigger creation, Views creation and rights to drop, delete and truncate tables. Creating reference And may be some activities […] |
How to identify if data is skewed in a table - Hi, I'm seeing key lookup which is taking 95% of time for a query. I have verified and made sure that there is no index fragmentation and stats are up to date. Still the query is taking almost 8 seconds to complete. I want to check if the tables are skewed with data ? How […] |
Login error with AD authentication remotely with SSMS - Hello all, I am getting this error on one of our servers and only when logging in remotely with a Windows AD account . Local SQL auth works fine. All ports are open but something is blocking it somewhere on the server please see capture. "The target principal name is incorrect. Cannot generate SSPI." […] |
misaligned log IOs - While restoring a log on a secondary replica to prepare a database for joining an availability group I suddenly received a flurry of 'There have been n misaligned log IOs which required falling back to synchronous IO' messages. In 20 years working with SQL Server this is a completely new message to me. A Google […] |
Administration - SQL Server 2014 |
Migration Project - Hi This is the first time I've had to migrate a mission critical 30 vCPU SQL VM from 6 year old VMWare hosts ( Dell R920s I think ) to new Nutanix kit ( the Nutanix spec as yet unknown - but I will post back as I get it ). The SQL app is […] |
SQL 2012 - General |
Build Failed for SSIS Solution in VS2017 - We have our SSIS solution up and running in VS2012, and we want to migrate to VS2017. But when we open the solution and do a build on VS2017 (Version - 15.9.14), without changing the target server or any settings, the build failed with the below error message. Current version running and built successfully in […] |
Performance Improvement Tips - Hi, When you are handed over an environment and have to do performance improvement. What would you do? I know you may be thinking first why do you need or thinking about improvement. I mean if is just to check if we can make it little more faster. Couple of things I am doing CPU […] |
SQL Server 2012 - T-SQL |
Dual Duplicates redress. - I have created a stored procedure that pulls personal information from several tables. The output is formatted into XML. I need to manipulate two of the elements to be. I have written a sub-query to return the duplicates within two data fields.I read the base query into INSERT INTO #temp_dups SELECT [RowNumber], [Party], [EID], [BID], […] |
Reporting Services |
Help issue with iif and basic mathematical functions - Now this seems simple but its driving me up the wall for something that seems so simple. I am attempting to preform an mathematical action on using the value from a text box in a table within an iif statement, for example if the value in textbox1 is numeric then display the value of textbox1 […] |
SSRS 2017 Fresh Install - First I know this is the wrong place but SSRS 2017 does not appear as yet, so........ Fresh install on SSRS, build 14.0.600.1274, all went well until trying to trying to connect and then get the error (from the logs\) "Could not find stored procedure 'GetAllFavoriteItems'" and beyond that stuck, any ideas? |
Analysis Services |
Model with unrelated tables - Today I came across a modeling that I did not understand. I opened a data warehouse project with the following tables: Dimensions: - Dim_Store - Dim_Date - Dim_Customer - Dim_Location Fact: - FactSales The fact FactSales is relating to the above dimensions, so far ok. But when I open the project in SSAS there are four […] |
Integration Services |
VisualStudio/SSIS - Exporting from MySQL to MSSQL using ADO.Net connector -Fail - Hi, I'm in the process of creating a package that will export X data from a table in MySQL and import into an almost identical table in MSSQL. I have successfully configured the connection to MySQL using a '.Net providers\ MySQL Data Provider' and can connect to the DB fine. I have also successfully configured […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |