myLittleTools Community Forum

Welcome Guest Search | Active Topics | Members | Log In | Register

Permission Problem to restore a database Options · View
counterf
Posted: Monday, November 29, 2010 3:04:58 PM
Rank: Newbie
Groups: Member

Joined: 11/27/2010
Posts: 2
Points: 6
Hi, im just testing mylittleadmin with plesk 10 hosting system. I Integrate sucefull with MS SQL server 2008 but im problem with Integrating of MS SQL 2005

When a try to restore a database with a user have full permission in this database a get this error

.Net SqlClient Data Provider

User does not have permission to RESTORE database '2oo5'.
RESTORE DATABASE is terminating abnormally.

USE [master]
GO

ALTER DATABASE [2oo5]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
GO

RESTORE DATABASE [2oo5]
FROM DISK=N'C:\Inetpub\vhosts\sqladmin\myLittleAdmin\mla_sql_3.7\upload\634266141455156250_backup.bak'
WITH RECOVERY
, REPLACE
, MOVE N'AFI_log' TO N'c:\Program Files\Parallels\Plesk\Databases\MSSQL\MSSQL.1\MSSQL\DATA\2oo5_log.LDF'
, MOVE N'AFI' TO N'c:\Program Files\Parallels\Plesk\Databases\MSSQL\MSSQL.1\MSSQL\DATA\2oo5.mdf'
, NOUNLOAD, STATS = 10
GO

USE [2oo5]
GO

EXEC sp_changedbowner 'sa'

USE [master]
GO

ALTER DATABASE [2oo5]
SET MULTI_USER
GO





BUT if i try to restore using "sa" user i can restore with sucefull.
I think problem is configuration.


This is my config.xml

<myLittleAdmin>

<sqlservers>
<sqlserver
address="Localhost"
name="SQL 2005"
sysadminconnection="true"
sysadminconnectionid="1"
/>
<sqlserver
address=".\MSSQLSERVER2008"
name="SQL 2008"
sysadminconnection="true"
sysadminconnectionid="1"
/>
</sqlservers>

<languages>
<language culture="en-US" name="English" default="true" />
<language culture="fr-FR" name="French" />
<language culture="de-DE" name="Deutsch" />
<language culture="ja-JP" name="Japanese" />
</languages>

<skins>
<skin folder="default" name="default" />
</skins>

<profiles>
<profile id="default" location="xml/profiles/default.xml" />
</profiles>

<dateformats>
<dateformat format="%Y%m%d %H:%M" name="20061026 17:52" />
<dateformat format="%Y/%m/%d %H:%M" name="2006/10/26 17:52" />
<dateformat format="%Y/%m/%d %I:%M %p" name="2006/10/26 5:52 PM" />
<dateformat format="%d/%m/%Y %H:%M" name="26/10/2006 17:52" />
<dateformat format="%d/%m/%Y %I:%M %p" name="26/10/2006 5:52 PM" />
<dateformat format="%m/%d/%Y %H:%M" name="10/26/2006 17:52" />
<dateformat format="%m/%d/%Y %I:%M %p" name="10/26/2006 5:52 PM" />
</dateformats>

<csvseparators>
<csvseparator value="{SEMICOLON}" name=";" />
<csvseparator value="{COMMA}" name="," />
<csvseparator value="{TAB}" name="{TAB}" />
</csvseparators>

<tools>
<backupwh
backupfolder="C:\Inetpub\vhosts\sqladmin\myLittleAdmin\mla_sql_3.7\upload\"
backupurl="http://XXXXX"
usesysadminconnection="true"
/>
<restorewh
uploadfolder="C:\Inetpub\vhosts\sqladmin\myLittleAdmin\mla_sql_3.7\upload\"
deleteafterrestore="true"
usesysadminconnection="true"
/>
<mylittlebackup
url="http://localhost/mlb/silentlogon.aspx"
/>
<newquery
rowcountdefaultvalue="0"
textsizedefaultvalue="2147483647"
/>
</tools>

<connection>
<authentications>
<authentication value="sql" name="lSqlAuthentication" localization="true" />
</authentications>
<protocols>
<protocol value="" name="lDefault" localization="true" />
<protocol value="dbnmpntw" name="lNamedPipes" localization="true" />
<protocol value="dbmsrpcn" name="lMultiprotocol" localization="true" />
<protocol value="dbmsadsn" name="lAppleTalk" localization="true" />
<protocol value="dbmsgnet" name="lVIA" localization="true" />
<protocol value="dbmslpcn" name="lSharedMemory" localization="true" />
<protocol value="dbmsspxn" name="lIPXSPX" localization="true" />
<protocol value="dbmssocn" name="lTCPIP" localization="true" />
</protocols>
<packetsize value="4096" />
<connectiontimeout value="15" />
<executiontimeout value="0" />
<debug value="false" />
<checkmssqlversion
value="true"
mla2000url="http://localhost/mla_2000/silentlogon.asp"
/>
<askdb value="true" />
</connection>

</myLittleAdmin>



This is my webconfig

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<appSettings>
<add key="Version" value="3.7" />
<add key="Release" value="0069" />
<add key="Build" value="3833" />
<!-- Sysadmin connection value //-->
<add key="SysAdminLogin_1" value="sa" />
<add key="SysAdminPassword_1" value="15935789" />
<add key="SysAdminLogin_2" value="sa" />
<add key="SysAdminPassword_2" value="15935789" />
</appSettings>

<system.web>
<pages
validateRequest="false"
smartNavigation="false"
theme=""
/>

<compilation defaultLanguage="c#" debug="true" />

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="en-US"
/>

<customErrors mode="RemoteOnly" defaultRedirect="./error/index.html">
<error statusCode="404" redirect="./error/404.html"/>
</customErrors>

<authorization>
<allow users="?" />
</authorization>

<machineKey
validationKey="5C7EEF6650639D2CB8FAA0DA36AF24452DCF69065F2EDC2C8F2F44C0
220BE2E5889CA01A207FC5FCE62D1A5A4F6D2410722261E6A33E77E0628B17AA928039B
F"
decryptionKey="DC47E74EA278F789D2FF0E412AD840A89C10171F408D8AC4"
validation="SHA1" />

<httpRuntime
maxRequestLength="204800"
/>

<browserCaps>
<!--
Name: BrowserCaps update for modern browsers, http://slingfive.com/pages/code/browserCaps/
Author: Rob Eberhardt, http://slingfive.com/
History:
2004-11-19 improved detection of Safari, Konqueror &amp; Mozilla variants, added Opera detection
2003-12-21 updated TagWriter info
2003-12-03 first published
-->
<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firefox, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))?">
browser=Gecko
<filter>
<case match="(Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))">
type=${type}
</case>
<case> <!-- plain Mozilla if no VendorProductToken found -->
type=Mozilla
</case>
</filter>
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=0${major}
minorversion=0${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
<!-- AppleWebKit Based Browsers (Safari...) //-->
<case match="AppleWebKit/(?'version'(?'major'\d?)(?'minor'\d{2})(?'letters'\w*)?)">
browser=AppleWebKit
version=${version}
majorversion=0${major}
minorversion=0.${minor}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))(.* )?(?'type'[^/\d]*)/.*( |$)">
type=${type}
</case>
</case>
<!-- Konqueror //-->
<case match=".+[K|k]onqueror/(?'version'(?'major'\d+)(?'minor'(\.[\d])*)(?'letters'[^;]*));\s+(?'platform'[^;\)]*)(;|\))">
browser=Konqueror
version=${version}
majorversion=0${major}
minorversion=0${minor}
platform=${platform}
type=Konqueror
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
</case>
<!-- Opera //-->
<case match="Opera[ /](?'version'(?'major'\d+)(?'minor'\.(?'minorint'\d+))(?'letters'\w*))">
<filter match="[7-9]" with="${major}">
tagwriter=System.Web.UI.HtmlTextWriter
</filter>
<filter>
<case match="7" with="${major}">
<filter>
<case match="[5-9]" with="${minorint}">
ecmascriptversion=1.5
</case>
<case>
ecmascriptversion=1.4
</case>
</filter>
</case>
<case match="[8-9]" with="${major}">
ecmascriptversion=1.5
</case>
</filter>
</case>
</browserCaps>
</system.web>

<system.webServer>
<httpErrors errorMode="DetailedLocalOnly" defaultPath="./error/404.html" defaultResponseMode="ExecuteURL">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="./error/404.html" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>

</configuration>



I want buy the Mylittleadmin, but before i need be sure mylittleadmin works with plesk 10.
Thanks alot
counterf
Posted: Monday, November 29, 2010 8:06:21 PM
Rank: Newbie
Groups: Member

Joined: 11/27/2010
Posts: 2
Points: 6
Hellow. I solved the problem changing this in my config.xml


Before
Quote:
<myLittleAdmin>

<sqlservers>
<sqlserver
address="Localhost"
name="SQL 2005"
sysadminconnection="true"
sysadminconnectionid="1"
/>


After


Quote:
<myLittleAdmin>

<sqlservers>
<sqlserver
address="."
name="SQL 2005"
sysadminconnection="true"
sysadminconnectionid="1"
/>


Can admin explain what is the function of sysadminconnection="true"
and sysadminconnectionid="1" ??
elian
Posted: Tuesday, November 30, 2010 7:50:46 AM

Rank: Administration
Groups: Administration

Joined: 9/11/2006
Posts: 605
Points: 649
Location: Enghien Les Bains, France
Backuping or restoring a db requires a high permission level. Most of the time, in a shared sql environment, users do not have these privileges. Thus, myLittleAdmin offers the ability to use a sysadmin connection to perform the backup and/or restore.
This is fully explained in the installation guide, pages 5-12

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Theme created by myLittleTools
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.