|
|
|
|
|
|
|
Question of the Day |
Today's question (by Junior Galvão - MVP): | |
Database Properties | |
In previous versions of SQL Server, the Page_Verify database property algorithms were used to verify and identify possible incomplete, suspected, or broken pages of data. In SQL Server 2017, what is the new option that should be set to add a certain bit in the header of a page? | |
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) |
Preventing a SELECT I have a table, dbo.DatabaseSizeInfo, with some information about my database growth. A developer, SallyDev, wants to view this information. However, I am sure others will also want access. What is the best way to get SallyDev access to view data in this table? Answer: Create a role, grant SELECT on dbo.DatabaseSizeInfo to the role, and add SallyDev to the role Explanation: The preferred way to manage security in SQL Server is to always use groups and roles to grant access. The way you would do this is to create a role, grant the rights to the role, and the add the user (or group) to the role. Ref: Getting Started with Database Engine Permissions - https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/getting-started-with-database-engine-permissions?view=sql-server-2017 |
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 |
Double click .sql file opens new SSMS session - When I double click a .sql file, it opens SSMS. If I double click a second .sql file, it opens a new SSMS session instead of a new tab on the current SSMS session. We are running v17.8.1 Is there setting for this. Have already looked at the following posts and none of this worked: […] |
SQL Server 2017 - Development |
Trace file 95 Percentile alongside min/avg/max - Hi Im trying to show the 95th percentile duration value, per proc , alongside side the min/avg/max duration. And Im hitting a brick wall. How on earth do I calculate the percentile per proc. Any words of advise gratefully received thank you simon |
SQL Server 2016 - Administration |
Linked server - Cross domain - Windows authentication only. - Hi all, I was looking for some advice on the best way to do this, we have our domain (A) and a parent companies domain (B). For a long time now one of our applications running in our domain has been using a linked server also in domain A to get data from domain B […] |
SQL Server 2016 - Development and T-SQL |
Performance difference for stored proc in SSIS vs SSMS (and other questions) - I have a humongous data set that I am updating from another humongous data set. We are talking about hundreds of millions of rows being updated. Apart from partitioning these tables (which are processed by single year batches) I have tuned the update query and indexed the tables so that the execution plan looks very […] |
Development - SQL Server 2014 |
Merge all rows to one row in results - This is working, thank you to Drew Allen from this forum. I would like to know if this can be tweaked a little. select ai.*, pe.program_name, ac.full_name from all_clients_view ac left outer join alt_id_view ai on ac.people_id = ai.people_id left outer join program_enrollment_view pe ac.people_id = pe.people_id Currently, the result will be like this for […] |
Using a third table in small left outer join - HI I have 2 views and I need one more information and not sure how to do this. I thank you for all of your help so far. select b.*, a.full_name from all_clients_view a left outer join alt_id_view b on a.people_id = b.people_id I need to add in the program_name from this view: I don't […] |
combination of values - I want to find every combination possible...no duplicates and using a value 1 time per combination. If there are X values in the scenario, then each combination would contain X values. Example: 3 values: x, y and z would return: xyz xzy yzx yxz zyx zxy Examples of want I do not want: x xx […] |
SQL 2012 - General |
How to find a set of sequential values within a list - Hello all, I have a dataset with lat/lon data for vehicles tracking their location every few minutes. It also reflects an estimated speed of travel and the time the record was received/recorded in the database. A small sample of the data for one vehicle: CREATE TABLE #TESTDATA ( VEHICLEID INT ,LAT INT ,LON INT ,MSGDATE […] |
SQL Server 2012 - T-SQL |
t-sql 2012 most current year - In the following t-sql 2012, I want to select records from the AMilestone table when the schoolyear is the most current year from the ASemester table. select * from ASemester ASemester join AMilestone AMilestone on AMilestone.SCHOOLYEAR = ASemester.SCHOOLYEAR where ASemester.SCHOOLYEAR = ASemester.max(SCHOOLYEAR) The sql listed above does not work. Thus would you show me the […] |
T-SQL (SS2K8) |
how to encapsulate the same code block with inserted vs deleted in a trigger. - So I have an IUD trigger on a table with quite a few columns. (Don't ask about normalisation that's another issue). My code is … INSERT INTO auditTable (a,b,c … k) SELECT a,b,c...k FROM inserted Later I repeat the exact same for the table deleted. I was trying to think of a […] |
SSRS 2014 |
Interactive sorting - Is there anyway to sort in SSRS by reportitems.textbox.value? I have a report that a textbox does not appear in the dropdown for interactive sorting that has the following formula in it =(ReportItems!YTLP.value + ReportItems!TSA.value) / ReportItems!YT.value I would like to be able to sort this from largest to smallest value but I can not […] |
Analysis Services |
Calculations - Associated Measure Groups - Hi, I have a current calculation in my cube called 'EUR Rental Value', I added a new calculation called 'USD Rental Value' and when I use excel to connect to my perspective I notice that the new calculation is displayed under the 'Values' measure group and not the 'Sales' measure group. The weird thing is […] |
Change Data Source for tabular Model at Deployment? - I s there any way to change the data source for a tabular model at deployment? I have Development, test & Production Sql Servers. I also Development, test and production servers for SSAS. I would like to change the data source for the model based on which server I am deploying to. Is this possible? […] |
Integration Services |
SSIS bcp command unable to open bcp host data file - I have a developer that created and SSIS package that uses bcp. the bcp command is on a process task the working directory is the tools\binn for sql server (2012). the executable is bcp and the arguments are out "business" -c -t~ -T -SXXXX There are expressions used in the command @[User::TableName] + " out […] |
SQLServerCentral.com Announcements |
Status Update 8 May 2019 - Apologies for missing yesterday. A little coordination problem with a PM out and new people working. I didn't see changes and needed to dig into a few things. We are starting to see some fixes appearing in small ways, and some larger backend ways. Fixes: Redirections should be mostly working. We also have Google/Bing/etc reindexing […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |