Log in or register to rate. I've grown up reading Tom Clancy and probably most of you have at least seen Red October, so this book caught my eye when browsing used books for a recent trip. It's a fairly human look at what's involved in sailing on a Trident missile submarine Question: Can a SQL instance be used as the witness for a database mirroring setup?
This question was sent to me via email. By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Policy.
Thank you for your interest in Veeam products! We've sent a verification code to:. Incorrect verification code. Please try again. An email with a verification code was just sent to. Didn't receive the code? Click to resend in sec. In this example, we will work through the steps to move a transaction log file to a new location via T-SQL commands.
The first script will return the current locations, size, etc. Below is sample output from the script showing that database has only two files. First is primary database file and second is the transaction log file. Although the file name, size, etc.
Note the location of the database file since it will be used during the database attach process. Once you have the location information and have negotiated downtime with your users, now it is time to get exclusive access of the database in order to detach the database.
If users are still connected to the database during the downtime, it is possible to remove them by using the With Rollback Immediate option or you can kill the connections via this tip.
Now the database is detached. Once the detach process is completed, then you can copy and paste the new transaction log file then delete the old transaction log file via Windows Explorer. Once this is completed, we can attach the database with SQL Server database log file at new location with the following script:.
After the final attach command our transaction log file has been moved to new location and our database is operational with log file on new location. Verifying the new database transaction log location can be accomplished by re-running script 1 above. Here is the general process. The Detach Database form will load with the applicable information.
Once the status is "Ready" then you can proceed with the detach process. If status the status is "Not Ready" then you will get a reason under the message column. Most of the time why the database is not ready is related to users connected to database. If this is the case, you can select the drop option provided to drop all existing users. Once the move process is finished then the following general steps will attach the database via SQL Server Management Studio:.
You may notice an error message that the transaction log file was not found after the database file was selected, so browse to the directory with the transaction log file and click the OK button. At this point the attach should be completed and the database should be online with the new transaction log file location. To verify the database functionality and new file location, run script 1 from above.
I am trying to move my log file to a network location on another server. I have detached the db, and moved the log file to the new location. When I try to re-attach, I do not get the option to connect to any other drive except the local C drive. I have a mapping on th db server pointing to the other server. As far as I can tell, there is no way to enter a network location. Am I missing something?
0コメント