powerbi – Power BI refresh dataflow keep a snapshot of data

my requirement is to be able to save the past state of an entity at a certain point of time. Currently when the dataflow is refreshed, the past state is lost and only the current one is displayed. Is there a way to do it? I tried setting up the incremental refresh but not sure if it fits the requirement.

The ideal would be having the table with a column snapshot date that is populated by the current refresh time and at each refresh this table will be populated by new rows and a new refresh time instead of replacing all the rows.

replication – Pg_rewind Uitility – PostgreSQL Snapshot standby

We have Primary-secondary PostgreSQL Streaming replication.

I have done some testing.

Steps.

1.Promote secondary

2.Run some DML on secondary which is in Write mode(another new primary)

3.Down new primary

4.Re-attach with primary using pg_rewind utility.

So, Can we use these steps to create snapshot standby database like we have in Oracle database.

rollback – Deep freeze for linux. Kind of reverting to a previos snapshot beeing a phisical machine

I work in an enviroment with a lot of Linux Servers and a few Windows servers.
When we perfom some changes in the Windows ones it is very easy to go back to the original state using “Deep Freeze” software.

In the Linux servers if it is a VM we have the same result as before using Snapshots. It is very easy go back to the previous state of the server by going back with the snapshot.

Here is my problem… with phisical machines we use parcial solutions as yum history undo, rollback copy in the original folder the backups done previous to the patching, intallation, deploiment, activities.
We don´t have the garantee 100% of leaving the server as it was before the change made on it.

With Windows Servers (Deep Freeze) or Linux VMs (Snapshot) we are complete calmed since we can always go back to the original position.

With phisical hosts/servers we always are very nervous. Servers are critical

Is there any software Deep Freeze equivalent for Linux RHEL or any set of good practices to achieve the “go back” without beening scared when it comes to phisical machines?

18.04 – How to delete an aptly published snapshot

Using Ubuntu 18.04 and aptly version 1.4.0.

I am attempting to create a focal mirror using aptly, as follows:

aptly mirror create --architectures="amd64" -filter-with-deps -filter="Installed-Size (<=500000)" focal http://uk.archive.ubuntu.com/ubuntu focal main restricted universe multiverse
aptly mirror update focal
aptly snapshot create focal-latest from mirror focal
aptly publish snapshot --skip-signing focal-latest filesystem:export:export

This seemed to work OK — but I made a small mistake and want to delete the published snapshot and redo it.

How does one do this please? The command line help shows this:

Usage: aptly publish drop <distribution> ((<endpoint>:prefix)

I presume <distribution> is what aptly publish snapshot refers to as <name> but I have been unsuccessful divining the correct format to use. I have tried dozens of combinations, but here are a few, and the results:

$ aptly publish drop focal-latest
ERROR: unable to remove: published repo with storage:prefix/distribution ./focal-latest not found
$ aptly publish drop focal-latest filesystem:export:export
ERROR: unable to remove: published repo with storage:prefix/distribution filesystem:export:export/focal-latest not found
$ aptly publish drop focal-latest filesystem:export
ERROR: unable to remove: published repo with storage:prefix/distribution filesystem:export/focal-latest not found

database design – Best way to store webshop item data as a snapshot when an order is created

I’m designing the architecture of my application and I’m running into an issue. For the webshop every Order entity has a relationship with a Store and many StoreItem‘s. This allows for quick fetching of information when a user wants to view the Order.

However, when a StoreItem is altered, or even worse, deleted, this information is no longer relevant/available when looking at the Order entity. I have two possible solutions for this, and I would like your feedback on them:

  1. When an Order is created, copy the Store and StoreItem into OrderStore and OrderStoreItem entities that will never be changed, even if the original entities are altered or removed. The Order will now automatically reference to the OrderStore and OrderStoreItem entities.

  2. When an Order is created, copy all necessary data as JSON into special fields in the Order entity. Every time data is requested, get the JSON and turn it into data the system can use.

If you know of a better way to do this, feel free to add it. I’m trying to keep everything relational, so no child objects/tables.

migration – What extra work is required to restore a SQL Server instance and its databases included in a Windows Server snapshot backup?

A backup of the entire server will be inclusive of the SQL Server instance and the database files as a snapshot in time at that moment. This is assuming that the database files live on the server itself that you’re taking a backup of, as it is possible to setup the database’s such that their files live on remote shares.

You can verify the location of your databases’ files in SQL Server Management Studio, by right clicking on a specific database, clicking Properties, and then navigating to the Files page, then looking at the Path and File Name properties.

For example:
Database File Properties Example

In the above, my Test database’s files are stored in the default SQL instance folder. There shouldn’t be any additional work on the destination server, but you may want to make sure the appropriate SQL services (in the Windows Services) are started and running just the same as on the source server.

For example:
Windows SQL Services

The above is my test instance which probably has a lot more components of SQL Server installed than yours will, so don’t take this as a definitive list, rather it’s an example. Compare against your source server to the destination server.

The only other thing I can think of is to ensure all the same Windows permissions are setup to the correct accounts on your destination server as its respective source server. For example, if you’re using the SQL Agent, or a feature like Replication, those might leverage Windows accounts that currently have special permissions setup on your source server which need to be replicated on your destination server. (This is a little outside the scope of DBA.StackExchange though, and might be more of a ServerFault question, if you need help with that.)

sql server – Create DB snapshot without specifying the FILENAME attribute

I create DB snapshot as one of the tasks in SSIS package. The package works with 20 different DBs. Thus, each DB will have a snapshot with hard-coded FILENAME attribute.

CREATE DATABASE Sales_snap ON  
( 
  NAME = SalesData, 
  FILENAME = 'C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLdataSalesData_snap.ss'
),  
( 
  NAME = SalesData1, 
  FILENAME = 'C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLdataSalesData1_snap.ss'
),  
( 
  NAME = SalesData2, 
  FILENAME = 'C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERmssqldataSalesData2_snap.ss'
) 
AS SNAPSHOT OF Sales

Is there a way to use some default path for FILENAME instead of copy-pasting the same string 20 x 3 times? Alternatively, is there any way to specify base path only once and then reuse it in other SSIS tasks?

Using SQL Server Snapshot Isolation is it possible to determine a row being read is not the latest?

I understand that starting a transaction under the SNAPSHOT isolation level means that any subsequent SELECT statement will provide data as it was when the transaction was started.

The following statement, for example, will return data from the table without blocking writers as well as ignoring subsequent changes:

SET TRANSACTION ISOLATION LEVEL SNAPSHOT

BEGIN TRANSATION

SELECT  col1, col2, (something here to tell me the row is out of date)
FROM    dbo.SomeTable st
WHERE   (st.SomeForeignKey = @SomeValue)

COMMIT TRANSATION

Is there a performant way of knowing whether a record retrieved from this SELECT statement has been modified since the transaction was started (without running the entire thing again)?