Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

missing tables and stored procedures after restoring database
I have been running a desktop PC with MSDE 1.0 installed.  I had made a
backup of the data using a t-sql command backup database ...  Since this PC
had crashed and has subsequently been rebuilt, I have restored the database
but found that vital tables and stored procedures are missing.  The missing
tables were not allegedly owned by dbo but perhaps had no owner(?)  PS I log
into the database as user sa.

Any help in recovering those missing tables and stored procedures would be
greatly appreciated.

Report this thread to moderator Post Follow-up to this message
Old Post
Old Paulie
08-26-05 12:23 PM


Re: missing tables and stored procedures after restoring database
use restore headeronly command on the backup file To check when the
backup was taken  looks like you haven't backed up the database when
you created the tables whcih you said you were missing or you have
restored
an earlier backup not  the latest once since you are the Sysadmin u can
view all the tables created with any login and if you want to have
information
about the latest  backup taken check out the one with
Use Msdb
select *from backupset
order by backup_finish_date desc


Report this thread to moderator Post Follow-up to this message
Old Post
saradhi
08-26-05 12:23 PM


Re: missing tables and stored procedures after restoring database
If they're missing after a restore then they were not there at the time
of the back and are now gone forever (presumedly they were created after
the backup you used to restore the DB).  Do you have any later backups?

BTW, every table & proc in a DB has an owner.  To be sure you're just
not missing it in whatever client-side tool you're using execute this T-SQL:

select o.[name] as tablename, u.[name] as ownername, type
from dbo.sysobjects as o
inner join dbo.sysusers as u on o.uid = o.uid
order by type, u.[name], o.[name]

Have a look to see if you can see the proc (type P) or the table (type
U) somewhere in the resultset.  Also are you sure these "vital" tables &
procs were in the same database and weren't in another database that was
being referenced from your database?  For example,

use A
go

select * from B.dbo.MyVitalTable
exec B.dbo.MyVitalProc

If that was true then they wouldn't be included in the backup (and
therefore subsequent restore) of your database.

--
*mike hodgson*
blog: http://sqlnerd.blogspot.com



Old Paulie wrote:

>I have been running a desktop PC with MSDE 1.0 installed.  I had made a
>backup of the data using a t-sql command backup database ...  Since this PC
>had crashed and has subsequently been rebuilt, I have restored the database
>but found that vital tables and stored procedures are missing.  The missing
>tables were not allegedly owned by dbo but perhaps had no owner(?)  PS I lo
g
>into the database as user sa.
>
>Any help in recovering those missing tables and stored procedures would be
>greatly appreciated.
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Mike Hodgson
08-26-05 12:23 PM


Re: missing tables and stored procedures after restoring database
saradhi,

Thanks for the advice, I have checked the backupset table in the Msdb
database and that only describes one backup taken last year.  The backup at
that time probably would not have included these missing tables.  I had
however made several backups and their is no proof of these in this table.  
I
need to obviously review the way I back up since it appears I am doing
something fundamentally wrong.  Any advice on backing up for future referenc
e
would be greatly appreciated.  Should I be backing up the other databases
that are created upon install of msde, ie Master, Msdb etc ....?

"saradhi" wrote:

> use restore headeronly command on the backup file To check when the
> backup was taken  looks like you haven't backed up the database when
> you created the tables whcih you said you were missing or you have
> restored
> an earlier backup not  the latest once since you are the Sysadmin u can
> view all the tables created with any login and if you want to have
> information
> about the latest  backup taken check out the one with
> Use Msdb
> select *from backupset
>  order by backup_finish_date desc
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Old Paulie
08-26-05 12:23 PM


Re: missing tables and stored procedures after restoring database
Hi Mike,

I am quite sure that the vital tables belonged to my database as I had
created no others!  I did run your query and did not find and records
relating to the missing tables and stored procedures.  From your advice and
'saradhi's', it is obvious now that my backup was flawed and I am doing
something wrong:( Thank you for your assistance.

"Mike Hodgson" wrote:

> If they're missing after a restore then they were not there at the time
> of the back and are now gone forever (presumedly they were created after
> the backup you used to restore the DB).  Do you have any later backups?
>
> BTW, every table & proc in a DB has an owner.  To be sure you're just
> not missing it in whatever client-side tool you're using execute this T-SQ
L:
>
>     select o.[name] as tablename, u.[name] as ownername, type
>     from dbo.sysobjects as o
>         inner join dbo.sysusers as u on o.uid = o.uid
>     order by type, u.[name], o.[name]
>
> Have a look to see if you can see the proc (type P) or the table (type
> U) somewhere in the resultset.  Also are you sure these "vital" tables &
> procs were in the same database and weren't in another database that was
> being referenced from your database?  For example,
>
>     use A
>     go
>
>     select * from B.dbo.MyVitalTable
>     exec B.dbo.MyVitalProc
>
> If that was true then they wouldn't be included in the backup (and
> therefore subsequent restore) of your database.
>
> --
> *mike hodgson*
> blog: http://sqlnerd.blogspot.com
>
>
>
> Old Paulie wrote:
> 

Report this thread to moderator Post Follow-up to this message
Old Post
Old Paulie
08-26-05 12:23 PM


Re: missing tables and stored procedures after restoring database
One last chance. Perhaps your backup file has several backups on it, and you
 restore the first one?
Check using RESTORE HEADERONLY.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/


"Old Paulie" < OldPaulie@discussion
s.microsoft.com> wrote in message
news:BADA21C1-5F74-4E9A-83FD- 779132C78585@microso
ft.com...
> Hi Mike,
>
> I am quite sure that the vital tables belonged to my database as I had
> created no others!  I did run your query and did not find and records
> relating to the missing tables and stored procedures.  From your advice an
d
> 'saradhi's', it is obvious now that my backup was flawed and I am doing
> something wrong:( Thank you for your assistance.
>
> "Mike Hodgson" wrote:
> 


Report this thread to moderator Post Follow-up to this message
Old Post
Tibor Karaszi
08-26-05 02:23 PM


Re: missing tables and stored procedures after restoring database
Tibor,

It turns out that my backup DID include several backup sets and I was
therefore able to restore the most recent backup set to get back all missing
tables and procedures.

THANK YOU VERY MUCH!

"Tibor Karaszi" wrote:

> One last chance. Perhaps your backup file has several backups on it, and y
ou restore the first one?
> Check using RESTORE HEADERONLY.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www. solidqualitylearning
.com/
> Blog: http:// solidqualitylearning
.com/blogs/tibor/
>
>
> "Old Paulie" < OldPaulie@discussion
s.microsoft.com> wrote in message
> news:BADA21C1-5F74-4E9A-83FD- 779132C78585@microso
ft.com... 
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Old Paulie
08-30-05 12:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:57 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006