SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 [Solved] .ldf = 82 gigs & .mdf = 3.8 gigs
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  13:44:15  Show Profile  Reply with Quote
naw - you're just missing the sigle quotes:

exec sp_changedbowner @sa = 'LINK\Administrator'

EDIT:
Here's the syntax documentation

sp_changedbowner


Be One with the Optimizer
TG

Edited by - TG on 05/12/2014 13:46:06
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  13:45:25  Show Profile  Reply with Quote
Ok, my Nagios server just popped up a warning -- I'm at 9 gigs free on this server. What would happen if I manually deleted a couple of transaction logs?

Thanks,

Joe B
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  13:48:22  Show Profile  Reply with Quote
Any chance you can allocate more space to this box until you get the transaction log issue under control?

Be One with the Optimizer
TG
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  13:52:56  Show Profile  Reply with Quote
In answer to your question - I don't know what would happen if you delete a couple of the logs. hopefully a DBA will respond to that. the more space solution seems less risky to me. At least I would copy them somewhere in case sql complains about the missing files.

Be One with the Optimizer
TG
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  13:55:46  Show Profile  Reply with Quote
Ok, I added the single quotes but now I'm getting a different error. My new command:
exec sp_changedbowner @sa = 'LINK\Administrator'

And my new error:
Msg 201, Level 16, State 4, Procedure sp_changedbowner, Line 0
Procedure or function 'sp_changedbowner' expects parameter '@loginame', which was not supplied.

I noticed the sa login icon has a little red arrow pointing down. I right-clicked on the icon, went to Login Properties and on the Status page I see that the login has been disabled. Any ideas on why that would be? I contacted my vendor who runs their software using this SQL server but I was given the "We're not SQL admins" answer. Sigh.

Thanks,

Joe B

Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  14:22:21  Show Profile  Reply with Quote
As to the "more space" option, unfortunately VMware won't be here for about a month. I may be able to add a couple of drives and create another array but I'll need to check and see if the controller can support the extra drives. Thanks to all for the help and I'll keep everyone updated.

Thanks,

Joe B
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  14:28:26  Show Profile  Reply with Quote
I'm sorry - I just copied your command (without the single quotes) and didn't notice that you had the variable name wrong:

syntax:
sp_changedbowner [ @loginame = ] 'login' [ , [ @map = ] remap_alias_flag ]

Your call should be (assuming Link\Administrator is a valid login):

exec sp_changedbowner @loginame = 'LINK\Administrator'

Be One with the Optimizer
TG
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  14:36:41  Show Profile  Reply with Quote
I'm not sure why the sa login is disabled but I wouldn't be surprised it it happened during the installation of this instance. I think the install allows you to designate any account you want as a system admin. There may be some feeling that a windows login may be more secure than a sql login which is what sa is. But be that as it may this may be good news for you. Now you can probably feel more confidence that if you changed the password you won't break anything that is not already broken. An re-enabling should be as simple as checking the radio button in the status page.

Be One with the Optimizer
TG
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37466 Posts

Posted - 05/12/2014 :  14:37:45  Show Profile  Visit tkizer's Homepage  Reply with Quote
quote:
Originally posted by jbruyet1

Ok, my Nagios server just popped up a warning -- I'm at 9 gigs free on this server. What would happen if I manually deleted a couple of transaction logs?




You can't. They are active files. If you stopped the service and then deleted ldf files, after you start the service the impacted databases would be in suspect mode and not usable.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  14:46:32  Show Profile  Reply with Quote
Thank you TG and tkizer. I'll leave the transaction logs alone and enable the sa account. I contacted the vendor and they don't use the sa account so I guess that's why it was never activated. I might seem a little paranoid, but that's because I am. This program has all of our Finance, HR, Operations, Vehicle Maintenance and Facilities Maintenance data on it. The more I do this the more I think it would be worth it to hire someone with some serious SQL skills. Unfortunately we don't have the $$$ for hiring so I get to do it. Lucky me.

Thanks,

Joe B
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  14:55:56  Show Profile  Reply with Quote
quote:
I might seem a little paranoid, but that's because I am.
sounds like the makings of a fine DBA

As to your companies priorities you may want to pose the question: "if we lost all the data in the sql server what would be the cost?" cost to rebuild, cost to employees, cost to customer confidence, etc.

Be One with the Optimizer
TG
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:00:41  Show Profile  Reply with Quote
Hi TG, I'm running the command:
exec sp_changedbowner @sa = 'LINK\Administrator'

but I'm still getting this error:
Msg 201, Level 16, State 4, Procedure sp_changedbowner, Line 0
Procedure or function 'sp_changedbowner' expects parameter '@loginame', which was not supplied.

I checked the sa account and it's enabled and the red arrow is gone. The error message says it expected "parameter '@loginame'" and that it wasn't supplied. I tried it with the single quotes but it didn't like that either. Do I need to "apply" the sa account to the databases somehow?

Thanks,

Joe B

Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  15:04:12  Show Profile  Reply with Quote
That is not the command I gave you.

exec sp_changedbowner @sa @login = 'LINK\Administrator'


And now that sa is enabled if you prefer you can set the owner to sa with:


exec sp_changedbowner @login = 'sa'


Be One with the Optimizer
TG

Edited by - TG on 05/12/2014 15:05:56
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:04:22  Show Profile  Reply with Quote
AND, I figured out how to change my login so I logged in as sa and tried to get to the DB properties but I still don't have access.

Thanks,

Joe B
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:05:27  Show Profile  Reply with Quote
--> TG OH!!!

Thanks,

Joe B
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:10:41  Show Profile  Reply with Quote
Aha, the error contained the answer. The missing parameter was @loginame. I just ran that and it completed successfully. Time to give this another whirl.

Thanks,

Joe B
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:19:33  Show Profile  Reply with Quote
THAT GOT IT!!! Thank you TG and tkizer, I now have access to the properties of the databases. I'll go through and run this command on the rest of them, change to Simple Mode and go from there. I'll report back later today with the results.

Thanks so much!

Joe B

PS, I'll be looking for some $$$ for a quick SQL course so I can at least acquire the rudimentary skills.
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/12/2014 :  15:21:13  Show Profile  Reply with Quote
And...a DBA is born!

Be One with the Optimizer
TG
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:53:31  Show Profile  Reply with Quote
Dear TG and tkizer, thank you very much for your help in this matter. I have now recovered about 40 gigs of disk space and have taken a deep breath for the first time in a couple of weeks. I also thank you for your patience. That maybe more so than the actual help. My next step is to Google how to determine how large my transaction files should be.

Thanks again,

Joe B, future DBA. Maybe...
Go to Top of Page

jbruyet1
Starting Member

22 Posts

Posted - 05/12/2014 :  15:56:15  Show Profile  Reply with Quote
Ok, one last question here -- how do I mark my issue as solved? Some forums have their users edit the topic to add [Solved] to the front of the name but I don't see anything like that in this forum.

Thanks,

Joe B

Edited by - jbruyet1 on 05/12/2014 15:57:50
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000