A
A
Andrey Kornev2017-06-26 22:01:01
JavaScript
Andrey Kornev, 2017-06-26 22:01:01

MS SQL How to access the database by restoring from a backup?

I was given a database backup in .bak format and restored it using Microsoft SQL Server Management Studio to a local SQL Server. When creating a connection in VS, there is no restored base. I understand that you need to reconfigure users and privileges for the database, but I'm not strong in SQL Server, at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-12-02
@maksmaksimovich

Regular expressions are not needed here: UPD. It turns out that the author of the question from the first time was not able to tell what he needed. Taken from the comments:
Oh how. Well, I, in turn, will continue to insist on the uselessness of regular expressions. We create an element, put a string into it, look for the necessary elements, get their markup:

const div = document.createElement('div');
div.innerHTML = str;
const imgsStr = [...div.querySelectorAll('img[src*="/test/"]')].map(n => n.outerHTML).join('');

or
const imgsStr = Array.from(
  new DOMParser().parseFromString(str, 'text/html').querySelectorAll('img[src*="/test/"]'),
  n => n.outerHTML
).join('');

UPD. No, it didn't work the second time either. More details have surfaced:
Delete, so delete:
const div = document.createElement('div');
div.innerHTML = str;
div.querySelectorAll('img[src*="/test/"]').forEach(n => n.remove());
str = div.innerHTML;

or
const d = new DOMParser().parseFromString(str, 'text/html');
d.querySelectorAll('img[src*="/test/"]').forEach(n => n.remove());
str = d.body.innerHTML;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question