By mistake I name a db something.com instead of something_com.
so now it won't let me do some design things. it already has data in it and
the export routine Urps because of the naming so I can not copy it over to
something_com.
is there a way to rename the sysdatabase to something_com?try...
use master
go
exec sp_renamedb 'something.com','something_com'
go
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"BJ Freeman" <bj_newsgroups@.free-man.net> wrote in message
news:%239xLXjjiDHA.2536@.TK2MSFTNGP10.phx.gbl...
> By mistake I name a db something.com instead of something_com.
> so now it won't let me do some design things. it already has data in it
and
> the export routine Urps because of the naming so I can not copy it over to
> something_com.
> is there a way to rename the sysdatabase to something_com?
>|||thanks. the only thing I had to-do, extra, was set the DB to single user.
could have used dboptions, but used the enterprise manager.
"oj" <nospam_ojngo@.home.com> wrote in message
news:uQmc9njiDHA.1456@.TK2MSFTNGP11.phx.gbl...
> try...
> use master
> go
> exec sp_renamedb 'something.com','something_com'
> go
>
> --
> -oj
> RAC v2.2 & QALite!
> http://www.rac4sql.net
>
> "BJ Freeman" <bj_newsgroups@.free-man.net> wrote in message
> news:%239xLXjjiDHA.2536@.TK2MSFTNGP10.phx.gbl...
> > By mistake I name a db something.com instead of something_com.
> > so now it won't let me do some design things. it already has data in it
> and
> > the export routine Urps because of the naming so I can not copy it over
to
> > something_com.
> > is there a way to rename the sysdatabase to something_com?
> >
> >
>|||then do...
use master
go
alter database [something.com] set single_user with rollback immediate
go
exec sp_renamedb 'something.com','something_com'
go
alter database [something_com] set multi_user with rollback immediate
go
--
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"BJ Freeman" <bj_newsgroups@.free-man.net> wrote in message
news:e7QmyHoiDHA.1692@.TK2MSFTNGP10.phx.gbl...
> thanks. the only thing I had to-do, extra, was set the DB to single user.
> could have used dboptions, but used the enterprise manager.
>
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:uQmc9njiDHA.1456@.TK2MSFTNGP11.phx.gbl...
> > try...
> >
> > use master
> > go
> > exec sp_renamedb 'something.com','something_com'
> > go
> >
> >
> > --
> > -oj
> > RAC v2.2 & QALite!
> > http://www.rac4sql.net
> >
> >
> >
> > "BJ Freeman" <bj_newsgroups@.free-man.net> wrote in message
> > news:%239xLXjjiDHA.2536@.TK2MSFTNGP10.phx.gbl...
> > > By mistake I name a db something.com instead of something_com.
> > > so now it won't let me do some design things. it already has data in
it
> > and
> > > the export routine Urps because of the naming so I can not copy it
over
> to
> > > something_com.
> > > is there a way to rename the sysdatabase to something_com?
> > >
> > >
> >
> >
>|||An alternative method to oj's suggestion with SQL 2000 is ALTER DATABASE
... MODIFY NAME. This eliminates the separate steps to place the
database in single-user mode. However, exclusive database access is
still required. For example:
ALTER DATABASE MyDatabase
MODIFY NAME = MyNewDatabaseName
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"BJ Freeman" <bj_newsgroups@.free-man.net> wrote in message
news:e7QmyHoiDHA.1692@.TK2MSFTNGP10.phx.gbl...
> thanks. the only thing I had to-do, extra, was set the DB to single
user.
> could have used dboptions, but used the enterprise manager.
>
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:uQmc9njiDHA.1456@.TK2MSFTNGP11.phx.gbl...
> > try...
> >
> > use master
> > go
> > exec sp_renamedb 'something.com','something_com'
> > go
> >
> >
> > --
> > -oj
> > RAC v2.2 & QALite!
> > http://www.rac4sql.net
> >
> >
> >
> > "BJ Freeman" <bj_newsgroups@.free-man.net> wrote in message
> > news:%239xLXjjiDHA.2536@.TK2MSFTNGP10.phx.gbl...
> > > By mistake I name a db something.com instead of something_com.
> > > so now it won't let me do some design things. it already has data
in it
> > and
> > > the export routine Urps because of the naming so I can not copy it
over
> to
> > > something_com.
> > > is there a way to rename the sysdatabase to something_com?
> > >
> > >
> >
> >
>
No comments:
Post a Comment