Showing posts with label itto. Show all posts
Showing posts with label itto. Show all posts

Monday, March 19, 2012

Conventional rename mdf techniques failed not sure why

I'm trying to rename my mdf files and I have tried
1. Detach db, rename files and attach from Enterprise Manager. I direct it
to the rename MDF file and it lists the original filename then lists the
current file location with the old names and two red X's indicating a
problem. When I hit ok it comes up with error "the physical filename '['
may
be incorrect"
2. Restore database from disk with move results in error
Logical file 'mynewdbname_Data' is not part of database
'mynewdbname_v1'. Use RESTORE FILELISTONLY to list the logical file names.
Restoring filelistonly obviously just shows the old db names and phyical
file names
Any ideas what to do next ?
This sql server 2000 on winxp machines
ThanksWhen you try to attach from Enterprise Manager, change the names/paths
listed until they match the new physical files. The red X's should then go
away.
"Mike" <Mike@.mike.com> wrote in message
news:O2ibv9raGHA.3328@.TK2MSFTNGP02.phx.gbl...
> I'm trying to rename my mdf files and I have tried
>
> 1. Detach db, rename files and attach from Enterprise Manager. I direct it
> to the rename MDF file and it lists the original filename then lists the
> current file location with the old names and two red X's indicating a
> problem. When I hit ok it comes up with error "the physical filename '[
;'
> may be incorrect"
> 2. Restore database from disk with move results in error
> Logical file 'mynewdbname_Data' is not part of database
> 'mynewdbname_v1'. Use RESTORE FILELISTONLY to list the logical file names.
> Restoring filelistonly obviously just shows the old db names and phyical
> file names
> Any ideas what to do next ?
> This sql server 2000 on winxp machines
> Thanks
>|||ok cool that worked!!! It didn't work when I tried that earlier this am but
this time it worked.
Thanks !!
"Michael D'Angelo" <nospamnmdange@.phoenixworx.org> wrote in message
news:uwbaegsaGHA.1020@.TK2MSFTNGP02.phx.gbl...
> When you try to attach from Enterprise Manager, change the names/paths
> listed until they match the new physical files. The red X's should then
> go away.
> "Mike" <Mike@.mike.com> wrote in message
> news:O2ibv9raGHA.3328@.TK2MSFTNGP02.phx.gbl...
>

Controlling the cursor position

Let's say I run a query that returns a 100k records. Is there a way to
control where the cursor is in the result set. For example, can I get it
to jump to row 50k and return the next 500 rows?Taken from Transact SQL help:
-- Fetch the row that is two rows prior to the current row.
FETCH RELATIVE -2 FROM authors_cursor
Hope that helps
"preston" wrote:

> Let's say I run a query that returns a 100k records. Is there a way to
> control where the cursor is in the result set. For example, can I get it
> to jump to row 50k and return the next 500 rows?
>|||Hi, preston
See: http://www.aspfaq.com/show.asp?id=2120
Razvan