Installing MSDE - User Security Issues...

From: joseph (anonymous_at_discussions.microsoft.com)
Date: 12/12/03

  • Next message: Glen Warapius: "RE: Unable to set the SQL Agent proxy account"
    Date: Fri, 12 Dec 2003 07:52:19 -0800
    
    

    The login SID's don't match. Each authorized user has a
    unique SID that is stored in each of the databases. You
    need to run sp_change_users_login for each of the users.

    >-----Original Message-----
    >Hi,
    >
    >Could someone point me in the direction of a step-by-step
    tutorial for
    >replicating a SQL Server 2000 database as an MSDE
    database in a seperate
    >machine, with all tables (including data),
    users/security, etc.
    >
    >Currently I'm taking a backup (I can't script the data
    from Ent. Mgr) and
    >using oSQL to restore the database to an MSDE install on
    a machine.
    >
    >It's done in two steps - installing MSDE and restoring
    the backup. However,
    >after the backup has been restored (the user restores
    correctly) - I am
    >unable to connect to the database as the default user
    that I created in the
    >backup. If I remove the user and re-add him via Ent. Mgr
    then I can
    >connect... does anyone know why this is?
    >
    >First Step - Install MSDE script:
    >^^^^^^^^^^^^^^^^^^^^^^^^
    >Set objShell = CreateObject("WScript.Shell")
    >Set fso = createobject("scripting.filesystemobject")
    >Set WshNetwork = WScript.CreateObject("WScript.Network")
    >
    >objShell.Exec(fso.getabsolutepathname(".") & "\setup.exe
    BLANKSAPWD=1
    >SAPWD="""" SECURITYMODE=SQL TARGETDIR=""C:\Program
    Files\Microsoft SQL
    >Server\Mssql\Binn\"" DATADIR=""C:\Program Files\Microsoft
    SQL
    >Server\Mssql\Data\"" instancename=""" &
    WshNetwork.ComputerName &
    >"\DatabaseName""")
    >
    >Second Step - Restore the database backup:
    >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >Set objShell = CreateObject("WScript.Shell")
    >set fso = createobject("scripting.filesystemobject")
    >Set WshNetwork = WScript.CreateObject("WScript.Network")
    >
    >currentpath = fso.getabsolutepathname(".")
    >
    >' Start the msde service
    >objShell.Exec("net start MSSQL$" &
    WshNetwork.ComputerName &
    >"\DatabaseName")
    >
    >' Make local data and backup directories
    >'objShell.Exec("md c:\SQL_Databases\DATA")
    >'objShell.Exec("md c:\SQL_Databases\BACKUP")
    >
    >' Copy this Repository.bak to the SQL_Databases
    DatabaseName.bak
    >fso.CopyFile currentpath &
    >"\Repository.bak","c:\SQL_Databases\BACKUP\DatabaseName.ba
    k"
    >
    >' Restore
    >objShell.Exec(currentpath & "\osql.exe -S" &
    WshNetwork.ComputerName &
    >"\DatabaseName -E -Q ""restore database DatabaseName from
    disk =
    >'C:\SQL_Databases\BACKUP\DatabaseName.bak'""")
    >
    >
    >
    >
    >------------
    >
    >
    >All I want to do is reproduce one of my SQL Server
    databases AS IS on
    >several client workstations by way of an MSDE installer.
    >
    >Any help gratefully appreciated !
    >
    >Thanks,
    >
    >Mike
    >
    >xposted to closely related
    groups: .sqlserver.msde, .sqlserver.security,
    >..sqlserver.setup
    >--
    >
    >Liddle Feesh
    >*fap fap fap fap*
    ><>< <>< <>< <>< ><>
    > <>< <>< <>< <>< <>< <><
    > . ,
    > .:/
    > . ,,///;, ,;/
    > . o:::::::;;///
    > >::::::::;;\\\
    > ''\\\\\'" ';\
    > ';\
    >
    >
    >.
    >


  • Next message: Glen Warapius: "RE: Unable to set the SQL Agent proxy account"

    Relevant Pages

    • Re: Restoring SQL Server Backups
      ... ORIGINAL BACKUP & RESTORE (MSDE Database) ... occurrenceof cachestore flush for the 'Object Plans' cachestore (part ...
      (microsoft.public.sqlserver.server)
    • Re: Restoring SQL Server Backups
      ... ORIGINAL BACKUP & RESTORE (MSDE Database) ... occurrenceof cachestore flush for the 'Object Plans' cachestore (part ...
      (microsoft.public.sqlserver.server)
    • Re: POINT IN TIME RESTORE
      ... This is what you should have done in order to do the restore as you wish: ... > 3- erase data ... > 5- restore database with norecovery ... The BACKUP DATABAE can of course be at an earlier point in time, ...
      (microsoft.public.sqlserver.server)
    • Re: Backing up MSDE using Vb.Net
      ... check out the BACKUP DATABASE and BACKUP LOG commands. ... order to restore, you'll use the inverse functions, RESTORE Database. ... down and if you have another machine to back it up to, why not just use MSDE ...
      (microsoft.public.dotnet.general)
    • Re: how to do backup of msde?
      ... I can't give you a complete answer as there are others better suited to explain however in general terms when you detach a database the logs files are flushed, statistics updated and completed transactions committed to the database. ... In my experience most backup regimes involve stopping the server processes, backing up all MDF & LDF database files required and then restarting the server processes. ... >we use Protection Pilot, it installs a MSDE that it uses ...
      (microsoft.public.sqlserver.msde)

  • Quantcast