|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The SQLCMD GO | |
I am writing a SQLCMD script in SSMS with SQLCMD mode. I need to have a batch separator in my script, and am planning to use GO. What options do I have for the batch separator on it's own line? | |
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) |
Memory Optimized Table Limitations In SQL Server 2017, what are the restrictions for Memory-Optimized Tables (MOT) and Foreign Keys (FK)? Answer: MOT tables can only have FKs to other MOT table PKs Explanation: The MOT tables can only have FKs to other MOT tables. These would be to a PK in an MOT table. You cannot have a FK to a regular user table. Ref:
|
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 |
SQL Replication issue when trying to add Subscriber through SQL job - I'm using SQL 2017 ( Developer Edition), our environment has a requirement of setting up the replication weekly. (Because we had to reload the database back to an older version). I've setup the transactional replication with initialize with backups option and I'm trying set them all up with SQL agent jobs. My setup and scripts […] |
Firewall in SQL - Hi team There is an argument in our company, that we have a perimeter firewall between the SQL DB infrastructure and Internet, but there is no firewall between the (DB) server and the client. So the reason I am writing this, is to understand how as a DBA we can be responsible to secure and […] |
SQL Server 2017 - Development |
Report - I never created SSIS from SQL query output I need to send email to end User either in Excel or Text format. How can I do in SQL or it has to be done via SSIs? |
get rid of key lookup - trying to help 3rd party app (can't fix tsql) with an index big tie up on key lookups, made covering index still won't use it |
Automate Log Full Issue - Hello Everyone, I am new to develop queries and planning to automate Log Full issues fix using stored procedure and trying to develop the SP. Could you please help me to complete it. Below query is not working if log_reuse_wait_desc is due to LOG_BACKUP and getting the error : Error converting data type nvarchar to […] |
SQL Server 2016 - Administration |
Restoring file group from one database to another - Hello, I am doing some testing and looking at Filegroup articles, specifically: Database Filegroup(s) and Piecemeal restores in SQL Server Piecemeal restore. but I am wondering if I can apply the filegroup backup from one database to another, specifically restoring only a particular filegroup of the database, and not have to backup the entire database, […] |
SQL Server 2016 - Development and T-SQL |
Inserting large data volumes into a table as fast as possible - I'm doing development on large SCD2 tables (100M+ rows). When I've fixed bugs and it's time to re-run, I need to restore the data back to a known point, currently via truncate and insert from a backup table. This process is taking FOREVER and slowing down my development. Sample code to restore the tables: /* […] |
Could you list db modeling tools you use on daily basis? - Hi, while looking for new position I see beside DBA and SQL skills(SSRS, SSIS, Powershell ..) company adding "database design/modeling " Question: What tools currently you use on daily basis for physical and logic database modeling I used to model in Erwin, but might be the is new less costly and more simple tools […] |
Administration - SQL Server 2014 |
Compat Level change and Impact on Query Performance - Hello DBA Gurus, We have a prod SQL Server Instance with a critical Database on SQL Server 2014, but Compat Level on SQL Server 2012 ( Compat Level 110) . It was probably set in that level, way back by someone so the workloads, queries etc can be tested.One morning there were performance issues on […] |
Limited SSMS - Basic tool - Hi, Some of our users have the need to run queries against production DB's. They are light SQL users - meaning they need to run light queries against production occasionally. I do not really want to give them SSMS with READ only access to production - because they could still easily write a query […] |
SQL 2012 - General |
can I kill a spid executing a delete or update or insert statement - when I check the deadlock in the database, there are some deadlocks caused by the delete or update or insert sql statement, if I kill the spid which executing delete or update or insert sql statement, does it make data loss or data wrong or data inconsistency ? thanks! |
SQL Server 2012 - T-SQL |
Query not contained in either an aggregate function or the GROUP BY clause. - Msg 8120, Level 16, State 1, Line 2 Column 'TimeReporting.dbo.TimeData.ID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. Query Here: SELECT ID, EmpNo, Date1, SUM(Time1) FROM [TimeReporting].[dbo].[TimeData] WHERE Date1 BETWEEN '2020-03-01' AND '2020-03-08' AND EmpNo = '8939' Table Here: ID bigint Unchecked […] |
SQL Server 2019 - Administration |
Memory Management - Hello DB Gurus, We have about 700 databases on a production SQL Server instance, some are small but they consume memory . Host has 96 GB, SQL Server has 75 GB and I see over all Memory Utilization 90%. What are the steps to reduce / watch SQL Server Memory. I know once the Memory […] |
SQL Server 2019 - Development |
SQL query - Build Schema script provided. for each student , need to print if he missed any pre-requisites, plus the current application course from the application table . it should not print any course already registered in register table. . Expected result given inside the script. Scripts: create table applications ( student_id INT, requested_course VARCHAR(4) ) ; […] |
Integration Services |
Changing ScriptLanguage to Microsoft Visual C# 2017 - Hello I'm just wondering how this works I have a package that I've upgraded from 2008 by adding it to a brand new project and following the upgrade path This seems to work fine One thing I have noticed is that the scripts all convert to Microsft Visual C# 2015 (I either edit script […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |