Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Thursday, March 29, 2012

Default merge agent profile settings

I'd like to be able to either change the default profile settings or change
the default profile to a user defined profile.
So far I've only been able to change the profile after the merge agent is
created. I'd like to change the defaults for
any new merge agents that are created.
TIA
here is an example of updating the merge default profile's LoginTimeOut from
15s to 120s.
update msdb.dbo.MSagent_parameters set value=120 where
parameter_name='-LoginTimeout' and profile_id=6
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Darren" <deo.is@.unknown.com> wrote in message
news:%23$AjOiSGFHA.2568@.TK2MSFTNGP10.phx.gbl...
> I'd like to be able to either change the default profile settings or
change
> the default profile to a user defined profile.
> So far I've only been able to change the profile after the merge agent is
> created. I'd like to change the defaults for
> any new merge agents that are created.
> TIA
>
>
|||Or like this?
sp_change_agent_parameter @.profile_id = 6, @.parameter_name =
N'-UploadReadChangesPerBatch', @.parameter_value = N'2000'
Are the default profile IDs documented anywhere?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uIGGPvVGFHA.1068@.TK2MSFTNGP14.phx.gbl...
> here is an example of updating the merge default profile's LoginTimeOut
from[vbcol=seagreen]
> 15s to 120s.
>
> update msdb.dbo.MSagent_parameters set value=120 where
> parameter_name='-LoginTimeout' and profile_id=6
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Darren" <deo.is@.unknown.com> wrote in message
> news:%23$AjOiSGFHA.2568@.TK2MSFTNGP10.phx.gbl...
> change
is
>
|||Found it in BOL under sp_help_agent_profile
"Darren" <deo.is@.unknown.com> wrote in message
news:OkkNEVcGFHA.400@.TK2MSFTNGP14.phx.gbl...
> Or like this?
> sp_change_agent_parameter @.profile_id = 6, @.parameter_name =
> N'-UploadReadChangesPerBatch', @.parameter_value = N'2000'
> Are the default profile IDs documented anywhere?
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uIGGPvVGFHA.1068@.TK2MSFTNGP14.phx.gbl...
> from
> is
>
|||This also assumes that you haven't changed the default. The update below
would update the default merge agent.
update msdb.dbo.MSagent_parameters set value=120 where
parameter_name='-LoginTimeout' and
profile_id = ( select profile_id from msdb.dbo.MSagent_profiles where
agent_type=4 and def_profile = 1 )
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uIGGPvVGFHA.1068@.TK2MSFTNGP14.phx.gbl...
> here is an example of updating the merge default profile's LoginTimeOut
from[vbcol=seagreen]
> 15s to 120s.
>
> update msdb.dbo.MSagent_parameters set value=120 where
> parameter_name='-LoginTimeout' and profile_id=6
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Darren" <deo.is@.unknown.com> wrote in message
> news:%23$AjOiSGFHA.2568@.TK2MSFTNGP10.phx.gbl...
> change
is
>
|||That's probably a better way to do it
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Darren" <deo.is@.unknown.com> wrote in message
news:OkkNEVcGFHA.400@.TK2MSFTNGP14.phx.gbl...
> Or like this?
> sp_change_agent_parameter @.profile_id = 6, @.parameter_name =
> N'-UploadReadChangesPerBatch', @.parameter_value = N'2000'
> Are the default profile IDs documented anywhere?
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uIGGPvVGFHA.1068@.TK2MSFTNGP14.phx.gbl...
> from
> is
>

Monday, March 19, 2012

decrease initial database size

i've increased the initial database size of the tempdb to 80000 mb = 80 gb
and for the logfile of the tempdb to 1024 mb for testing purposes.
now i want to decrease the size back to 8 (1) mb but every time i do this in
the file propertys, the changes have no effect and are not stored. (even iv
the files are shrinked before)
how can i decrease the initial size of the tempdb and its logifle?
server: sql 2005 enterprise x64 sp1 (english)
Hi
Can you restart SQL Server?
"Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
news:3443B8DE-A7F9-49A4-9EC9-EC7F7131947A@.microsoft.com...
> i've increased the initial database size of the tempdb to 80000 mb = 80 gb
> and for the logfile of the tempdb to 1024 mb for testing purposes.
> now i want to decrease the size back to 8 (1) mb but every time i do this
> in
> the file propertys, the changes have no effect and are not stored. (even
> iv
> the files are shrinked before)
> how can i decrease the initial size of the tempdb and its logifle?
> server: sql 2005 enterprise x64 sp1 (english)
|||yes, but the file sizes are then set back to 80 (1) gb...
"Uri Dimant" wrote:

> Hi
> Can you restart SQL Server?
> "Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
> news:3443B8DE-A7F9-49A4-9EC9-EC7F7131947A@.microsoft.com...
>
>
|||Sorcerer wrote:
> i've increased the initial database size of the tempdb to 80000 mb = 80 gb
> and for the logfile of the tempdb to 1024 mb for testing purposes.
> now i want to decrease the size back to 8 (1) mb but every time i do this in
> the file propertys, the changes have no effect and are not stored. (even iv
> the files are shrinked before)
> how can i decrease the initial size of the tempdb and its logifle?
> server: sql 2005 enterprise x64 sp1 (english)
You need to restart SQL in a "minimum configuration" mode by using
sqlservr -c -f
Connect to this running instance using Query Analyzer and use the ALTER
DATABASE command to set the size of the TEMPDB data and log files.
Restart SQL normally, and you should have a new properly sized TEMPDB.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Hi,
Have a look into this article to shrink tempdb
http://support.microsoft.com/default...b;en-us;307487
Thanks
Hari
SQL Server MVP
"Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
news:4F72AAFF-4C4C-452E-B752-2E4C6588D2C8@.microsoft.com...[vbcol=seagreen]
> yes, but the file sizes are then set back to 80 (1) gb...
> "Uri Dimant" wrote:

Friday, March 9, 2012

DecimalPlaces Property

I've got a SQL table that I created through the Access 2K2 interface that is suddenly giving me a warning message each time I attempt to open the table in design mode or datasheet mode which says:
"The setting for the DecimalPlaces property must be from 0 through 15, or 255 for Auto (default)."
I have checked, rechecked, and checked again the format for every item in my table, and none of them have a DecimalPlaces property outside of this range. In fact, only three smallmoney fields have any DecimalPlaces setting at all - each is 0. The rest of
the numeric fields are all specified as General Number, and the Decimal Places property is blank (and inaccessible). I have been completely unable to find any information on this on SQL Server BOL, the KB or these newsgroups. Has anyone else encountered t
his behavior? Any idea why it may be occurring, and what I can do to stop it? BTW, this is a new table with no data, and the warning message only recently started appearing - it didn't always do so.
TIA,
Terry Roberts
>
> I've got a SQL table that I created through the Access 2K2
> interface that is suddenly giving me a warning message each time
> I attempt to open the table in design mode or datasheet mode
> which says:
> "The setting for the DecimalPlaces property must be from 0
> through 15, or 255 for Auto (default)."
Hi Terry,
Try deleting the linked table in Access and relink. See if the problem goes
away.
If the problem persists, post your question in one of the Microsoft Access
forums and someone might be able to help.
Hope this helps,
Eric Crdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Eric,
Thanks for the advice - unfortunately, it didn't solve the problem. I'll try a post to the Access newsgroup.
Terry

Saturday, February 25, 2012

Debugging Stored Procedures

Hello,
I've recently upgraded to SQL2005 standard edition and
I'm struggling to find how to debug stored procedures.
I fire up the accompanying Visual Studio and goog-ahem
MSN search suggests that I need to start up a Database
Project. This is missing in my VS. What do I need to do to
get this template? Or is there another mechanism similar to
SQL2k's debug functionality?
Thanks,
John
Tibor Karaszi wrote:

> I believe you need a certain edition of VS, possibly Professional.
Hmm this is what I feared... how frustrating.
Thanks Tibor!
John
|||John Nolan wrote:

> Tibor Karaszi wrote:
>
> Hmm this is what I feared... how frustrating.
> Thanks Tibor!
> John
Does the Developer edition of SQL Server 2005 come with a VS
that includes the Database template?
I don't want to buy VS out right as its not my development
platform.

|||Tibor Karaszi wrote:

> I'm pretty certain that it doesn't. The only project types you get
> from the SQL Server installation are "Business Intelligence", things
> like Reporting Services, SSIS and Analysis Server. I can't say 100%
> as I do have "real" VS installed, but, again, I'm pretty certain of
> it...
Just to confirm that I've installed SQL Server 2005
Developer Edition and the Visual studio that comes with it
does not include the Database template.
It seems that in their wisdom Microsoft have deemed that
debugging database stored procedures out of the scope of
database developer.

Friday, February 24, 2012

Debugging SP Killed SQL Server

Hi,
I've just been trying to debug an SP on SQL server 2000 using QA when
users started reporting that the server was inaccessible.
This is a 2 server failover cluster so luckily the second server took
over. Just wondering if anyone has seen this issue before and how to
stop it.
The SP is doing nothing spectacular just inserts and updates wrapped
in a transaction, if i execute the SP it seems fine.
Any help anyone can give would be greatly appreciated.
Cheers
Wes
wesley.potter@.bss.org wrote:
> Hi,
> I've just been trying to debug an SP on SQL server 2000 using QA when
> users started reporting that the server was inaccessible.
> This is a 2 server failover cluster so luckily the second server took
> over. Just wondering if anyone has seen this issue before and how to
> stop it.
> The SP is doing nothing spectacular just inserts and updates wrapped
> in a transaction, if i execute the SP it seems fine.
> Any help anyone can give would be greatly appreciated.
> Cheers
> Wes
http://support.microsoft.com/default.aspx/kb/899431
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||On Tue, 21 Nov 2006 11:41:33 -0600, Tracy McKibben
<tracy@.realsqlguy.com> wrote:

>http://support.microsoft.com/default.aspx/kb/899431
Thanks Tracy, Spot on!!!

Sunday, February 19, 2012

Debugging a script component task?

How to debug a Script Component task?

For instance, I’ve got a Input0_ProcessInputRow procedure and I’d like to see what happen when compiler reach this line:

dFecha = Left(Row.Column19, 4) & "-" & Mid(Row.Column19, 5, 2) & "-" & Right(Row.Column19, 2)

I’ve put a toogle breakpoint there and then saved but when I run the package to ignore at all.

This topic has been already discussed in these newsgrups but I still have doubts.

Thanks a lot for any advice or clarification

Unfortunately you can't debug script components with breakpoints as you can in the script task.

Your best option is to fire events from within the script component that output teh values that you are interested in.

Not great but for now its what we're stuck with I'm afraid.

-Jamie

|||

Thanks Jamie.

Anyway, I tried to allocate a MessageBox.Show... method but it did not work....

According to DarrenSqlis you can do that with Script Task no with Script Component task

|||

Correct. Message box only works in script task as well.

-Jamie

|||

So that, as you said we are totally stuck. I'll use variables in order to see anything

seeya

|||

Try firing OnInformation events containing the information that you are interested in.

-Jamie

|||

are you talking about Event Handlers tab and then choose Data Flow task and to capture oninformation event and do some stuff there?

thanx

|||

You can fire events from within the script component that will then be caught by the eventhandlers. Here's some code that would output the value of a variable:

ComponentMetaData.FireInformation(1, "MyScriptComponent", "VariableName=" + CStr(Me.Variables.VariableName), "", 0, True)

You can change it to output whatever you like.

Once the eventhandler catches the fired event then you can do whatever you like with the value.

-Jamie

|||

hi again,

I suppose that 'MyScripComponent' is equal to the name of my script, in my case "ScriptMain", isn't it? Or maybe the name of my Data Flow component?

Where you put VariableName are you referring a variable defined in my package.

thanks a lot

|||

You can put whatever you like for most of the parameters. Where it says "MyScriptComponent" you can even leave that blank if you want. The important bit is what you are outputting in the "Description" parameter.

And yes, VariableName is a variable defined in your package and referenced in ReadWritevariables. It doesn't have to be a variable though - that was just an example. You can output whatever you like (e.g. a value in your incoming row or a calculated value)

Just go into your script component and type:

"Componentmetadata.FireInformation("

and let intellisense help you from there.

-Jamie

|||Thanks for everything!|||msgbox.Show(string) does not work... But msgbox(string) should work...|||

hi TGnat,

you're right, that works. Thanks a lot I hadn't though it

DeBugging

Ive been given the Schema's for XML files we will be sent. Ive managed to
struggle to get this far using SQLXML , and im at loss of where to turn next.
Im very new to the whole XML format, and the Schema's given have include
statements which doesnt help. Im getting this error ;
<?xml version="1.0"?>
<Result State="FAILED">
<Error><HResult>0x8000FFFF
</HResult>
<Description><![CDATA[Schema: relationship expected on
'OriginatingAccount'.]]>
</Description>
<Source>Schema mapping</Source><Type>FATAL</Type></Error></Result>
but have no idea where to start looking to fix the problem. Is there a way i
can debug the process, and at least manage to find which schema is causing
the problem
Find the element declaration for "'OriginatingAccount'" and add the
necessary relationship annotation for the mapping.
Best regards
Michael
"Peter Newman" <PeterNewman@.discussions.microsoft.com> wrote in message
news:BD8789F4-507F-47D9-A2C4-F7CF22CACE94@.microsoft.com...
> Ive been given the Schema's for XML files we will be sent. Ive managed to
> struggle to get this far using SQLXML , and im at loss of where to turn
> next.
> Im very new to the whole XML format, and the Schema's given have include
> statements which doesnt help. Im getting this error ;
> <?xml version="1.0"?>
> <Result State="FAILED">
> <Error><HResult>0x8000FFFF
> </HResult>
> <Description><![CDATA[Schema: relationship expected on
> 'OriginatingAccount'.]]>
> </Description>
> <Source>Schema mapping</Source><Type>FATAL</Type></Error></Result>
> but have no idea where to start looking to fix the problem. Is there a way
> i
> can debug the process, and at least manage to find which schema is causing
> the problem