vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Currently I must manually complete the following commands to set a new value for the "open objects" and "open indexes". I need a way script this process in a batch file. COMMANDS RAN: This is nothing to script, these commands obtain the current values for open objects and open indexes. isql -Usa -Pmanager -SCOP1_DS execute sp_countmetadata "open objects" execute sp_countmetadata "open indexes" go RESULTS: below are the results, there are 5124 user objects and 2122 user indexes. I need a way to be able to multiple these numbers by a set value and then use the new value and reset the user objects and user indexes. The question is how do I isolate the results for each result so I can run the calculations below. Here is the calculation I need: current user objects * 1.05 = new value current user indexes * 1.1 = new value There are 5124 user objects in all database(s), requiring 6985 Kbytes of memory. The 'open objects' configuration parameter is currently set to 500. (return status = 0) There are 2122 user indexes in all database(s), requiring 5902 Kbytes of memory. The 'open indexes' configuration parameter is currently set to 5000. (return status = 0) SETTING THE NEW VALUES: Once I have the new values, I can set the objects and indexes as seen below. 1> execute sp_configure "open objects", 5380 2> execute sp_configure "open indexes", 2334 3> go |
| ||||
| You can: a - parse the output for the values you want ("Duh, Mark!" ?) or b - grab the source code for sp_countmetadata, see where it's getting it's numbers from, and then write your own query to obtain said numbers; once you've located the number you could even have your 'select' do the multiplication and 'exec' formatting for you, something like: select 'exec sp_configure "open objects",'+ convert(varchar,ceiling(<number>*1.05)) News West wrote: > Currently I must manually complete the following commands to set a new value > for the "open objects" and "open indexes". I need a way script this process > in a batch file. > > COMMANDS RAN: This is nothing to script, these commands obtain the current > values for open objects and open indexes. > > > isql -Usa -Pmanager -SCOP1_DS > execute sp_countmetadata "open objects" > execute sp_countmetadata "open indexes" > go > > > > > RESULTS: below are the results, there are 5124 user objects and 2122 user > indexes. I need a way to be able to multiple these numbers by a set value > and then use the new value and reset the user objects and user indexes. The > question is how do I isolate the results for each result so I can run the > calculations below. Here is the calculation I need: > > current user objects * 1.05 = new value > current user indexes * 1.1 = new value > > > There are 5124 user objects in all database(s), requiring 6985 Kbytes of > memory. > > The 'open objects' configuration parameter is currently set to 500. > (return status = 0) > There are 2122 user indexes in all database(s), requiring 5902 Kbytes of > memory. > > The 'open indexes' configuration parameter is currently set to 5000. > (return status = 0) > > > SETTING THE NEW VALUES: Once I have the new values, I can set the objects > and indexes as seen below. > > > > 1> execute sp_configure "open objects", 5380 > 2> execute sp_configure "open indexes", 2334 > 3> go > > |