|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The Random Rows | |
If I run this code in SQL Server 2019 on Adventureworks, how many random values are returned?
SELECT TOP (10) be.BusinessEntityID , RAND (BusinessEntityID) FROM Person.BusinessEntity AS be; | |
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) |
The New Log File I have a detached database from SQL Server 2019, called TDE_Primer. This database had a 100MB data file and a 73MB log file. The log file was lost, so I need to run this code: USE [master] GO CREATE DATABASE [TDE_Primer] ON ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\TDE_Primer.mdf' ) FOR ATTACH_REBUILD_LOG GO How big is the new log file? Answer: 1MB Explanation: A new log file will be created and it will be 1MB in size. Ref: CREATE DATABASE arguments - https://learn.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-sql?view=sql-server-ver16&tabs=sqlpool#arguments |
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 2016 - Administration |
NC index creation duration question - Hey All, My setup is as follows: Table with Clustered Index on ID col. Size 13 GB. 200+ fields, many LOB cols. Single non-clustered index with key CaseNumber and 2 include columns. Size 200 MB. Server performance was good, normal, i.e. hardware doesn't explain the issue. Scenario: I attempted to add a new Non-clustered index […] |
SQL Server 2016 - Development and T-SQL |
Trigger After Update to Update the Updated Table - Okay I can easily see how to update a table field after an Insert but do I use the system Inserted when creating a trigger to update a field in the table that was just updated and do I use AFTER UPDATE or FOR UPDATE CREATE TRIGGER [dbo].[TG_ResolvedDate_I] ON [dbo].[Issues] AFTER UPDATE AS BEGIN SET […] |
Group Delete - I have 2 tables which I need to cleanup old costkeys, based upon a driver table. The driver table is [CostKeyDeletes] and used as input to the cstdetails for cleanup. The costkeys very in record counts so I need a batchsize limit. I would like see logging of the process showing which CostKey it working […] |
SQL Server 2012 - T-SQL |
Group records during capture - I have a table which is being written to by another application. A few things of note I can't alter schema, or unable to upgrade the sql version at this time. I need some help in a couple of areas. The first is to grab the last 15 minutes of information from this table. The […] |
SQL Server 2019 - Administration |
Transparent Data Encryption (TDE) on AlwaysON Availability Group - I’ve been tasked with securing SQL Server data and log files (MDF and LDF) using Transparent Data Encryption (TDE) across all SQL Servers in our environment, which consists of over 85 instances. This is a significant undertaking, and I’m concerned about the potential impact of deploying TDE universally across such a large number of servers, […] |
SQL Server 2019 - Development |
funny character shows in one hdg name in ssis flat file connector - hi, i spent some time today in an existing pkg replumbing 5 flat file connectors to new tsv files. eventually that will be automated. 2 of my connectors show the bizarre character shown below prior to my first hdg name. on one i'm not sure what i did but i chose the file in the […] |
Reporting Services |
Migrating from SSRS 2008 (SP Integrated) to 2022 (Native) - Has anyone done a migration from sharepoint integrated ssrs to native? I'm not finding any specific documentation for this use case. We were able to get the reports migrated via the RS utility and ssrs_migration script provided by microsoft but the subscriptions and report history didnt come across. From the microsoft documentation it seems we're […] |
change server connection - I have a one database and one table in that database. This is on 100 servers. Same db and table name 1.Can I build a report which will change server connection based on the server selected in a drop down list of 100 servers. Can the select data from multiple servers based on a check […] |
Strategies and Ideas |
Automating DAX Studio... - Still trying to figure out options for automating the export the result of a PowerQuery to SQL Server. Turns out that if I have DAX Studio installed, I can do this: Open my PBIX file that contains the PowerQuery I want to export the results from. Open DAX Studio from inside PowerBI. Go to the […] |
Suggestions |
Peer review SQL Central articles - Hi, I would like to contribute to SQLServerCentral in peer reviews. As there are many articles that need to be reviewed on a daily basis, i assume this site needs some reviewers. May i know the process to become reviewer and start contributing.? |
Working with Oracle |
CPU Performance Advice in SQL Server 2005 - I am having problems with CPU performance on SQL Server 2005. CPU spikes frequently to 90-100% for no apparent reason. I have checked the running jobs and queries but found nothing unusual. The server has about 30 concurrent connections and the database is about 5GB. - Check long queries and optimize them. - Use SQL […] |
CPU Performance Advice in SQL Server 2005 - I am having problems with CPU performance on SQL Server 2005. CPU spikes frequently to 90-100% for no apparent reason. I have checked the running jobs and queries but found nothing unusual. The server has about 30 concurrent connections and the database is about 5GB. - Check long queries and optimize them. - Use SQL […] |
SQL Server 2022 - Administration |
Duplicate Documents - Hi Experts, I am trying to find duplicate documents stored in our Filestream database. I have come across multiple documents with same size, created timestamp within minutes\secconds difference, same filename. Is there a better way to identify the duplicate files? Regards |
SQL Server 2022 - Development |
Which selection criteria is more efficient. - Is it more efficient to search on an int than a nullable DateTime? I have a table where I can choose to search on an int field in the where clause or a nullable datetime field looking for nulls in the where clause. Both methods return the same resultset. While I am most likely nitpicking, […] |
Cannot install development version. - A while into install I get a Microsoft OLE DB Driver for SQL Server. The feature you are trying to use is on a network resource that is unavailable. It is looking for msoledbsql.msi. I have one locally but than I get a message: The file 'D:\msoledbsql.msi' is not a valid installation package for the […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |