|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Getting the SQL Connections | |
I want to get a count of the connections to my SQL Server 2019 instance in T-SQL. Which of these 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) |
An Empty NumPy Array I have imported the numpy module: import numpy a = numpy.xxxx What replaces the xxxx to get an empty array in the variable, a? Answer: numpy.empty(shape=(0,0)) Explanation: The empty() function in the numpy module will do this. You can also use numpy.array([]). Ref: numpy.empty - https://numpy.org/doc/stable/reference/generated/numpy.empty.html |
Featured Script |
A varchar(MAX) STRING_SPLIT function for SQL 2012 and above Jonathan AC Roberts from SQLServerCentral.com An alternative for Microsoft's STRING_SPLIT function that will work on SQL Server 2012 and higher.
|
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 |
Stopping the SQL Server Agent before a datacenter shutdown - I have read different opinions on whether to manually shut off the SQL Agent service before shutting down a SQL instance for 2 days; some believe the server being off is perfectly fine, and others have said to manually stop the Agent and manually start when the server/instance is turned back on. To me the […] |
SQL Server 2017 Dev Certificate error - Error Message attempting to download data from my SQL Server 2017 dev edition. 0 - The certificate chain was issued by an authority that is not trusted. I've tried so many suggestions and it's probably because I'm not a certificate expert. So. Two questions. As a person with limited DBA experience with advanced settings, how […] |
SQL Server 2016 - Administration |
Removing Stopped Databases - Greetings all, first post.... In doing backups with our Cohesity system it reports errors with a few databases which lead me to investigate the cause. Basically these are stopped databases on the Microsoft Server 2016 / MSSQL 2016 server systems. The SQL Configuration Managers shows them as stopped. These particular databases were moved to other […] |
SSRS - Object reference not set to an instance of an object - Hi All SQL Server version: 2016 SP2 CU13 I have one particular report that keeps giving me the error below....All other reports work just fine. An unexpected error occurred in Report Processing. (rsInternalError) Object reference not set to an instance of an object. According to the Execution log, the report ran last a […] |
SQL Server 2016 - Development and T-SQL |
Empty Index Statistics object - This is a new thread but relates directly to Index statistic is empty - how is this possible? My post in that thread and for background " I too am on SQL2016 CU15 , db in Compatibility mode 2012. In the past four months we have had three occurrences of this problem. We are truncating […] |
Transactions - Hi, Can you please let me know what is the benefit of using the 'SET IMPLICIT_TRANSACTIONS ON' in the below code when we already have 'BEGIN TRAIN' which can be used to rollback if any error occurs? So, I see IMPLICIT is also being used sometimes, not sure what is the benefit when we already […] |
Development - SQL Server 2014 |
Index on View - Dear Group: I was going to create an index on a view we have, but I am getting the following error: "Cannot create index on view '' because the view is not schema bound." I Googled this and found that the issue is that we need to create the view using SchemaBinding like the following: […] |
Calling a Function to Update Temp Table - Hello, I have created a function that will determine the Distance between 2 sets of Lat and Log Coordinates. The function is working as desired. As a next step, what I would like to do next is record the difference in miles into my temp table. I am attempting is to call the Function within […] |
SQL 2012 - General |
How to get PartId from table #trades that have wrong Code ON Code Value To when - How to get PartId from table #trades that have wrong Code ON Code Value To when code type from and code value from Exist ? How to get PartId from table #trades that have wrong Code ON Code Value To when code type from and code value from Exist ? I work on SQL server […] |
SQL Server 2019 - Administration |
SSRS report download fails - Hi. I am trying to download a report from SSRS 2019 in word format and fails with error as below: An error occurred during rendering of the report. (rrRenderingError) The type initializer for 'MS.Utility.EventTrace' threw an exception. Requested registry access is not allowed. Same case with Excel. Only PDF works. The cases when I am […] |
Importing text file issue - Hi, I am trying to import the attached REF_RF1MAS.txt file but am getting numerous bulk load errors. I was given the attached A_spec that is supposedly the import specs but it does not seem correct. I tried the code below. Any ideas on what the issue is? Thanks. Msg 4863, Level 16, State 1, […] |
SQL Server 2019 - Development |
Wait for query to finish before returning results - When I do "select * from ... " from a large table, the result starts to "stream" before the query is completely done. Is there a way to prevent this? Some kind of oppositve of the "FAST" queryhint? |
Many executionplans for one query, why? - I've yet to find an answer for this. I've found a few queries that have a few executionplans. Why is that? For example, I've seen queries (in QueryStore) that has executionplans A and B (and more)... For a few days the query uses A and then goes back to B, and then back to A […] |
Reporting Services |
SSRS Dynamic columns for different Year groups - Hi, I have sample data, please can someone help me create the output based on the following data? So asically in SSRS when year 6 is selected it should populate the output below for Year 6, Year 7 populate the output for Year 7. CREATE TABLE Data ( StudentId int, intYear int, ,subject […] |
History Snapshots - Bulk create for many reports - Hi guys, just found the History Snapshot Option within SSRS. Do you know if there is a way to create a schedule that will be used by every report. E.G. I want to take a history snapshot of every report with a retention of 24 hours. Then the snapshot should be deleted. Maybe you can […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |