New answers tagged

2

No ! But, you can : 1 script our your database schema and use BCP out and bcp in method or 2 restore the database as a copy on EE or Dev edition, remove all enterprise features and backup the database and restore it on standard edition.


0

Turned out to be a minor corruption of the SQL backup file. After re-running the entire process again, the restore worked fine with no errors. You would think that Postgres would have in-built checking to ensure integrity of exported data!


0

Do a Restore Headeronly With File = '...' If it still fails it's not a valid native SQL Server backup file. It's not an issue of versions. Open it with a hex or text editor, what's the file header look like? Maybe it's compressed with a 3rd party solution like LiteSpeed and those require you to use a tool to convert to native format if you don't have it ...


0

Instead of using this script I would attempt to use this method. the script below assumes the following: The restored database will have the same name as the backed up database The restored database will be restored in the same location as the backed up database The files have the following naming format dbName_YYYYMMDDHHMM.xxx XP_CMDSHELL is enabled ...


-1

Found this question when trying to do the same and ended up using git on the postgresql data directory. Discarding the changes is as easy as: git reset --hard


3

Come clean ASAP. The sooner you do this the better. If I'm reading the timeline correctly, when you restored the FULL backup over your production database you broke the backup chain. This means you wont be able to get the data for 06:30PM to 10:00PM into your current database that holds data for 01AM to 06:30PM + new data since the RESTORE. I would ...


3

First off... I think it is best to come clean to your manager on such issues. The business will notice the missing data and he will not appreciate being blindsided and not having all the facts at hand. In that event, things will be even worse for you. If you have no formal background in DBAing, you have no business doing DBA tasks and/or the real ...


0

A nagiosxi specific method that worked for me was running their repair_databases.sh script found in /usr/local/nagiosxi/scripts/. Make sure you run it as root.


0

I would first try running a below command to see if that fixes the issue. EXEC sp_repldone @xactid = NULL, @xact_sgno = NULL, @numtrans = 0, @time = 0, @reset = 1; If not, I will create a publication for a single article and then run the above command again. This should mark all the replication transactions as complete. Once I am able to shrink the ...


1

As already suggested, you cannot achieve this using backup/restore. You can also not achieve it using log shipping. I would look at using transactional replication perhaps from views, which would define the 60 to 90 day window. Be aware (or make your stakeholders aware) that replication is not free and comes with its own (usually small) performance ...


3

First of all, you can use a pipe mongodump -h sourceHost -d yourDatabase … | mongorestore -h targetHost -d yourDatabase … This reduces the time, as each document read will more or less instantly be restored on targetHost. However, this has the disadvantage that you might run into problems if the procedure is aborted for some reason, for example of a ...


0

for a restore to a point in time, you just need the latest full-backup and all the transaction logs thereafter. this script will show you when was the last backup taken and where it is located. declare @backup_type CHAR(1) = 'D' --'D' full, 'L' log ;with Radhe as ( SELECT @@Servername as [Server_Name], ...


2

You have two alternatives: 1. Load the file into a new database and do a query for the particular date that you want. or 2. Hand edit the dump file and load that (also in a new database). The second alternative has several disadvantages: hand editing is unreliable and error prone. you may break integrity constraints - not easy to see in a load of ...


0

If you perform a full RESTORE WITH RECOVERY, that means you want to only restore the full backup and immediately bring the database online. When you perform a full RESTORE and want to also restore differential or transaction log backups as well, then you want to RESTORE WITH NORECOVERY so that the database does not come online and additional restores are ...


1

Since you only asked about accessing the data from 'code' without specifying any details what sort of code, I hereby present the PowerShell solution: Invoke-SQLcmd -Query "RESTORE HEADERONLY FROM DISK = 'R:\SQLFiles\MSSQL.MSSQLSERVER.Backup\Backup.bak'" | Select-Object MachineName,DatabaseName,HasBackupChecksums,BackupStartDate,BackupFinishDate


2

This is a version independent sp I wrote to get the backup date from a file. It's tested for SQL 2008R2, 2012 and 2014. IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'spGetBackupDateFromFile') EXEC ('CREATE PROC dbo.spGetBackupDateFromFile AS SELECT ''stub version, to be replaced''') GO ...


1

It could be most useful to start by using the pg_restore command to check the format of the file that's been sent. If your file was named "mydata.backup", the command would be: pg_restore --list mydata.backup (On Windows this would be pg_restore.exe) This will output some text to show the format of the file, and the data tables that are in the file. This ...



Top 50 recent answers are included