Showing posts with label asking. Show all posts
Showing posts with label asking. Show all posts

Sunday, March 25, 2012

changing the default drive and folder for DBs


Hi;

I feel like an idiot to be asking this,
but how do I change the default drive and folder
in which new databases are created?

I've been looking all over Server Mgmt Studio,
and I can't find anything. I'm thinking that someone
can tell me this off the top of their heads,
or slip me a link to a web page.

Thanks,

Never mind everyone - I found my own solution.

THANKS anyway.

|||

Please tell us how you fix that

Tuesday, March 20, 2012

Changing table owner

Hi- apologies for asking a stupid newbie question, but I'm really stuck at
the moment. I need to change table ownership.

I've got an asp script which is looking for a table owned by the dbo role,
however the table was created under a different ownership. I understand the
problem, and almost understand the solution, but I can't seem to get all the
way.

THE PROBLEM (using [server].[database].[owner].[table])
[mgbsvr1].[dnn].[dnnadmin].[aspsearch]
needs to be
[mgbsvr1].[dnn].[dbo].[aspsearch]

I looked up the books online and found this syntax:
sp_changeobjectowner [ @.objname = ] 'object' , [ @.newowner = ] 'owner'

But I can't see how to use it, nor more importantly, where I should use it.
It won't work in the query tool in Enterprise Manager. If I need to create a
script (which I've never done before), how do I execute the script?

All help deeply appreciated
Manning, SydneyHi

You will need to be connected to [mgbsvr1].[dnn] with either sysadmin,
db_ddladmin and db_securityadmin rights or the dbo to issue the statement

sp_changeobjectowner '[dnnadmin].[aspsearch]' , 'dbo'

John

"Manning" <manning@.NOSPAMbartlett.net> wrote in message
news:blcb0l$vk1$1@.lust.ihug.co.nz...
> Hi- apologies for asking a stupid newbie question, but I'm really stuck at
> the moment. I need to change table ownership.
> I've got an asp script which is looking for a table owned by the dbo role,
> however the table was created under a different ownership. I understand
the
> problem, and almost understand the solution, but I can't seem to get all
the
> way.
> THE PROBLEM (using [server].[database].[owner].[table])
> [mgbsvr1].[dnn].[dnnadmin].[aspsearch]
> needs to be
> [mgbsvr1].[dnn].[dbo].[aspsearch]
> I looked up the books online and found this syntax:
> sp_changeobjectowner [ @.objname = ] 'object' , [ @.newowner = ] 'owner'
> But I can't see how to use it, nor more importantly, where I should use
it.
> It won't work in the query tool in Enterprise Manager. If I need to create
a
> script (which I've never done before), how do I execute the script?
> All help deeply appreciated
> Manning, Sydney|||Manning (manning@.NOSPAMbartlett.net) writes:
> But I can't see how to use it, nor more importantly, where I should use
> it. It won't work in the query tool in Enterprise Manager. If I need to
> create a script (which I've never done before), how do I execute the
> script?

Enterprise Manager is not much of a query tool. Use Query Analyzer
instead.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

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

Thanks for your advice - problem fixed.

Manning

"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:3f79bb7b$0$8769$ed9e5944@.reading.news.pipex.n et...
> Hi
> You will need to be connected to [mgbsvr1].[dnn] with either sysadmin,
> db_ddladmin and db_securityadmin rights or the dbo to issue the statement
> sp_changeobjectowner '[dnnadmin].[aspsearch]' , 'dbo'
> John

Sunday, March 11, 2012

Changing server name

Hi. Sorry to be asking this. I know there is a KB article with the steps for changing a SQL2K server name, but I can't find it for the life of me.
Anyone have it tagged?
TIASearch for "Renaming a SQL Server in Books Online. Should give you everything you need. I have even tried it myself, so I know it works.|||Try http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp|||Thanks foks. Why did I not think of BOL? I actually had it open under the dbForums window. DOH!