Tag Info

New answers tagged

1

I am Powershell dude (sounds like I am attending a Powershell Anonymous meeting!!) so this is the script I would use although I would use the objects returned to write to a database for a report or write to Excel or create an HTML email for my manager or whatever was required. Remember the $Servers should hold SERVERNAME\InstanceName,PORTNumber if any of ...


0

As someone already mentioned in their reply running DBCC CHECKDB after a restore can be a good practice. This way as a backup is a copy of a db you will verify both backups and restores without any impact on a production DB. You can check this article that describs how to run and/or automate a DBCC CHECKDB after a database restore by automating DBCC ...


1

maybe I'm a bit too "old school" but I've used a query and script for about 10 years now since the SQL Server 2005 days: SELECT LEFT(d.name,20) AS database_name, CONVERT(VARCHAR(16), MAX(CASE b.[type] WHEN 'D' THEN b.backup_finish_date END), 120) AS LastFullBackup, CONVERT(VARCHAR(16), MAX(CASE b.[type] WHEN 'I' THEN b.backup_finish_date END), 120) ...


3

You can use sqlmigration - Start-SqlServerMigration.ps1 This script provides the ability to migrate databases using detach/copy/attach or backup/restore. SQL Server logins, including passwords, SID and database/server roles can also be migrated. In addition, job server objects can be migrated and server configuration settings can be exported or ...


1

USE mydb SET NOCOUNT on BEGIN TRY DROP table #S END TRY BEGIN CATCH END CATCH BEGIN TRY DROP TABLE #Mytable END TRY BEGIN CATCH END CATCH BEGIN TRY DROP TABLE #DBInfoResults END TRY BEGIN CATCH END CATCH go CREATE table #S ( server_name sysname, purpose VARCHAR(255), servertype VARCHAR(30) ) insert into #s VALUES ('myserver', 'Test', ...


0

You don't need to export or import anything. As long as the versions of MySQL on both machines are identical you can simply Shutdown MySQL process service mysql stop Overwrite the installed /var/lib/mysql with the old /var/lib/mysql. A. cp -Rf /var/lib/old_mysql /var/lib/mysql B. As a precaution you could move the /var/lib/mysql on the new server mv ...


1

Well I don't wonder about the restoring time. I wonder about your file amount. 15k files for 112MB? What the h...? Your symptom is nearly the same as during file copying. If you have two disc (disc1, disc2) and you try to copy 100.000 files each 4KB in size from disc1 to disc2 it may take hours. If you copy one zip file without compression (containing those ...


0

Server Logins allow you to connect to the SQL Server. Logins are stored in the [master] database. Each Login is assigned a hexadecimal SID. Windows Authentication Logins get their SID from the Active Directory so the SID for a Login is same across servers in the network. SQL Authentication Logins get a SID generated by the SQL Server so the SID will be ...


2

I would suggest to use Restore Gene written by Paul Brewer. There is a T-SQL [sp_RestoreGene] and PowerShell version [ps_RestoreGene] of it and you can use it / customize it as per your needs. SQLServerCentral.com has an excellent article by the author on how to configure and describes the working of it as well - Restore Gene : Automating SQL Server ...


2

The above issue which you are facing is commonly known as the case for Orphan users: What commonly happens with SQL authenticated logins and database users on a restore is that the SIDS will be out of sync, thus breaking the relationship. This relationship must be repaired before you can connect to the database using that login, because in the eyes of SQL ...


0

If you are attempting to restore newer database to older SQL version you can always simply manually create the database in the older SQL version and utilize the task - generate scripts and include the data.


3

I would suggest automating generation of the restore script. There are a few versions of this out there but Paul Brewer has a T-SQL and PowerShell version available. I have seen some setups as well that just include generating a restore script when the backup is accomplished. Which, just a note that a new open source backup solution was released by Sean ...



Top 50 recent answers are included