|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Another PowerShell Alias | |
If I want to use an alias for the Copy-Item cmdlet in PowerShell, what would I type? | |
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) |
Finding the SQL Saturday numbers in R I have the following dataframe, with some of the SQL Saturday event numbers for a few cities: sqlsat <- data.frame(orlando=c(1,4,8,21,49), tampa=c(2,10,32,62,86), jacksonville=c(3,15,38,74,130)) If I want to get a list of the event numbers for Tampa, how do I slice this data frame and return a vector? Answer: sqlsat$tampa Explanation: There are a few ways to do this. sqlsat$tampa will return that column of numbers as a vector, as shown here: > sqlsat[,2] [1] 2 10 32 62 86 > sqlsat[[2]] [1] 2 10 32 62 86 > sqlsat$tampa [1] 2 10 32 62 86 I can also address this, as a 1 based array, and return that vector. If I want a column in a dataframe, I can use this: > sqlsat[2] tampa 1 2 2 10 3 32 4 62 5 86 Ref: Dataframe column vector - http://www.r-tutor.com/r-introduction/data-frame/data-frame-column-vector |
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 |
What are the risks of using the "No authentication required" in MSDTC - In our environment we have two servers on two separate domains (one is in DMZ, other in internal network) and we need them to be able to use distributed transactions. The transactions would be initiated from the server on the internal network via linked server. The server on the DMZ would only be able to […] |
Reseed an always on database - We recently deployed a AOG for our critical databases. 3 databases were added to the availability group, and two of those were seeded properly to to the secondary replica. The third however failed. The primary replica shows all three databases as synchronized, and availability databases is all green. On the secondary replica server, only two […] |
SQL Server 2017 jobs not completing - Hi, hoping someone may have an easy answer for this. We have a SQL Server 2017 database on an AWS windows server. The database was just migrated to a new server with SQL Server 2017 from a prior AWS with SQL Server 2012. Everything else seems to be fine, but for some reason jobs will […] |
SQL Server 2016 - Administration |
The "magical" switch statement. - Hey guys Thanks in advance for your time and consideration for my question. I just learned about the ALTER TABLE src SWITCH TO dst command. SQL Server 2016 (although I believe it has been around for a while) To my thinking, this is a magical way where I could put new indexes on very large […] |
SQL Server 2016 - Development and T-SQL |
Table Creation Default Style Parameter question prevents partition switches - I'm working with partitioned tables and want to perform a partition switch but am having the issues creating a new partitioned table with the identical computed column that is used for the partition hash as identified in the article at https://social.msdn.microsoft.com/Forums/sqlserver/en-US/515dcc3b-c7d8-47de-a373-733f2a560053/sql-server-2008-alter-table-switch-statement-fails-where-partition-key-defined-as-a-persisted?forum=transactsql -- this article is regarding SQL 2008. I'm running 2016 SP2 CU15. The resolution […] |
SQL Server 2019 - Administration |
xp_logininfo Results Confusion - I am confused by some results I am getting. If I run this EXEC xp_logininfo [MyDomain\LisaM] , 'all' I get 4 results account name type privilege mapped login name permission path ------------ ---- --------- ---------------- ----------------- MyDomain\LisaM user user MyDomain\LisaM MyDomain\DataUser MyDomain\LisaM user user MyDomain\LisaM MyDomain\MechanicLogUsers MyDomain\LisaM user user MyDomain\LisaM MyDomain\QA MyDomain\LisaM user user MyDomain\LisaM […] |
Features in 2nd 2019 Instance breaking the first instance on my VM - I'm working on developing and testing a number of PowerShell scripts, and need at least two SQL Instances with a wide range of features installed on a single VM. The first instance is basic, but for the second instance I installed almost everything so I could test the PS Script. By "almost everything" I mean […] |
CVE-2021-1636 for SQL 2019 CU10 - while during security audits to my sql 2019 servers , the vulnerability CVE-2021-1636 keeps coming out eventhough I have installed latest build CU10 in my servers already. My question is can i install the security update https://www.microsoft.com/en-us/download/details.aspx?id=102617 to my SQL 2019 CU10 servers? I see the latest build where i can install this security update […] |
SQL Server 2019 - Development |
table-valued functions, temp tables etc - when to use each one? - Sorry for the dumb question, but given all the "things" that return tables... temp tables, table-valued functions, views, etc... Is there a guideline anywhere that explains when to use each one? |
VARBINARY - create table test ( sort_path varbinary(4096), ); insert into test (sort_path) values (0x00000FBA000010D8),(0x00000FBA000010D8000006FB), (0x00000FBA000010D8000006FB00000AA9), (0x00000FBA000010F8) Here is some test data using a varbinary. I want to filter out all rows that start with 0x00000FBA000010D8 (which would be the first 3 rows) I've tried: select * from test where left(bp.sort_path, DATALENGTH(@CurrentSortPath)) = @CurrentSortPath Any ideas? |
SQL Azure - Administration |
Memory-optimized tempdb - I'm getting an error trying to enable in-memory setting for tempdb in Azure Managed Instance. Exec sp_configure 'tempdb metadata memory-optimized', 1; reconfigure Error: "Tempdb metadata memory optimized option is not supported in SQL Managed Instance". I couldnt find any msdn link saying that this setting is not supported in Azure SQL Database/MI. Is there a […] |
Reporting Services |
Web Portal Permissions - I have an instance of SQL Server 2019 Express and SSRS 2017 installed on a Windows 10 PC. Windows user .\Paolo is part of the local administrators group. I am trying to configure the security on the SSRS Web Portal to make sure that when .\Paolo opens the Web Portal in IE (http://localhost/reports) he is […] |
SSRS 2016 |
adding world map to map gallery - I need to add a world map to my map gallery in VS - I've found articles that are linking to CodePlex, but they are no longer there/available...can anyone get me access to a World Map in .rdl format? |
Integration Services |
Connecting SSIS to APIs - Does anyone know the basics of connecting SSIS with 3rd party vendors that use APIs or REST APIs? Do I use an HTTP Connection Manager? |
Machine Learning |
Hadoop Big data question processing media files. - I came from a relational database environment. I have a high level of Big data understanding but not in depth. I want to understand Hadoop big data format. My questions are below. 1) How did Hadoop process media files like jpeg, jpg or .mov file formed into data analytics. 2) How is the data analytics […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |