| A community of more than 1,600,000 database professionals and growing |
| | Who Owns the Data? Last year there was a warrant served to Microsoft asking for data from one of their customers. That's likely not an unusual request, as law enforcement often will seek to gather information about suspect criminals as a part of their investigations. What was unusual in this case was a US judge was asking for data stored on systems in Ireland. Microsoft fought this subpoena on the grounds that data in another country is outside the jurisdiction of US judges. This is a fascinating case for the future of data privacy and data residency. The US Supreme Court is going to hear this case, and as a data professional, I am wondering what the outcome will be. Does data exist within the boundaries of a country? Or is data in some ether, where it potentially resides on all systems for an organization in all countries? Certainly we can easily access data from any connected system if we have access, but should we? The implications of data access and privacy are large here, and I'm concerned a wild west, whatever any government wants attitude will prevail. If the US can force companies to access data in other countries, what's next? Could the Irish, Chinese, Indian, or any other government that has an Azure region force that division of Microsoft to access data in the US? Who knows. As an individual, I have concerns. As a data professional, I'm usually bound to do what I'm told. I get paid to manage data, and if my employer asks for data in another division, I'd just access it. Likely that's what is expected of me, and for the average worker, we have no choice if we want to keep our jobs. However, I'm not sure of when or where I should access data my company owns. I'd assume I could access it all, not necessarily considering the legalities. I don't know whether we, as data professionals, will be drawn into understanding where and when we can and should access data, but I suspect that this will be an issue for more of us unless most countries can agree on some framework of how we handle data that our company controls, but is stored in another jurisdiction. Steve Jones from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
|
| ADVERTISEMENT | | How to track every change to your SQL Server database See who’s changing your database, alongside affected objects, date, time, and reason for the change with SQL Source Control. Get a full change history in your source control system. Learn more |
| | Webinar: data protection & privacy in the world of DevOps Microsoft MVP and PASS President Grant Fritchey dispels the myth that database DevOps and compliance can't go hand in hand. After a brief look at how extending DevOps to the database lays solid foundations for data governance and compliance, the focus will then shift to guidance around the upcoming GDPR. Register now |
|
|
|
| | | The SQL Monitor team are hard at work, improving how you manage your alerts. Find out more about the changes they're making, and how you can try an online demo of the new features now. More » |
| Additional Articles from SimpleTalk In the real world of business or scientific reporting and analysis, data can prove to be awkward. It can be plain wrong or it can be altogether missing. Sure, we have the NULL to signify unknown, but that doesn't play well with regular business reporting. There are a number of ways of dealing with missing information, and methods of estimating data from existing data has a long and respectable history. Joe Celko gets to grips with a data topic that is often treated with some trepidation. More » |
| Kenneth Fisher from SQLServerCentral Blogs Views are a highly useful tool for abstracting how you see the data stored in tables. At their simplest, they... More » |
| matthew.mcgiffen 73574 from SQLServerCentral Blogs I’m a big fan of using queries based on the dynamic management view sys.dm_exec_query_stats to capture the most resource hungry... More » |
|
|
| | Today's Question (by Steve Jones): What happens when I execute this code? CREATE TABLE CompressionTest ( mychar CHAR(8000) , morechar CHAR(49) ) GO ALTER TABLE [dbo].[CompressionTest] REBUILD PARTITION = ALL WITH (DATA_COMPRESSION = PAGE ) |
Think you know the answer? Click here, and find out if you are right. We keep track of your score to give you bragging rights against your peers. This question is worth 1 point in this category: Data Compression. We'd love to give you credit for your own question and answer. To submit a QOTD, simply log in to the Contribution Center. |
|
|
| |
ADVERTISEMENT | T-SQL Querying (Developer Reference) Squeeze maximum performance and efficiency from every T-SQL query you write or tune. Four leading experts take an in-depth look at T-SQL’s internal architecture and offer advanced practical techniques for optimizing response time and resource usage. Get your copy from Amazon today. | | |
|
|
|
|
|
| Yesterday's Question of the Day |
| Yesterday's Question (by Steve Jones): What's wrong with this code? DECLARE @Numbers TABLE ( message_id INT , C1 AS CHAR(2000)) ; WITH myTally(n) AS (SELECT n = ROW_NUMBER() OVER (ORDER BY (SELECT null)) FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n) CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) b(n) ) INSERT INTO @Numbers ( message_id , C1 ) SELECT n, REPLICATE( 'a', n) FROM myTally ; Answer: The table variable has a computed column Explanation: In this case, the table variable has a computed column. CHAR() is seen a valid function, and the "AS" makes this a computed column. No good reference for this one. Try the code and you'll see SQL Server reports an error inserting into the computed column. » Discuss this question and answer on the forums |
|
|
| | Harsha Bhagat from SQLServerCentral.com 1. Find the table size of the hidden change tracking table USE [ChangeTrackingTableDatabase] GO SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; GO select sct1.name as CT_schema, sot1.name as CT_table, ps1.row_count as CT_rows, ps1.reserved_page_count*8./1024. as CT_reserved_MB, sct2.name as tracked_schema, sot2.name as tracked_name, ps2.row_count as tracked_rows, ps2.reserved_page_count*8./1024. as tracked_base_table_MB, change_tracking_min_valid_version(sot2.object_id) as min_valid_version FROM sys.internal_tables it JOIN sys.objects sot1 on it.object_id=sot1.object_id JOIN sys.schemas AS sct1 on sot1.schema_id=sct1.schema_id JOIN sys.dm_db_partition_stats ps1 on it.object_id = ps1. object_id and ps1.index_id in (0,1) LEFT JOIN sys.objects sot2 on it.parent_object_id=sot2.object_id LEFT JOIN sys.schemas AS sct2 on sot2.schema_id=sct2.schema_id LEFT JOIN sys.dm_db_partition_stats ps2 on sot2.object_id = ps2. object_id and ps2.index_id in (0,1) WHERE it.internal_type IN (209, 210); GO 2. Disable Change tracking on Tables. use ChangeTrackingTableDatabase go Alter table dbo.TableName Disable Change Tracking; go 2. Create a sql file with the below script. Replace the database name and servername in the script. use <DatabaseName> go if (@@servername <> 'Servername' or db_name() <> 'DB_Name') begin raiserror ('The SERVER or DATABASE IS NOT CORRECT' , 20, -1) with log; end select getdate() as 'Start Time' go delete sys.syscommittab go select getdate() as 'End Time' go sp_spaceused 'sys.syscommittab' go 3. Run the .sql file from cmd prompt with the below script sqlcmd -Ssvrname1 -A -E -i c:\temp\Delete_committab.sql More » |
|
|
| Database Pros Who Need Your Help |
| Here's a few of the new posts today on the forums. To see more, visit the forums. When someone comes to you wanting to learn T-SQL? - I'm not sure where to put this thread, so apologies if it's in the wrong place. I'm wondering what other people... Delete syntax not working - hi, Here is the delete syntax but it is not working even though all the conditions satisfy. What is the issue? DELETE... Odd behavior with views - Hi all, My coworker recently told me about an odd situation he encountered with views. He found that when he issued... Clean database data, make a new database - Best practices?? - We have a web app with the data in a SQL Server. There are several organizations using the web app so... Using Extended Events to alert on long running queries - Hi Is there a way with Extended Events, where I can set up something; should a user/developer run a query via... Memory pressure - Could WaitForDelay function cause memory pressure like I'm seeing this below? I have a sql server agent job that generates... Doing multiple updates with an ADODB Connection - This working code lets the user enter something in a cell, click a button in Excel and exports the data... Delete Server in DB Engine - Hello, I have two different instances of database engine on local servers. How do I delete one? Thanks SQL Server (MSSQLSERVER) keeps Stopping - Hello, Trying to connect to sql server database engine, via ssms, but won't connect. I get the standard error: A network-related or... TransactionLog. VLF Fragmentation. - Hi Guys!! ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->8 During the tests, I set the true size for my transaction log file (its a size after maintenance plan,... CASE statement and inner join giving duplicates - Dear DBAs I am using a CTE to get terminal locations from one table and then joining this CTE with... How to find the first recurring character of a string. - I have a query that finds the first recurring character in a string. For eg : if @str = 'ABCCDA' then i... Check table for Duplicates, send email of duplicates and force failure - Hi, I have the below SQL script, which will insert 7 records to the table stageOrderTrans. The OrderId 5 has two... Query - Hi I have 1 Table with field Document Type . I want those records of Customer whose Sum(Amount) of Document Type... Fill Factor - Dear Experts, Regarding the Fill Factor on indexes, Does SQL apply the Fill Factor value of an index to the... Date Search - Hi, I have in a data row: column 2017-11-06 01:17:34.000 I only want to search for values if the year is... Matrix - Hi I have 2 select statement with Union All . I want to show their separate Sub Totals. Can this be done.... Query - |
|
| This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. | This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here. | This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: [email protected] |
|
|