« first day (2878 days earlier)      last day (2287 days later) » 

02:17
in reading about database mirroring: "Unlike replication, which works at the logical level, database mirroring works at the level of the physical log record. "
that does that mean? "logical level" and "level of physical log record" ?
02:51
Logical replication means copying the actual SQL statements to a log.
For example UPDATE foo SET x = 1; is like 20 characters and one statement.
With logical replication you issue that on each server.
Physical replication usually looks at the actual blocks the database files occupy, and when those blocks change the database ships the modifications in delta, or the entire block to another server.
In the above example of an unbounded SET that would be shipping the entire database.
PostgreSQL has both methods. Some databases only support physical replication.
PostgreSQL does physical replication with WAL logs.
03:09
oh interesting
didn't realize this distinction
i figured all replication was done physically
03:36
def not
But just FYI the distinction between mirroring and replication is pretty silly.
that's not universally agreed upon.
You can say that WAL log shipping is mirroring, and you can also say that logical replication is mirroring.
 
2 hours later…
05:52
Morning
@McNets good answer
 
2 hours later…
07:50
@hot2use Morning and thank you.
08:47
morning
 
3 hours later…
11:43
0
Q: Merging the sysdb database (a dependency due to conversion from Oracle) into my SQL Server 2014 Express Database

gordon613I am looking to convert my SQL Server 2014 Express Database to Azure SQL Database. My SQL Server database was automatically converted from Oracle a number of years ago, and needs the sysdb database as a dependency to provide user defined functions that emulate Oracle functions. I ran the Data M...

Wow that's a nasty one
Running Oracle Over SQL
Anyone ever come across anything like that before?
@George.Palacios it's just some helper functions by the looks of it. presumably he can just move them…
I suppose I've not seen them either - I was assuming it's replicating some native oracle functionality but it may not be
@George.Palacios Yes sysdb is part of an extension pack and just makes code using oracle functions woork
> The SSMA extension pack adds the databases, sysdb and ssmatesterdb, to the specified instance of SQL Server. The database sysdb contains the tables and stored procedures that are required to migrate data, and the user-defined functions that emulate Oracle system functions. The ssmatesterdb database contains the tables and procedures that are required by the Tester component.
@TomV Very interesting.
I would think he could just use the generate scripts wizard to script the definitions of those and then run the script in his own database but I'm not sure
Depends if the oracle code calls function()or sysdb..function (I would expect the former) but things like select from sysdbwould still fail if he just copied over the objects to his own database
He could test that himself on a DEV box fairly easy I would think
12:50
@PaulWhite - are you free?
@CadeRoux I have done it in the past
Do you have to do cost analysis or calculate casemix funding?
13:29
@ConcernedOfTunbridgeWells what's up
What would cause 'display estimated execution plan' to hang if there are no table locks?
2008 R2
Are there any SCH-M locks? I've seen something similar before due to minimally logged truncate statements.
Well not due to, but as a result of
I doubt it. The server is quiet apart from what I'm doing.
I killed all the other connections.
@ConcernedOfTunbridgeWells Missing VIEW SERVER STATE permissions.
@hot2use Would that cause a hang?
13:56
In most cases: no
A complex query might timeout.
@ConcernedOfTunbridgeWells Most likely a schema lock as @George.Palacios said. There are other more esoteric causes but you should start by checking to see if the query you are attempting to compile is blocked.
Also: upgrade from 2008 R2.
@PaulWhite Migating off 2008 R2. We're profiling the source.
@PaulWhite It's hitting another database through synonyms and shredding stuff out of an XML field. Could either of those be generating spurious schema locks?
I can't see anything on the server that could be holding schema locks.
@ConcernedOfTunbridgeWells So the session compiling isn't blocked in sys.dm_exec_requests?
Does "another database" mean another database on the same instance or across a linked server?
Same instance
session_id request_id start_time status command sql_handle statement_start_offset statement_end_offset plan_handle database_id user_id connection_id blocking_session_id wait_type wait_time last_wait_type wait_resource open_transaction_count open_resultset_count transaction_id context_info percent_complete estimated_completion_time cpu_time total_elapsed_time scheduler_id task_address reads writes logical_reads text_size language date_format date_first quoted_identifier arithabort ansi_null_dflt_on ansi_defaults ansi_warnings ansi_padding ansi_nulls concat_null_yields_null transaction_isolat
@PaulWhite - Can I send through some DDL and the query that's blocking somewhere?
14:12
@ConcernedOfTunbridgeWells Are you certain you requested an estimated execution plan? That's an awful lot of logical reads. If you are sure, I would say a synchronous statistics update is in progress on one or more large tables.
@PaulWhite That's what happens when I hit Display Estimated Execution plan
> If the statistics update takes a long time (due to a large table and\or busy system), there is no easy way to determine root cause of the high duration. This is not an uncommon scenario and up until now there has been a lack of obvious telemetry surfaced to the customer that helps them (or Microsoft customer support) diagnose the root cause of this type of slow-running query.
If you are able to mess around with the system, I would suggest stopping the query, enabling async stats updates, and then trying again.
I can probably get the DBA to do it.
ALTER DATABASE <db_name> SET AUTO_UPDATE_STATISTICS_ASYNC ON;
Assuming it is a statistics update that is the cause. If it is automatic statistics creation, you might simply be in for a bit of a wait.
It's shredding some XML to get various items out. Is it possible that it could be generating stats on that?
14:21
No. Well not directly. Stats are only automatically created or updated on base tables and indexed views.
Is this a query that usually runs ok? Or is it the first time you have tried it?
There are so many local possibilities though. Best to have the local DBA take a look tbh.
First time we've tried it here. I haven't been able to get it to complete, although the consultant has used it on other sites before.
14:54
@ConcernedOfTunbridgeWells The goal here is for a variety of clinical analysis, the data is all detailed structured clinical data about various cardiovascular studies.
@CadeRoux So data from studies rather than operational cost or funding data?
Yeah, there are like 200 tables of data attached to the root study data, some of it nested, so a study can have measurements of different valves at different times during a cath. It's highly structured. Which means it's difficult for customers to be able to do analytics. So the goal is to transform this data into some kind of data mart for easier use by the customers.
15:29
@billinkc got the green light to do the replication (this is HQ of course, so i "needed" that)
and also successfully made them aware of the liiiiiitle servername issue that will need to be solved first ;)
which, ironically is the cause of me even "asking" to do the replication in the first place
else i would have just done it Lol
 
2 hours later…
17:56
@PaulWhite your new article on SQLPerformance is great.
18:36
> This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
It'd the first time it occurred to me but shouldn't we suggest editing the existing question with enough detail to show why it's a different question instead of asking a new one
3
#showerthoughts
19:01
If the question already has answers, editing it might invalidate them. Although in principle I agree that clarifying the existing question should be attempted before posting a new one.
#thoughtdrizzle
19:54
@PaulWhite - what do you suggest we do to with this question - nearly 10,000 views over 4 years, but far to broad (probably) for the site. It's currently closed, so obviously no new answers can be added. Just re-open it?
@MaxVernon Do you plan on answering?
god no.
there have been books written on that subject that still don't cover it all
:-)
my personal bent would be to delete it, but I love deleting stuff.

« first day (2878 days earlier)      last day (2287 days later) »