Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Friday, March 30, 2012

Mirroring ASPState

Hello Does any one have any information on how to mirror the ASP.NET 2 ASPState database we have set the connection string to allow custom DB and failover partner but this is still not working.

Regards Matt.

Hi Matt,

Are you having problems with automatic failover not happening at all, or the ASP.NET connection does not get re-routed to the failover partner after auto-failover occurs?

Thanks,

Kaloian.

|||

Hi Kaloian,

The problem that we are having is that the ASP.NET connection does not get re-routed to the failover partner after auto-failover. This is the connection string that i am using.

<sessionState mode="SQLServer"

sqlConnectionString="data source=Test; Failover Partner=Test2; initial catalog=Credit; user id=State;password=password"

cookieless="AutoDetect"

timeout="61"

allowCustomSqlDatabase="true" />

The databses all failover fine but it seems that the ASP.NET connection is never looking for the failover partner it just errors giving a named pipes error. But they are enabled on both the primary and the failover partner.

Thanks Matt.

|||

I believe you are missing the Network parameter -->

Network=dbmssocn; for TCP/IP

so sqlConnectionString="data source=Test; Failover Partner=Test2; Network=dbmssocn; (etc)

Let us know if it works!

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/fd000cb1-9426-4ed9-8108-1907ddfd1c5f.htm

Mirroring ASPState

Hello Does any one have any information on how to mirror the ASP.NET 2 ASPState database we have set the connection string to allow custom DB and failover partner but this is still not working.

Regards Matt.

Hi Matt,

Are you having problems with automatic failover not happening at all, or the ASP.NET connection does not get re-routed to the failover partner after auto-failover occurs?

Thanks,

Kaloian.

|||

Hi Kaloian,

The problem that we are having is that the ASP.NET connection does not get re-routed to the failover partner after auto-failover. This is the connection string that i am using.

<sessionState mode="SQLServer"

sqlConnectionString="data source=Test; Failover Partner=Test2; initial catalog=Credit; user id=State;password=password"

cookieless="AutoDetect"

timeout="61"

allowCustomSqlDatabase="true" />

The databses all failover fine but it seems that the ASP.NET connection is never looking for the failover partner it just errors giving a named pipes error. But they are enabled on both the primary and the failover partner.

Thanks Matt.

|||

I believe you are missing the Network parameter -->

Network=dbmssocn; for TCP/IP

so sqlConnectionString="data source=Test; Failover Partner=Test2; Network=dbmssocn; (etc)

Let us know if it works!

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/fd000cb1-9426-4ed9-8108-1907ddfd1c5f.htm

sql

Monday, March 19, 2012

Mimic the rowcount Transform''s variables dropdown?

I'm trying to mimic the rowcount transform's custom property called VariableName in a custom pipeline transform, with the same drop-down and list of variables in the default property grid as that of "RowCount".

Should a UITypeEditor or a TypeConverter be used for such a custom property? More importantly, in either case, how do you get from the UITypeEditor or TypeConverter to the TaskHost which contains the Variables to enumerate?

I'm not that familiar with Windows Forms, but it appears in both cases (editor or type converter), an ITypeDescriptorContext parameter named "context" is passed, but I'm certain how to get from A to B, that is, from the context variable to the TaskHost.

P.S. There's no need to add a new variable, just select from those that already exist.

Either a UITypeEditor or a TypeConverter could be used. I like the greater flexibility of a UITypeEditor for most things myself, but from memory I required one to give the better UE when creating variables, so as you just want to select, a TypeConverter should suffice and might be marginally simpler.

What type is context? What types are the properties of context, things like InnerObject? Examine what you are given, either context or a property of context will get you to where you need to be. It varies slightly depending on the host, the advanced UI or the property grid.

|||

It would seem like the appropriate route to use to mimic the VariableName drop-down in the RowCount transform would be to use IDTSPipelineEnvironmentService in a TypeConverter, which allows you to retrieve a component's TaskHost and its Variables collection.


But, I cannot find a way to get an IDTSPipelineEnvironmentService from within a TypeConverter on the Advanced Editor's property grid. Would you not agree that IDTSPipelineEnvironmentService is the way to get at the TaskHost from a transform's advanced editor, since that service is documented in BOL?

So I ended up using reflection (see the following Type Converter), which operates "correctly" ( creates a drop-down of variables' names) ... but the retrieval of a TaskHost and its Variables collection through reflection on non-public properties is not documented.

Code Snippet

// TaskHost scoped Variables for use in

// Pipeline Component's Advanced Editor (dropdown)

public sealed class VariablesConverter : TypeConverter

{

static StandardValuesCollection svc =

new StandardValuesCollection(new ArrayList());

public override bool

GetStandardValuesSupported(ITypeDescriptorContext context)

{

return true;

}

public override StandardValuesCollection

GetStandardValues(ITypeDescriptorContext context)

{

TaskHost th = null;

PropertyInfo tashHostProperty = null;

List<string> values = new List<string>();

if (context == null) { return svc; }

if (context.Instance == null) { return svc; }

tashHostProperty = context.Instance.GetType().GetProperty(

"PipelineTask", typeof(TaskHost));

// a => b ( Component => TaskHost via reflection ? )

if (tashHostProperty == null) { return svc; }

th = tashHostProperty.GetValue(context.Instance, null) as TaskHost;

if (th == null) { return svc; }

foreach (Variable v in th.Variables)

{

if (!v.SystemVariable && v.DataType == TypeCode.String)

{

values.Add(v.QualifiedName);

}

}

values.Sort();

return new StandardValuesCollection(values);

}

}


|||

I don't have a problem with the way it works, and it makes sense for the context to be as it is, rather than the IDTSPipelineEnvironmentService, but what is not documented is the type of context in the different hosts where you could be expected to provide editors or converters, such as the Advanced UI or the normal properties grid.

A custom UI will be friendlier still, although having the editor is no bad thing as well.

|||

Alright, I appreciate your insight on this one (about looking into ALL the properties on the ITypeDescriptorContext object ) when building UI widgets on the Advanced Editor.

In terms of friendliness, I'm starting to think its more "friendly" from a development perspective to build a custom UI for components/tasks/enumerators, since with a custom UI you're handed explicit references to service providers, and to relevant collections (like variables and connections)... and the documentation and examples generally use/describe custom UI development over use of the pre-provided Advanced Editor.

In any case, I went out and got a Windows forms book... of course, that may not be long for the world what with the 3.0 .NET Framework's WPF.

Wednesday, March 7, 2012

Migration from v7 to 2000 Q

We use a custom application written by a software company that are no longer
trading.
The back-end of the application runs on SQL7. We are currently implementing
a small business server 2003 system with SQL 2000. I would therefore like to
move the backend onto SQL 2000 (small biz).
I have tried to migrate to the database using the backup option on sql7 and
then restore on sql2000.
The problem I have come across is although it copies the data, it doesn't
copy the stored procs and views over. For this reason (I assume) the front
end stops working. When you run the application it stops asking for the
location of a view.
Is it possible to migrate the stored procs and views? What are my chances of
success. Sorry for the vagueness of the question, but SQL server admin
really isn't my thing. If you need more info please let me know.
TIA,
H
H,
Backup/Restore detach/attach both copy everything in the database including
views and stored procedures. Do you not see the views and stored procedures
in Enterprise Manager when you move from 7 --> 2000? Who owns these views
and stored procedures i.e., dbo?
HTH
Jerry
"H" <walesforthegr@.ndslam.com> wrote in message
news:O$$5AHQyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> We use a custom application written by a software company that are no
> longer trading.
> The back-end of the application runs on SQL7. We are currently
> implementing a small business server 2003 system with SQL 2000. I would
> therefore like to move the backend onto SQL 2000 (small biz).
> I have tried to migrate to the database using the backup option on sql7
> and then restore on sql2000.
> The problem I have come across is although it copies the data, it doesn't
> copy the stored procs and views over. For this reason (I assume) the front
> end stops working. When you run the application it stops asking for the
> location of a view.
> Is it possible to migrate the stored procs and views? What are my chances
> of success. Sorry for the vagueness of the question, but SQL server admin
> really isn't my thing. If you need more info please let me know.
> TIA,
> H
>
|||Take a look at the Copy Database Wizard which should help pick up objects,
such as Stored Procedures, stored in the Master database.
Hal Berenson, President
PredictableIT, LLC
"H" <walesforthegr@.ndslam.com> wrote in message
news:O$$5AHQyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> We use a custom application written by a software company that are no
> longer trading.
> The back-end of the application runs on SQL7. We are currently
> implementing a small business server 2003 system with SQL 2000. I would
> therefore like to move the backend onto SQL 2000 (small biz).
> I have tried to migrate to the database using the backup option on sql7
> and then restore on sql2000.
> The problem I have come across is although it copies the data, it doesn't
> copy the stored procs and views over. For this reason (I assume) the front
> end stops working. When you run the application it stops asking for the
> location of a view.
> Is it possible to migrate the stored procs and views? What are my chances
> of success. Sorry for the vagueness of the question, but SQL server admin
> really isn't my thing. If you need more info please let me know.
> TIA,
> H
>

Migration from v7 to 2000 Q

We use a custom application written by a software company that are no longer
trading.
The back-end of the application runs on SQL7. We are currently implementing
a small business server 2003 system with SQL 2000. I would therefore like to
move the backend onto SQL 2000 (small biz).
I have tried to migrate to the database using the backup option on sql7 and
then restore on sql2000.
The problem I have come across is although it copies the data, it doesn't
copy the stored procs and views over. For this reason (I assume) the front
end stops working. When you run the application it stops asking for the
location of a view.
Is it possible to migrate the stored procs and views? What are my chances of
success. Sorry for the vagueness of the question, but SQL server admin
really isn't my thing. If you need more info please let me know.
TIA,
HH,
Backup/Restore detach/attach both copy everything in the database including
views and stored procedures. Do you not see the views and stored procedures
in Enterprise Manager when you move from 7 --> 2000? Who owns these views
and stored procedures i.e., dbo?
HTH
Jerry
"H" <walesforthegr@.ndslam.com> wrote in message
news:O$$5AHQyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> We use a custom application written by a software company that are no
> longer trading.
> The back-end of the application runs on SQL7. We are currently
> implementing a small business server 2003 system with SQL 2000. I would
> therefore like to move the backend onto SQL 2000 (small biz).
> I have tried to migrate to the database using the backup option on sql7
> and then restore on sql2000.
> The problem I have come across is although it copies the data, it doesn't
> copy the stored procs and views over. For this reason (I assume) the front
> end stops working. When you run the application it stops asking for the
> location of a view.
> Is it possible to migrate the stored procs and views? What are my chances
> of success. Sorry for the vagueness of the question, but SQL server admin
> really isn't my thing. If you need more info please let me know.
> TIA,
> H
>|||Take a look at the Copy Database Wizard which should help pick up objects,
such as Stored Procedures, stored in the Master database.
--
Hal Berenson, President
PredictableIT, LLC
"H" <walesforthegr@.ndslam.com> wrote in message
news:O$$5AHQyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> We use a custom application written by a software company that are no
> longer trading.
> The back-end of the application runs on SQL7. We are currently
> implementing a small business server 2003 system with SQL 2000. I would
> therefore like to move the backend onto SQL 2000 (small biz).
> I have tried to migrate to the database using the backup option on sql7
> and then restore on sql2000.
> The problem I have come across is although it copies the data, it doesn't
> copy the stored procs and views over. For this reason (I assume) the front
> end stops working. When you run the application it stops asking for the
> location of a view.
> Is it possible to migrate the stored procs and views? What are my chances
> of success. Sorry for the vagueness of the question, but SQL server admin
> really isn't my thing. If you need more info please let me know.
> TIA,
> H
>

Migration from v7 to 2000 Q

We use a custom application written by a software company that are no longer
trading.
The back-end of the application runs on SQL7. We are currently implementing
a small business server 2003 system with SQL 2000. I would therefore like to
move the backend onto SQL 2000 (small biz).
I have tried to migrate to the database using the backup option on sql7 and
then restore on sql2000.
The problem I have come across is although it copies the data, it doesn't
copy the stored procs and views over. For this reason (I assume) the front
end stops working. When you run the application it stops asking for the
location of a view.
Is it possible to migrate the stored procs and views? What are my chances of
success. Sorry for the vagueness of the question, but SQL server admin
really isn't my thing. If you need more info please let me know.
TIA,
HH,
Backup/Restore detach/attach both copy everything in the database including
views and stored procedures. Do you not see the views and stored procedures
in Enterprise Manager when you move from 7 --> 2000? Who owns these views
and stored procedures i.e., dbo?
HTH
Jerry
"H" <walesforthegr@.ndslam.com> wrote in message
news:O$$5AHQyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> We use a custom application written by a software company that are no
> longer trading.
> The back-end of the application runs on SQL7. We are currently
> implementing a small business server 2003 system with SQL 2000. I would
> therefore like to move the backend onto SQL 2000 (small biz).
> I have tried to migrate to the database using the backup option on sql7
> and then restore on sql2000.
> The problem I have come across is although it copies the data, it doesn't
> copy the stored procs and views over. For this reason (I assume) the front
> end stops working. When you run the application it stops asking for the
> location of a view.
> Is it possible to migrate the stored procs and views? What are my chances
> of success. Sorry for the vagueness of the question, but SQL server admin
> really isn't my thing. If you need more info please let me know.
> TIA,
> H
>|||Take a look at the Copy Database Wizard which should help pick up objects,
such as Stored Procedures, stored in the Master database.
Hal Berenson, President
PredictableIT, LLC
"H" <walesforthegr@.ndslam.com> wrote in message
news:O$$5AHQyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> We use a custom application written by a software company that are no
> longer trading.
> The back-end of the application runs on SQL7. We are currently
> implementing a small business server 2003 system with SQL 2000. I would
> therefore like to move the backend onto SQL 2000 (small biz).
> I have tried to migrate to the database using the backup option on sql7
> and then restore on sql2000.
> The problem I have come across is although it copies the data, it doesn't
> copy the stored procs and views over. For this reason (I assume) the front
> end stops working. When you run the application it stops asking for the
> location of a view.
> Is it possible to migrate the stored procs and views? What are my chances
> of success. Sorry for the vagueness of the question, but SQL server admin
> really isn't my thing. If you need more info please let me know.
> TIA,
> H
>