|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The Extra Columns | |
sys.sql_logins includes extra columns that aren't in sys.server_principals. What are they? | |
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 directory creation time I have this code in PoSh: $directory = Get-Item 'C:\Program Files\Microsoft SQL Server' $message = "SQLDirectory Creation: $directory.CreationTime" What is stored in $message? Answer: $message contains "SQLDirectory Creation: C:\Program Files\Microsoft SQL Server.CreationTime" Explanation: This is a place where variable expansion doesn't quite work. I to get the variable expanded, but the property of CreationTime is not evaluated. The result is: SQLDirectory Creation: C:\Program Files\Microsoft SQL Server.CreationTime Ref: Powershell: Everything you wanted to know about variable substitution in strings - https://powershellexplained.com/2017-01-13-powershell-variable-substitution-in-strings/ |
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 - Development |
Need Correct Query Code Please? Thx. merry Christmas SQL Kids - Compose a SQL query to retrieve all products with its most recent two orders? Products that haven’t been ordered should be listed also. Use ERD below. Whats Correct Query Code? |
importing text file, bulk insert to populate table - I have to import a text file to build a table and all of the date fields currently are in integer form. It comes in three different ways. The first two are like '20191223' or '0' if there is no date. The third way in the text file is like '2170915', missing the second character. […] |
Working with variable length number - please assist I have table 1 and table 2, join them on account number. the problem is that table 1 has extra zeros in the middle and while table 2 does not have extra zeros in the middle, the account number is not always of the same length. see below I need to match the […] |
Hadoop for SQL Developers - Hello People I am a newbie in the field of SQL Development and have a silly query. I am doubtful about a thing that if Hadoop is easy to learn for SQL Developers. Is it essential to be aware of Hadoop if I'm totally into the field of SQL Development? How much SQL is required […] |
SQL Server 2016 - Administration |
Basic Availability Group in Sql Server 2016 Standard edition setup - Hi, I am trying to setup Basic Availability Group in Sql Server 2016 Standard edition SP-2-CU11 and i'm having few issues/questions:My Primary DB is encrypted with Master Key.We have built another Sql server for Always ON but no user DB yet.On Primary Sql server DB, We are taking Transaction Log Backup every hour and FULL DB every […] |
Finding Auto Increment value for each table in DB - Hi, I am trying to get the max value of auto identity column with table name and column name. Below is the query I am using which GIVES me table and column name BUT NOT the MAX value. SELECT OBJECT_SCHEMA_NAME(tables.object_id, db_id()) AS SchemaName, tables.name As TableName, columns.name as ColumnName FROM sys.tables tables JOIN sys.columns columns […] |
SQL Server 2016 - Development and T-SQL |
Truncate or Insert data with conditions - Good day, I have two tables where A is the source and B is the destination, so what needs to be achieved, when A has no data don't truncate B when A has data truncate B and insert data from A. Need help if (select count(*) from [A]) > 0 truncate table B Insert into […] |
Administration - SQL Server 2014 |
Offline vs Online index operation - As I know, while online index rebuilding, SQL Server virtually creates an index and then at the end it swaps the existing old index with the new created one and then finally drops the old index. I would like to know if these operation same for offline index rebuild. Will SQL Server create virtually an […] |
Language conversion Japanese to English for MSSQL Server DB - Hi All, I have MSSQL Server Database installed on windows in Japanese language. Also OS ( windows ) installed in Japanese language. I am as English user not able to any administration on MSSQL Server Database. So Can any one please let me know how I can change the MSSQL Server Database console language to […] |
High Page File Usage - Page File Usage in one of our production database server is continuously up-to more than 200% of the total available memory. Is it a signal to add more physical memory? |
Development - SQL Server 2014 |
Reusable Variable - hello, I know there's gotta be a way here, but I'm struggling. Let's say I have a last name parsing sql statement (using the first few letters) but the rules are complex in the event of hyphenated names, Sr's Jr's etc... Anyway, I have all that sorted out using SELECT CASE. This works great, but […] |
SQL Server 2012 - T-SQL |
Migrating databases - error on login 4064 (cannot open default database) - Hello, I am trying to figure out how to create a script to generate Login mappings to databases. I've search a lot, plenty of cases and examples, but none seem to match my problem. Here a brief explanation: I have daily backups of databases I copy to my new server. No Logins, etc. I restore […] |
Reporting Services |
VS 2019 TargetServerVersions - I am trying to find out which SQL Server versions are supported in VS 2019 /SSDT for Reporting Services. We have SQL Server 2008 R2. My Infrastructure team is building a new computer with Windows 10 and it will have VS2019 on it. Our Report Server is SQL Server 2008 R2 and I want to […] |
Integration Services |
Has anyone used BIML to create Memory optimized tables. - I was hoping to experiment with memory optimized tables for my staging layer to speed up the process. Googling "BIML Create Memory Optimized Table MEMORY_OPTIMIZED=ON" is not giving me nay results. This seems like it would be a common setting for a table used in a staging layer. I am using the table.GetDropAndCreateDdl() code to […] |
Article Discussions by Author |
Performance Tuning Using Extended Events: Part 2 - Comments posted to this topic are about the item Performance Tuning Using Extended Events: Part 2 |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |