Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Wednesday, March 21, 2012

Retrieving rdl from Server

I did a dumb thing and managed to clear out a file with a bunch of reports in it. We are having problems pulling the reports from the backup tapes. Is there a way to retrieve the rdl from the report server? It is about 12 reports and I would rather not have to recreate them.

There are many ways to retrieve the RDLs from the report server (assuming you have permissions beyond just "Browser" permissions).

* Manual retrieval:
You can retrieve the RDL for published reports by switching to the details view in report manager (http://localhost/Reports/Pages/Folder.aspx?ViewMode=Detail) and then clicking the edit icon next to the report you are interested in. This will bring up the "report properties" page. On the general tab of that page, there is a "Report Definition" section with an "Edit" button. Click on the "Edit" button and you can retrieve the RDL file from the ReportServer.

* Management Studio:
With the SQL Server 2005 Management Studio you can connect to the report server and manage your reports (including retrieving RDLs).

* SOAP API:
You can use the SSRS SOAP API to retrieve report definitions. Use the GetReportDefinition method: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_2eew.asp

* RS Scripter tool:
Download Jasper Smith's RS Scripter tool: http://www.sqldbatips.com/showarticle.asp?ID=62

-- Robert

|||I should have mentioned that I am running RS2000 sorry. The Scripting tool was extrememely helpful though.sql

Monday, March 12, 2012

retrieving backup

Hi All

Bit of a situation so hopefully someone can advise.

I've a client who has a sql 2000 database that *unfortunately* hasn't
had a backup procedure in place. Its been running for just over a year
and on Monday it got, well, screwed. They have a 50 gig ldf file.
Yes, 50 gig. Is it possible to put in place a database maintenance
plan that will allow me to roll back to, say, last friday just from the
ldf file?

Thoughts? Any advice would be welcome.

MTIA

Mark<mark_drewersback@.yahoo.co.uk> wrote in message
news:1117042116.016174.212890@.g49g2000cwa.googlegr oups.com...
> Hi All
> Bit of a situation so hopefully someone can advise.
> I've a client who has a sql 2000 database that *unfortunately* hasn't
> had a backup procedure in place. Its been running for just over a year
> and on Monday it got, well, screwed. They have a 50 gig ldf file.
> Yes, 50 gig. Is it possible to put in place a database maintenance
> plan that will allow me to roll back to, say, last friday just from the
> ldf file?
> Thoughts? Any advice would be welcome.
> MTIA
> Mark

Most of the transactions in the log have presumably already been committed
to the database, so you could try sp_attach_db and/or
sp_attach_single_file_db, but there's no guarantee they will work (and you
don't say exactly what "screwed" means, so you might not even have the .mdf
anyway).

Apart from that, your most best option is probably to call Microsoft and see
what they can do - there's no other way to recover data directly from
unattached mdf/ldf files. If there's a year's worth of business data in
there, then the cost of getting Microsoft involved is most likely negligible
compared to the value of the data.

Simon|||By screwed, I mean, the app that is running from it is now reporting
duplicate primary key errors. We have the mdf file. What I'd like to
know is if we succesfully restored it using the mdf/ldf file then would
it be possible to roll back to the previous Friday, when it was running
fine, given that no back ups have taken place?

Thoughts?|||(mark_drewersback@.yahoo.co.uk) writes:
> By screwed, I mean, the app that is running from it is now reporting
> duplicate primary key errors. We have the mdf file. What I'd like to
> know is if we succesfully restored it using the mdf/ldf file then would
> it be possible to roll back to the previous Friday, when it was running
> fine, given that no back ups have taken place?

If there had been been a one-year old backup, and an unbroken transaction
log since then, yes.

If there is no backup at all, I don't think you can do it with the commands
that ships with SQL Server.

However, there are 3rd party tools out there that can read the transaction
log, and generate commands to undo transactions in the transaction log.
Lumigent Log Explorer (www.lumigent.com) has been in business for a long
time. Log Pi (www.logpi.com) is another alternative.

I would suggest that the best to examine more close why you get PK
duplicates.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Friday, March 9, 2012

Retrieving a Stored Procedure from a backup

Is anyone able tell me whether I can retrieve a particular stored procedure
from a backup?
Any help, much appreciated.
Sure. You will first have to restore the database somewhere. Then you can
perform a sp_helptext on the stored procedure.
Keith
"Steven Jones" <Steven Jones@.discussions.microsoft.com> wrote in message
news:68287033-57A5-4035-911B-DEED09D0EA15@.microsoft.com...
> Is anyone able tell me whether I can retrieve a particular stored
procedure
> from a backup?
> Any help, much appreciated.
|||Go for a BMC Product Microsoft SQL BACK TRACK
you can do object level recovery using that .
Thanks
Ajay
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:OqRB5199EHA.2568@.TK2MSFTNGP11.phx.gbl...
> Sure. You will first have to restore the database somewhere. Then you
can
> perform a sp_helptext on the stored procedure.
> --
> Keith
>
> "Steven Jones" <Steven Jones@.discussions.microsoft.com> wrote in message
> news:68287033-57A5-4035-911B-DEED09D0EA15@.microsoft.com...
> procedure
>

Retrieving a Stored Procedure from a backup

Is anyone able tell me whether I can retrieve a particular stored procedure
from a backup?
Any help, much appreciated.Sure. You will first have to restore the database somewhere. Then you can
perform a sp_helptext on the stored procedure.
Keith
"Steven Jones" <Steven Jones@.discussions.microsoft.com> wrote in message
news:68287033-57A5-4035-911B-DEED09D0EA15@.microsoft.com...
> Is anyone able tell me whether I can retrieve a particular stored
procedure
> from a backup?
> Any help, much appreciated.|||Go for a BMC Product Microsoft SQL BACK TRACK
you can do object level recovery using that .
Thanks
Ajay
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:OqRB5199EHA.2568@.TK2MSFTNGP11.phx.gbl...
> Sure. You will first have to restore the database somewhere. Then you
can
> perform a sp_helptext on the stored procedure.
> --
> Keith
>
> "Steven Jones" <Steven Jones@.discussions.microsoft.com> wrote in message
> news:68287033-57A5-4035-911B-DEED09D0EA15@.microsoft.com...
> procedure
>

Retrieving a Stored Procedure from a backup

Is anyone able tell me whether I can retrieve a particular stored procedure
from a backup?
Any help, much appreciated.Sure. You will first have to restore the database somewhere. Then you can
perform a sp_helptext on the stored procedure.
--
Keith
"Steven Jones" <Steven Jones@.discussions.microsoft.com> wrote in message
news:68287033-57A5-4035-911B-DEED09D0EA15@.microsoft.com...
> Is anyone able tell me whether I can retrieve a particular stored
procedure
> from a backup?
> Any help, much appreciated.|||Go for a BMC Product Microsoft SQL BACK TRACK
you can do object level recovery using that .
Thanks
Ajay
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:OqRB5199EHA.2568@.TK2MSFTNGP11.phx.gbl...
> Sure. You will first have to restore the database somewhere. Then you
can
> perform a sp_helptext on the stored procedure.
> --
> Keith
>
> "Steven Jones" <Steven Jones@.discussions.microsoft.com> wrote in message
> news:68287033-57A5-4035-911B-DEED09D0EA15@.microsoft.com...
> > Is anyone able tell me whether I can retrieve a particular stored
> procedure
> > from a backup?
> >
> > Any help, much appreciated.
>

Retrieving a saved MSSQL database from another hard drive after re-formatting

I had to re-format my main hard drive after a crash. How
can I restore the MSSQL database which I had saved in a
Backup on my second hatd drive? I had re-named my computer
the Operating System of which is Windows 2000
Professional. The CPU is an Intel Celeron 1.1 Ghz with 1.5
GB of RAM available.Install SQL Server again. Then use the RESTORE DATABASE command to restore your database backups.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"L. Dettering" <ldettering@.sympatico.ca> wrote in message news:15aa701c44711$534c6c30$a401280a@.phx.gbl...
> I had to re-format my main hard drive after a crash. How
> can I restore the MSSQL database which I had saved in a
> Backup on my second hatd drive? I had re-named my computer
> the Operating System of which is Windows 2000
> Professional. The CPU is an Intel Celeron 1.1 Ghz with 1.5
> GB of RAM available.
>

Retrieveing objects

Dears,
I created a table, then dropped it by mistake. Is there any way to retrieve it back using the log file? The lat DB backup was made before creating the table.
Thanks,1. Take a log backup
2. make another database and restore the previous full backup over there as you would not want to make any changes to the original db
3. restore transaction log to a time before you dropped the table
4. copy table onto original database

tell me if you need any other help|||When applying the backup, through the Enterprise Manager, I had the "Point in time restore" option disabled. Have an idea why? Do you think making the backup through the T-SQL better?

Originally posted by Enigma
1. Take a log backup
2. make another database and restore the previous full backup over there as you would not want to make any changes to the original db
3. restore transaction log to a time before you dropped the table
4. copy table onto original database

tell me if you need any other help|||Question : What is your database recovery model

Simple , Full or Bulk Logged

Give me a list of the things you have done till now ...

Wednesday, March 7, 2012

Retrieve the logical file name from a backup device

Hi,
I'm working on some "daemon" able to restore whatever come into a given
folder to a "stand-by" SQL Server (sort of log shipping, but also to restore
full backup and so on).
I'm now faing a problem : I can't put the logical name of the database from
the backup file to a variable.
Here a sample of what I 'm trying to do :
--
DECLARE @.Data_file nvarchar (256)
create table #result
(
LogicalName varchar(512),
PhysicalName varchar(512),
Type varchar(1),
FileGroupName nvarchar(50),
Size int,
Maxsize int
)
insert into #result EXEC (restore filelistonly from disk='X:\file.bak')
--
(please note that table declaration, variable delclaration, etc may be
weird, but it's purely test code to try validate my concept.
Each time I got the following error :
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'restore'.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ')'.
As RESTORE filelistonly is, from BOL, returning a dataset, I was expecting
to be able to load into a table, or to be able to extract data from it
easily.
I do not know where to look at, any help will be welcome,
Thanks,
ChrisSee "RESTORE FILELISTONLY " in BOL.
AMB
"Chris V." wrote:

> Hi,
> I'm working on some "daemon" able to restore whatever come into a given
> folder to a "stand-by" SQL Server (sort of log shipping, but also to resto
re
> full backup and so on).
> I'm now faing a problem : I can't put the logical name of the database fro
m
> the backup file to a variable.
> Here a sample of what I 'm trying to do :
> --
> DECLARE @.Data_file nvarchar (256)
> create table #result
> (
> LogicalName varchar(512),
> PhysicalName varchar(512),
> Type varchar(1),
> FileGroupName nvarchar(50),
> Size int,
> Maxsize int
> )
> insert into #result EXEC (restore filelistonly from disk='X:\file.bak')
> --
> (please note that table declaration, variable delclaration, etc may be
> weird, but it's purely test code to try validate my concept.
> Each time I got the following error :
> Server: Msg 156, Level 15, State 1, Line 1
> Incorrect syntax near the keyword 'restore'.
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near ')'.
>
> As RESTORE filelistonly is, from BOL, returning a dataset, I was expecting
> to be able to load into a table, or to be able to extract data from it
> easily.
> I do not know where to look at, any help will be welcome,
> Thanks,
> Chris
>
>|||Hi Alejandro,
That's what I;ve done, bout couldn't find the way to have the following
result :
SELECT @.DATE_FILE =SELECT LogicalName from EXEC(RESTORE FILELISTONLY from
DISK='File') where TYPE='D'
I'm desperate :)
Thanks,
Chris
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> a crit dans le
message de news:99C7DE87-8022-4F37-A797-F99296625772@.microsoft.com...
> See "RESTORE FILELISTONLY " in BOL.
>
> AMB
> "Chris V." wrote:
>
restore
from
expecting|||Try,
use northwind
go
create table #t (
LogicalName sysname,
PhysicalName sysname,
Type char(1),
FileGroupName sysname null,
[Size] bigint,
[MaxSize] bigint
)
insert into #t
execute sp_executesql N'use master restore filelistonly from mydump'
select
*
from
#t
drop table #t
go
AMB
"Chris" wrote:

> Hi Alejandro,
> That's what I;ve done, bout couldn't find the way to have the following
> result :
> SELECT @.DATE_FILE =SELECT LogicalName from EXEC(RESTORE FILELISTONLY from
> DISK='File') where TYPE='D'
> I'm desperate :)
> Thanks,
> Chris
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> a écrit dans l
e
> message de news:99C7DE87-8022-4F37-A797-F99296625772@.microsoft.com...
> restore
> from
> expecting
>
>|||Works perfectly !
Thanks
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:E686C7EB-957F-4A14-BEA2-6C86F80B1D3F@.microsoft.com...
> Try,
> use northwind
> go
> create table #t (
> LogicalName sysname,
> PhysicalName sysname,
> Type char(1),
> FileGroupName sysname null,
> [Size] bigint,
> [MaxSize] bigint
> )
> insert into #t
> execute sp_executesql N'use master restore filelistonly from mydump'
> select
> *
> from
> #t
> drop table #t
> go
>
> AMB
> "Chris" wrote:
>
from
le
given
database
disk='X:\file.bak')
be
it