Showing posts with label master. Show all posts
Showing posts with label master. Show all posts

Wednesday, March 28, 2012

How Can I recover master database from master's backup?

I did a new instalation, and I want to recover master
database from master's backup, but the system show me the
next message RESTORE DATABASE must be in single user mode
when trying to restore the master database.
It's very important to me get information about the
aplication's users but I can't do that.
The system don't permit to put in single user mode to
master then I don't no what to do for resolving this.
Somebody Help me ?
Thanks LorenaSee my other post. No need to re-post.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Lorena" <anonymous@.discussions.microsoft.com> wrote in message
news:bba401c40dea$4e4130a0$a001280a@.phx.gbl...
> I did a new instalation, and I want to recover master
> database from master's backup, but the system show me the
> next message RESTORE DATABASE must be in single user mode
> when trying to restore the master database.
> It's very important to me get information about the
> aplication's users but I can't do that.
> The system don't permit to put in single user mode to
> master then I don't no what to do for resolving this.
> Somebody Help me ?
> Thanks Lorena
>sql

How can I read value from one XML and assign to another XML.

I need to read value from one master XML and assign to another XML.

I am planning to move some of my application's business logic to SQL Server side.

I have informations stored in xml field. There is a procedure which accepts the xml input, and return the xml with values from the master xml. Please help me to achieve this.

-- master XML

declare @.x_master xml

set @.x_master='<ROOT><NAME>111</NAME><ADDRESS>2222</ADDRESS><TYPE>3333</TYPE><COUNTRY/></ROOT>'

-- input XML (this can be any tag from the master XML)

declare @.x xml

set @.x='<ROOT><NAME></NAME><ADDRESS/></ROOT>'

--set @.x='<ROOT><NAME/><COUNTRY/></ROOT>'

--set @.x='<ROOT><ADDRESS/><COUNTRY/><TYPE/></ROOT>'

It sounds like you want to interpret <ROOT><NAME></NAME><ADDRESS/></ROOT> as a query. You could generate XQuery by concatenating strings together. You could insert path expressions into the context of <NAME></NAME>. But you need to make sure it is safe from SQL injection since you will be dynamically constructing SQL/XQuery using string concatenation.

sql