+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Cloning site

Cloning site

5 posts, 0 answered
  1. John
    John avatar
    97 posts
    Registered:
    11 Jan 2011
    22 Jul 2012
    Link to this post

    Hi
    SF 4.1.
    I need to clone my existing site. I copied both the site and backend sql server db then replaced in my cloned site all references to old db with the new db including in data configuration file. Problem is when I run the cloned site I get the error below at the end. What am I missing in getting the cloned site to run please?
    Thanks
    Regards


    Database 'site_db_dev' already exists. Choose a different database name.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
     
    Exception Details: Telerik.OpenAccess.RT.sql.SQLException: Database 'site_db_dev' already exists. Choose a different database name.
     
    Source Error:
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
     
    Stack Trace:
     
     
    [SQLException: Database 'site_db_dev' already exists. Choose a different database name.]
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.executeUpdate(String sql) +191
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.execute(String sql) +5
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.ExecuteSqlScript(String script, Connection con, SqlDriver sqlDriver, Boolean noShredder) +309
     
    [OpenAccessException: SQL exception on 'CREATE DATABASE site_db_dev' : Database 'site_db_dev' already exists. Choose a different database name.]
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +7
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.throwBuildException(String str, Exception e) +29
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.ExecuteSqlScript(String script, Connection con, SqlDriver sqlDriver, Boolean noShredder) +364
       OpenAccessRuntime.DataObjects.tools.ant.DatabaseCreationTask.createDatabase() +1062
     
    [OpenAccessException: Telerik.OpenAccess.OpenAccessException: SQL exception on 'CREATE DATABASE site_db_dev' : Database 'site_db_dev' already exists. Choose a different database name.]
       DynamicModule.ns.Wrapped_OpenAccessMetaDataProvider_4145b3243aee4029b51840c99b7a563a.Initialize(String providerName, NameValueCollection config, Type managerType) +197
       Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) +1250
       Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) +63
       Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +297
       Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +131
       Telerik.Sitefinity.Data.Metadata.MetadataManager..ctor() +12
     
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
       System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
       System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
       System.Activator.CreateInstance() +103
       Telerik.Sitefinity.Data.ManagerBase`1.GetManager(String providerName, String transactionName) +80
       Telerik.Sitefinity.Services.SystemManager.Initialize() +171
       Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +261
       Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +238
       Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +115
       System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +517
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253
     
    [HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9013676
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    24 Jul 2012
    Link to this post
    Hi Yahua,

    I have answered you in the support thread.

    Regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Shane
    Shane avatar
    9 posts
    Registered:
    17 Jul 2012
    15 Aug 2012
    Link to this post
    Not to necro this post but if others are having a similar issue saying you answered it elsewhere and not linking or duplicating the information is frustrating.
  4. Aruna
    Aruna avatar
    3 posts
    Registered:
    18 Jul 2012
    26 Sep 2013 in reply to Victor Velev
    Link to this post
    I am also facing the same issue. can you please let us know the solution
  5. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    Registered:
    04 Jan 2016
    01 Oct 2013
    Link to this post
    Hi,

    The error in the initial post shows us that the system is trying to create the project's database again. Can you make sure that the connection string in the DataConfig ( or in the webconfig if you have such ) point to the same database on the proper server. 

    If you are want to successfully clone your website, you can follow these steps:

    1. Copy the folder containing the project files.
    2. Create a backup of the database.

    3. Set the site on the new environment.
    4. Restore the backed up database. Verify that the users managing the database exist in the new environment, as well as the schema.
    5. Edit the connection string in the DataConfig and in the webconfig ( if you have set it there ).
    6. Run the site in VS or IIS. If you are running it on IIS, review the following article to make sure that it is properly set:

    http://www.sitefinity.com/blogs/joshmorales/posts/11-02-22/installing_sitefinity_4_on_iis_7.aspx

     

    Regards,
    Atanas Valchev
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
5 posts, 0 answered