Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sp_dboptions !!

Author  Topic 

ann06
Posting Yak Master

171 Posts

Posted - 2008-04-09 : 09:35:14
hi folks,
i want to check the database options for certain database using the stored procedures sp_dboptions.
how to display all the options using the sp_dboptions ?

Best Regards ur bro Baso

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-09 : 09:37:57
What??? What database options you wanna check.Be clear
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-09 : 09:38:07
Exec sp_dboption 'db1'

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

ann06
Posting Yak Master

171 Posts

Posted - 2008-04-09 : 09:59:23
Thanks Harsh but it didn't give me wat i was looking 4
I was trying to find out if the 'truncate log on checkpoint' was set to true for a database
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-09 : 10:11:24
If it is not shown in the output, it means it is not set.

You can confirm by this:

Exec sp_dboption 'db1', 'trunc. log on chkpt.'


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-09 : 10:14:14
It is not set by default. Remember, 'truncate log on checkpoint' is same as keeping your database in 'Simple Recovery Model'
Go to Top of Page

ann06
Posting Yak Master

171 Posts

Posted - 2008-04-10 : 02:02:18
how you know that there is an argument called 'trunc. log on chkpt' ?
is there any way to know the list of arguments can be passed to a stored procedure?
Thanks You
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-04-10 : 02:33:52
if you pass no args, you get the list:

exec sp_dboption


elsasoft.org
Go to Top of Page

ann06
Posting Yak Master

171 Posts

Posted - 2008-04-10 : 02:43:26
Thank you much :-*
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-10 : 05:04:24
or else, look into SQL Server help for list of options and what they do.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -