|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Filtering the Audit | |
I have created a Database Audit Specification for tracking activity in my database. I choose the SELECT Audit Action type. Which of the following are ways that I can filter the Object Class to which the audit action applies to? | |
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) |
Splitting the time I have a time string that is formatted like this: myString = '28/08/2019' I have loaded the time module and want to change this to the struct_time format, the same as returned by time.localtime(). >>> import time >>> time.localtime() time.struct_time(tm_year=2019, tm_mon=8, tm_mday=22, tm_hour=8, tm_min=18, tm_sec=20, tm_wday=3, tm_yday=234, tm_isdst=1) What method should I use? Answer: time.strptime(myString, "%d/%m/%Y") Explanation: The strptime() method from the time module will return a struct_time format. Ref: strptime() - https://www.tutorialspoint.com/python/time_strptime |
Featured Script |
A DateRange Table Valued function Jonathan AC Roberts from SQLServerCentral The function is an inline table-valued function (or sometimes called a parameterised view) so it can be used just like a view or a table but needs parameters. It generates a single-column table of datetime2 with rows differing by any multiple of any of the dateparts that SQL Server provides.
|
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 Login Issues between replicated VM's - The issue is that this server (BFS-DEV02) in a virtual clone of another server (BFS-DEV01). Within SQL Server, windows login BFS-DEV02\Administrator is being viewed by SQL Server AS BFS-DEV01\Administrator. Here are some screen shots shows what I mean about the logins…I believe what we ultimately want is to remove BFS-DEV01\Administrator and make it BFS-DEV02\Administrator. […] |
Always on - Planing to go with SQL Server 2017/2019 for Biztalk latest version of 2019/2020. So i would like to go with Always as DR option. Do you guys have seen any issues setting up always on for Biztalk DB server ? If yes, what are the issues have you seen for setting up always on with […] |
SQL Server 2016 - Administration |
Extended events - I'm trying to teach myself ExtendedEvents (trying to move from profiler). I've attached a configuration and the output. I've got 'statement' selected in event fields and 'sql text' selected in global fields but the output doesn't show the sql statement that has been run and I'm not sure why? |
AOAG Secondary Checkdb - I'm looking into setting up a AOAG with a DR server which will have the option as NO for readable secondary. Under my understanding will mean I will not have to license the DR box. As best practise (Brent Ozar advice) indicates CHECKDB should be preformed all on nodes as they reside on different disks. […] |
SQL Server 2016 Archive Strategy advice. - Greetings. I’m after some advice. I’m helping a colleague with a SQL Server 2016 database that is getting quite large and they are considering an archive strategy. The database essentially stores data from a number of sensors on machines that are building stuff. Readings are taken every 1, 5 and 10 seconds from a variety […] |
Multiple tables created in CDC - Hello Team, I have enabled CDC for a particular database in SqlServer and enabled it for multiple tables. I see duplicate tables have been created for each of the table that I have enabled CDC. Is it by design or have I done anything wrong in configuration. Thanks |
2 core machine with 4 Tempdb files - Just curious if there is a performance hit by having 4 tempdb files with a 2 core machine? running SQL 2016 (SP2 CU7 +GDR) |
User datareader access problem - I went to give a user (via AD account) datareader access to a number of databases. Everything seemed alright, her read permissions show up in server level security, and in each of the assigned databases. However she still cannot view them, getting a 'not accessible' message. If I try viewing tables in these databases 'execute […] |
SQL Server 2016 - Development and T-SQL |
sp_executesql with multiple parameters - I'm trying to write a stored procedure that will select the entire table if all parameters are null, otherwise select the table filtered by the non-null parameters using an AND condition. Here is some skeleton code: DECLARE @ProjectID VARCHAR(100) = 300; DECLARE @ProjectName VARCHAR(100) = 'Some project name'; DECLARE @sql NVARCHAR(4000) = '' SET @sql […] |
Administration - SQL Server 2014 |
Data source error - Security protocol not supported - Hi Experts, I have a report that fetches data from a cube .I have an issue with a data source which is returning an error "Security protocol not supported".This is only happening in SSRS reporting server after deployment but in visual studio the report is working perfect.I have been working on this without no success. […] |
Development - SQL Server 2014 |
How to copy rows from the same table and update the ID column? - I appreciate it is utterly trivial question, and yet... When you have a small amount of columns, there is a simple solution, sort of INSERT INTO myTable SELECT MAX(table_id) + 1, column2, column3 FROM myTable WHERE table_id IN (SELECT list of table id's to be replicated); alas I have circa 200 columns, so I don't want […] |
SQL 2012 - General |
Slower performance on SQL. - We are moving from one SQL server to newer SQL with better hardware. Both systems have an identical configuration. We won't like to change any configuration in a newer system. Currently, we are doing some tests to measure throughput, I/O, CPU, and a few others. Ideally, a newer system should work much faster than the […] |
Export to CSV - Hi, i am trying to export a table into csv, and it should be comma delimited with doublequotes around each value like this: "value1","value2","value3" this works fine, but one of the columns includes doublequotes as part of the value, so when its exported to csv, it breaks it into multiple columns. Anyone knows the […] |
SQLServerCentral.com Website Issues |
Website search - Does SQLServerCentral have any advanced search features, or can anyone share any tips? Does everyone just use google with site:sqlservercentral.com? |
Administration |
Different Execution plan and performance issues in SQL 2017 compare to SQL 2012 - We have recently migrated from SQL Server 2012 Express to SQL Server 2017 Express and observed some of queries having performance issues in SQL Server 2017. We have compared execution plan and found that both versions generate different execution plan. As Microsoft claims SQL Server 2017 is faster than earlier version of SQL server but […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |