Unable to copy database with different name in the same instance

I had a huge database and wanted to try some change optimization changes.
So wanted to make a copy of the database along with data in the same instance.
I have tried copy database wizard several times but always see the error as in attachment.
Can someone let me know how to troubleshoot further?
If this is not the correct way please suggest how do i copy a database with different name in the same instance along with data.

Hi Nandu,
From the screenshot, the error 1813 happens when corrupt database log is attempted to attach to the SQL Server. To work around this issue, please preform the following steps, for more details, please review this
blog.
1. Create a new database with same name which you want to recover. Make sure that the MDF file and LDF file have same name with previous database data and log file.
2. Stop SQL Server. Move original MDF file from old location to new location by replacing just created MDF file. Delete the LDF file of new location just created.
3. Start SQL Server. At this point, the database is in suspect status.
4. Make sure that system tables of Master database allows to update the values. Please note that you will be performing this in query window.
Use Master
go
sp_configure 'allow updates',1
reconfigure with override
go
5. Change database mode to emergency mode.
SELECT *
FROM sysdatabases
WHERE name = 'DatabaseName'
BEGIN
UPDATE sysdatabases
SET status = 32768
WHERE name = ' DatabaseName '
COMMIT TRAN
6. Restart SQL Server. Then execute the following DBCC command in query window to create new log file.
DBCC TRACEON (3604)
DBCC REBUILD_LOG(databasename,'c:\yourdatabasename_log.ldf')
GO
7. Reset the database status using following command.
sp_RESETSTATUS yourdatabasename
GO
8. Turn off the update to system tables of Master database running following script.
USE MASTER
GO
sp_CONFIGURE 'allow updates',0
RECONFIGURE WITH OVERRIDE
GO
9. Reset the database status to previous status.
BEGIN
UPDATE sysdatabases
SET status = (value retrieved in first query of step 5)
WHERE name = 'DatabaseName‘
COMMIT TRAN
GO
Make sure that you have done all the steps in order and restarted SQL Server where it is mentioned. Also run SQL Server Management Studio as administrator.(Right click-> Run as Administrator)
Thanks,
Lydia Zhang

Similar Messages

  • How can I share the home folder with different accounts on the same mac?

    Hi, here's a question:
    How can I share the home folder with different accounts on the same mac?
    The whole point being not to have to install all my apps, and move all my files each time between users.
    The second thing would be to be able to modify one document on one account, and have it changed on the other account without having to copy it.
    I would like to have a pro and a private account on my mac.
    Thanks for you answers,
    Doug

    Your apps should not be installed in your home folder--they should be in /Applications where every user can access them.
    If you want to share things between users on the same Mac, use the /Users/Shared folder. Keep your home folder private. Trying to defeat the protections on the home folder subfolders just gets messy. I've never bothered to figure out all of the problems associated with it so I can't explain how to do it.
    Even with using Shared, you would need to alter the ACLs on the shared folder in order to allow both users to modify the documents.
    You must create a Group in Users & Groups and put each user in that group. Then create a folder inside /Users/Shared where you want to share the various files.
    Then, add an ACL to the shared folder that gives the group special permissions. on that folder.
    sudo chmod -R +a "<sharinggroup> allow delete,chown,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /Users/Shared/<sharing folder>
    Replace <sharinggroup> and <sharingfolder> with the name of your group and your folder. Then, run the command in the Terminal.
    With that ACL, each user in <sharinggroup> will be able to alter the files created by any user in the group in that <sharingfolder>.
    Essentially, the client OS is not designed for true file sharing among the individual users. It is designed to isolate each user account from the others.

  • Can two peeps use iChat with different accounts on the same computer?

    What do I do to REMOVE an old AIM account and replace it with a new account in IChat?
    Can two peeps use iChat with different accounts in the same computer?
    (Actually, two people share a laptop, but one of us cannot use her AIM account cuz mine is in iChat already... And, when traveling, I have the computer - and I would like to use iChat on the computer...)

    In iChat 4 you can have more than one AIM Valid name logged in at once.
    AIM valid = AIM, @mac.com or a MobileMe name.
    What you are then stuck with is that iChat is linked to one Buddy Picture and The one Mac User Account's Address Book which may or may not have Full Names, emails details, or a Nickname in iChat 4 linked to the Screen Names.
    Whilst it does let you both log in whilst using one Mac User Account there are drawbacks about who uses the keyboard and reading meesages from the other persons Buddies.
    8:50 PM Sunday; November 30, 2008

  • How can i share documents with different users on the same mac?

    How can i share documents with different users on the same mac?

    Shared how? The other users can read the documents or you all can read and write the documents?
    The first is easy just place the documents in /Users/Shared anyone can access the files there and the other users will be able to read them.
    The second is a bit trickier.

  • Can I sync two ipods with different ID on the same computer?

    can I sync two ipods with different ID on the same computer?

    Hi,
    Yes you can as long as you have two seperate user accounts on your computer. Hope this helps.
    xxmitchxx90

  • Lost my playlists when I tried to share libraries with different accounts on the same MacBook computer

    lost my playlists when I tried to share libraries with different accounts on the same MacBook computer

    Hi dprette,
    When setting up iTunes to share a single music library between multiple user accounts on one computer you should follow the steps in this article -
    iTunes: How to share music between different user accounts on a single computer
    http://support.apple.com/kb/HT1203
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Mix source data with different granularity into the same fact table?

    I have two transaction tables "Incident (157 columns)" and "Unit (70 Colums)". For every "Incident" that happens there could be one or more records in the "Unit" table.
    As part of my data mart design, I have merged both the tables into a single Fact "Incident Fact (227 Columns)" and inserted the records from both the tables with a join condition between them [incident.IN_NUM = Unit.IN_NUM].
    Is this correct, is my question? or am I mixing source data with different granularity in the same fact table. Appreciate your help.
    Best Regards
    Bees

    Bees,
    Are the measures from 'Incident' , repeated for a given incident where it has more than one record in the Unit table ? If so, then the sum(indicent.measure) will give an incorrect result, no ?
    What requirement is there to physically merge the tables together outside of OBIEE? With OBIEE you could have one logical 'fact' table to present to report users, which sourced from seperate Incidents and Units tables and would stop the incorrect aggregations occuring. A common modelling piece in the same way would be Order Headers and Order Lines, quite common in OBIEE to have a logical 'Orders' fact which contained both Order header measures and Order line measures, this translates to your Incidents -> Units relationship.
    To do what I've mentioned, is relatively straight forward, you need a 'Dim - Incident' with two levels, Incident and Unit, mapp the unique identifiers in as the level keys and then use these levels to set the content levels correctly in your 2 logical tables sources for logical 'Fact' , ie Incidents LTS at incident level, Units LTS as units level.
    Hope this helps, let us know if you get stuck.
    Cheers
    Alastair

  • Invoice posting with different currency for the same PO

    Hi,
    Can we post the the Invoice with different currencies for the same PO.
    For example.
    PO has Qty 100 pcs.  amount 100 USD
    GR   Qty 100 pcs.
    Is it possible to post Invoice of 50 pc with 50 USD, and 50pcs with some other currency.
    Any sugggestions pls.
    Thanks,
    Satya

    Hello
    As per my knowledge, that is not possible.
    And in whjat scenario, we need to do that?
    In MIRO header itself we have the vendor currency, so it is not posbile to maintain different currency in different line items in MIRO.
    If you want, you can do MIRO in different currency that what is in PO.
    In the example given, you have o post 2 invoices, one for 50 qty in USD and the other 50 in different currency in other invoice transaction by giving the currency in basic data-invoice header and then only press ENTER after giving the PO number.
    Hope this helps
    Regards

  • How can I share applications and softwares with different users of the same computer?

    First question: How can I share applications and softwares with different users of the same computer?
    Second : Can I use 2 different I cloud accounts to synt 2 iphones with one computer?

    Applications installed on the admin account are available to all user accounts unless Parental Controls are enabled.
    Yes.   Separate user accounts, help here >   How to use multiple iPods, iPads, or iPhones with one computer

  • How to update data in database from different region of the same page

    Hi,
    I have pepared two regions of tabular form based on the same table,each region is selecting different columns of the same table.
    I want to update the values from different regions in the database using single submit button.
    Regards
    Shashi

    I presume that the two regions are working fine with their individual buttons and your issue is how to make them both save with one button.
    Here is how
    a. You will have 2 ApplyMRU and 1 ApplyMRD processes for each of the regions. Right? Lets say you have 2 "Save" (i.e. label=Save) buttons, one has name SUBMIT and the other SAVE ( SUBMIT and SAVE being the requests that will be sent when they are clicked , respectively)
    b. Make the Display condition on one of the buttons 'Never'. Now it won't show when you run the page. Lets say you made SAVE's conditional Display 'Never'
    c. Go and change the condition on all ApplyMRU and ApplyMRD processes from "When Button Pressed" to "Request is contains in Expression1". In Expression1 enter SUBMIT,SAVERegards

  • Sharing iMove Projects Libraries with different users on the same machine

    I was wonder how two different users on the same machine can
    share project libraries. Some Context:
    My daughter has some finished projects in her project library and
    I either want to import those project into my library or share them
    so both user accounts can access the projects (similar to how the
    event library is accessible)
    Note: I've already moving the project library to a shared disk (the one
    the event library is on) with no luck
    Using iMove 09
    tia...

    You need to move each project to the external drive from within iMovie. Be sure to use command-drag so you move, not copy.

  • Several layered effects of the same kind but with different adjustments for the same layer

    Hi,
    I wonder if it there is an easy way to have several different instances of e.g. glow or bevel and emboss on the same layer.
    I know I can achieve this by using smart objects or a duplicate layer with zero blending.
    I just wondered if there is a way to do this directly in the layer effects.

    Hi emil emil,
    thx for your answer!
    I wasn't even refering to different objects on the same layer, btw. it would be enough if I was able to layer e.g. different bevel and emboss on top of each other (With different colors, softness  and size.)  But I guess the answer remains the same.

  • Deploying a copy of existing database with a different name on the same server

    I am a developer(an inexperienced one) trying to understand what is the best way to deploy a brand new database with
    the exact same schema as an existing DB on the same server, but with a different name. I want to preserve the data in all reference tables which I can do by having the relevant post-deployment scripts run after the deployment. 
    What I can't understand is how the project should be set up to deploy database Customer_2 if database Customer_1 exists on
    this server - the Visual Studio project contains DB Customer and I need to find a way to be able to deploy Customer_N (but without creating N identical DB's in the project). I checked a ton of articles and blogs, and feel dumb asking this question but haven't
    been able to understand it yet. Any help would be appreciated.

    Hello,
    Maybe the TargetDatabase and the DeployToDatabase properties can help you.
    http://www.asp.net/web-forms/tutorials/deployment/web-deployment-in-the-enterprise/deploying-database-projects
    You can deploy multiples databases from one project if you want, as explained on the following
    post:
    http://stackoverflow.com/questions/1544966/gdr-deploying-multiple-database-targets-with-one-project
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Error while restoring database with different name on subscriber

    Hi all,
    I am using merge replication in sql server 2008R2. Yesterday I wanted to create a test environment, so
    I did:
    1. on publisher I restored from backup production db with another name ( lets call it TEST and new files
    .mdf, .ldf and no switch KEEP_REPLICATION). After this step original replication between production
    dbs worked fine.
    2. on subscriber I did the same: restore as new db TEST with new
    files .mdf, .ldf and no switch KEEP_REPLICATION.
    Unfortunately I noticed, that after second step replication stopped. SQL agent replication job on Subscriber
    is gone.
    Why restoring db with new name did affect original replication?
    Finally the most important: replication was set up by external company and I have to bring it to live now
    but I don't know this subject so good. How can I do it?
    Assuming, that there is no data change on subscriber in replicated tables is it enough when I select ‘reinitialize’
    on Publisher and Subscriber?
    Thanks in advance
    Artur

    Hello,
    Sorry for late response, but I was out of the office during last week.
    Regarding problem 1: restoring replication. I contacted guy who made originally our replication and he recreated subscription agent. So this is solved.
    problem 2: why did it happen?
    Lydia, in link which you provided I found only info about restoring db in replication, but I didn't want to restore replication.
    I checked SQL Server and Server Agent logs and there were no entries on that time. The only entries are regarding db restoring. Below:
    09/11/2014 12:45:59,Backup,Unknown,Database was restored: Database: Logik_ATData_TEST<c/> creation date(time): 2012/04/27(13:55:41)<c/> first LSN: 21392:66:267<c/> last LSN: 21392:227:1<c/> number of dump devices: 1<c/> device information: (FILE=1<c/> TYPE=DISK: {'D:\MSSQLBackup\Dzienny\Logik_ATData_PROD\Logik_ATData_PROD_backup_2014_09_10_231001_6391536.bak'}). Informational message. No user action required.
    09/11/2014 12:45:59,Backup,Unknown,Restore is complete on database 'Logik_ATData_TEST'. The database is now available.
    09/11/2014 12:45:59,spid72,Unknown,CHECKDB for database 'Logik_ATData_TEST' finished without errors on 2012-04-26 22:50:05.490 (local time). This is an informational message only; no user action is required.
    09/11/2014 12:44:53,spid72,Unknown,Recovery is writing a checkpoint in database 'Logik_ATData_TEST' (13). This is an informational message only. No user action is required.
    09/11/2014 12:44:53,spid72,Unknown,Starting up database 'Logik_ATData_TEST'.
    09/11/2014 12:44:51,spid72,Unknown,The database 'Logik_ATData_TEST' is marked RESTORING and is in a state that does not allow recovery to be run.
    09/11/2014 12:44:51,spid72,Unknown,Starting up database 'Logik_ATData_TEST'.
    In Windows application log there were also no other entries, besides these above.
    I also could not check job history, because the job was gone in SSMS jobs list, while the subscription was present in SSMS Replication with info, that last successful synchronization was at 12:42 (there is a 5 min. sync period).
     I also don't understand how the job was deleted, because according this manual (http://www.mssqltips.com/sqlservertip/1803/auto-alert-for-sql-agent-jobs-when-they-are-enabled-or-disabled/) I have 2 triggers in sysjobs table and every time, when
    job is deleted/disabled I got @ notification. In this case I got no @.
    My SQL Server version:
    Product_Version Product_Level Edition
    10.50.2550.0 SP1 Standard Edition (64-bit)
    Any idea what happened?
    Thanks,
    Artur

  • Multiple oracle database instances with different characterset on  the same server

    Hello,
    Is it possible to have 2 database instances running with different charactersets,one with AL32UTF8 and the other with WE8MSWIN1252.?
    Are there any setup requirements to be performed prior to setting up the database instances?
    The 3rd party utility that we want to use does not support AL32UTF8 and insists on using a database with character set WE8MSWIN1252.
    Kindly help.
    Thanks,
    Ram.

    Hello Zhe,
    I guess I posted my question in a wrong forum.  I tried my best to find a suitable forum and thought this was the best and closest I found.  Apparently not.  Can you please let me know the right forum for my question?
    The below is the breif of what we are currently facing:
    We are in the process of finalizing plans to install Automic for our Retail applications to schedule jobs.  In the process came to know that Automic does not support AL32UTF8.
    Right now we have RMS and UC4 (now called Automic) run on the database server as UC4 supports AL32UTF8 and schema for UC4 is inside the RMS database.
    Going forward it is recommended to have a separate database instance on the same server as that of RMS database and with a different characterset which is WE8MSWIN1252.
    Please let me know what forum to post in, I will repost the question.
    Thanks,
    Ram.

Maybe you are looking for

  • Switching airport cards to solve 10.5.2 network issue

    Ever since 10.5.2, i can no longer get online on various routers. my friend who has also updated can get on these same networks that i can't. i have a macbook w/ the following airport card: AirPort Extreme (0x168C, 0x87) Firmware Version: 1.2.2 Wirel

  • Oracle spatial query with php

    Hello, I have this problem, I use php for read data from oracle table, all works right, I have any problem whith varchar number type data, but when I must read geometry data like (type MDSYS.SDO_GEOMETRY) I can't display it on the web page. esemple o

  • Protocol Identification

    I´m tryng to use the automotive diagnostic library to create a diagnostic tool using the NI USB-8473. The problem is that i couldn´t identy de protocol that the car is usyng. So I used created a logging VI to see the bus traffic while another diagnos

  • Upgraded storage not showing up

    iPhone 4S. I purchased/upgraded iCloud storage to 20GB. However, the new storage is not showing up. What do I do?

  • Tags created in Organizer missing from Window folder details

    I am using Photoshop 5 and regularly tagging all input.  When I use windows to see the list of what files are in a folder only a few of the tags are listed? I do not understand.