Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

Thursday, March 22, 2012

Create a DSN programmatically with network options

Hello,
I would like to create a brand new system DSN, programmatically,
targeting an MS-SQL Server 2000 database, and with networking options
(pipes,TCP/IP, etc.).
Until now the only solutions I managed to find on google.groups or
forums are:
1- The usual "Why don't you do it manually ?" and other classical
off-topic answers.
2- The "Dump the registry keys in HKLM\Software\ODBC etc." solution.
Relying on this single registry entry is not enough since it only
configures the DSN registration, not its advanced connection options (at
least for SQL Server). Particularly, networking options cannot be set
this way. With Sysinternals RegMon and some additional MSDN
documentation I finally understood that some stuff was written in
"HKLM\Software\Microsoft\MSSQLServer\...\ConnectTo". My problem is I
have not enough documentation on the value of these keys (plus the ones
in \TDS) to write a robust script.
3- I cannot find anyone making the odbcconf.exe thing to work. Anyway, I
think it would be useless for my purposes.
4- Solutions with ODBC API calls or Registry API calls which just
replicates one of the broken methods detailed above.
So my question is : is there any robust, efficient, professional
solution (I usually do not consider registry wizardry to fulfill these
criterions but I will take whatever you may propose) to export one SQL
Server DSN configuration from one machine to another ? Or is it hopeless
and someone in Microsoft definitely miss something here ?
By DSN configuration, I mean everything which can be set via the ODBC
administrator interface. And the export method should optimally not
require more knowledge (ie. parameters) than the one passed to the
administrator GUI.
I easily understand that some of these parameters are machine/domain
dependant, but there should be a way to edit them via scripts (perl
regexp or anything else) if the configuration files happened to be text
ones. Otherwise, the export would be meaningless.
I hope that what I am asking makes some sense. Maybe not, I might
overlook some SQL Server configuration issues here.
Thanks for any hints.
Patrick MzardThe following articles can provide a couple of different
methods as well as more information on creating DSNs
programmatically:
HOWTO: Create and Remove a DSN in Visual Basic
http://support.microsoft.com/defaul...b;EN-US;q171146
HOWTO: Programmatically Create a DSN for SQL Server with VB
http://support.microsoft.com/defaul...b;EN-US;q184608
HOWTO: Set Up ODBC Data Sources When Distributing Apps
http://support.microsoft.com/defaul...kb;EN-US;123008
-Sue
On Mon, 01 Mar 2004 20:20:47 +0100, Patrick Mzard
<patrick.mezard@.ifrance.com> wrote:

>Hello,
>I would like to create a brand new system DSN, programmatically,
>targeting an MS-SQL Server 2000 database, and with networking options
>(pipes,TCP/IP, etc.).
>Until now the only solutions I managed to find on google.groups or
>forums are:
>1- The usual "Why don't you do it manually ?" and other classical
>off-topic answers.
>2- The "Dump the registry keys in HKLM\Software\ODBC etc." solution.
>Relying on this single registry entry is not enough since it only
>configures the DSN registration, not its advanced connection options (at
>least for SQL Server). Particularly, networking options cannot be set
>this way. With Sysinternals RegMon and some additional MSDN
>documentation I finally understood that some stuff was written in
>"HKLM\Software\Microsoft\MSSQLServer\...\ConnectTo". My problem is I
>have not enough documentation on the value of these keys (plus the ones
>in \TDS) to write a robust script.
>3- I cannot find anyone making the odbcconf.exe thing to work. Anyway, I
>think it would be useless for my purposes.
>4- Solutions with ODBC API calls or Registry API calls which just
>replicates one of the broken methods detailed above.
>So my question is : is there any robust, efficient, professional
>solution (I usually do not consider registry wizardry to fulfill these
>criterions but I will take whatever you may propose) to export one SQL
>Server DSN configuration from one machine to another ? Or is it hopeless
>and someone in Microsoft definitely miss something here ?
>By DSN configuration, I mean everything which can be set via the ODBC
>administrator interface. And the export method should optimally not
>require more knowledge (ie. parameters) than the one passed to the
>administrator GUI.
>I easily understand that some of these parameters are machine/domain
>dependant, but there should be a way to edit them via scripts (perl
>regexp or anything else) if the configuration files happened to be text
>ones. Otherwise, the export would be meaningless.
>I hope that what I am asking makes some sense. Maybe not, I might
>overlook some SQL Server configuration issues here.
>Thanks for any hints.
>Patrick Mzard|||> The following articles can provide a couple of different
> methods as well as more information on creating DSNs
> programmatically:
> HOWTO: Create and Remove a DSN in Visual Basic
> http://support.microsoft.com/defaul...b;EN-US;q171146
> HOWTO: Programmatically Create a DSN for SQL Server with VB
> http://support.microsoft.com/defaul...b;EN-US;q184608
> HOWTO: Set Up ODBC Data Sources When Distributing Apps
> http://support.microsoft.com/defaul...kb;EN-US;123008
> -Sue
Thank you for the links but I have already read these articles and they fall
in the section 4 category described in my original post: API calls (via VB)
which do not provide more options than the basic registry tricks. Or maybe I
really missed something, could you configure the SQL Server network library
to use with these methods ?
Patrick Mzard|||Yes - It's one of the driver attributes you can supply, e.g.
in the first example, you can add the following to the
strAttributes:
Network=DBMSSOCN (tcp/ip)
or
Network=DBNMPNTW (named pipes)
You have to set the address accordingly.
-Sue
On Tue, 2 Mar 2004 06:51:46 +0100, "Patrick.Mzard"
<patrick.mezard@.ifrance.fr> wrote:

>Thank you for the links but I have already read these articles and they fal
l
>in the section 4 category described in my original post: API calls (via VB)
>which do not provide more options than the basic registry tricks. Or maybe
I
>really missed something, could you configure the SQL Server network library
>to use with these methods ?
>Patrick Mzard
>|||Sue Hoegemeier wrote:
> Yes - It's one of the driver attributes you can supply, e.g.
> in the first example, you can add the following to the
> strAttributes:
> Network=DBMSSOCN (tcp/ip)
> or
> Network=DBNMPNTW (named pipes)
> You have to set the address accordingly.
Great I finally got it.
Here is the solution (maybe it will help someone who knows...).
I was unaware that all the ODBC administrator options were actually DSN
connection string parameters. I found the SQL Server parameter list and
description in the SQL Server documentation (by looking for the network
string you gave me and stumbling onto the "SQLConfigDataSource" function ).
Then I managed to get the odbcconf.exe thing to work (the use of pipes
'|' as separator instead of semi-colons is really misleading) and
register a data source with it. I do not know if DSN can be removed via
odbcconf, but anyway I can rewrite a simple call to SQLConfigDataSource
with the correct options if needed.
Thank you very much for your help, I would have never found it, had not
you insisted your solution was a valid one.
Patrick Mzard|||Your quite welcome...and thanks for posting back your
results.
-Sue
On Tue, 02 Mar 2004 18:30:16 +0100, Patrick Mzard
<patrick.mezard@.ifrance.com> wrote:

>Sue Hoegemeier wrote:
>Great I finally got it.
>Here is the solution (maybe it will help someone who knows...).
>I was unaware that all the ODBC administrator options were actually DSN
>connection string parameters. I found the SQL Server parameter list and
>description in the SQL Server documentation (by looking for the network
>string you gave me and stumbling onto the "SQLConfigDataSource" function ).
>Then I managed to get the odbcconf.exe thing to work (the use of pipes
>'|' as separator instead of semi-colons is really misleading) and
>register a data source with it. I do not know if DSN can be removed via
>odbcconf, but anyway I can rewrite a simple call to SQLConfigDataSource
>with the correct options if needed.
>Thank you very much for your help, I would have never found it, had not
>you insisted your solution was a valid one.
>Patrick Mzard

Monday, March 19, 2012

Crashing server (Event ID 333)

Hello,
We experience problems with machines running SQL Servers 2005 in our
production environment. This problem is rather connected to OS or network
settings but hopefully someone here can help. The error below appears several
times in a minute and leads to crash of a machine.
We have clustered environment Windows Servers 2003 SP2 x64 + SQL Server 2005
SP2. This problem started to occur after installation of automatic updates
(bunch of security updates).
Has anyone solved similar issue? Could someone help to track down the problem?
Many thanks
eXavier
Event Type: Error
Event Source: Application Popup
Event Category: None
Event ID: 333
Date: 07.04.2008
Time: 09:01:57
User: N/A
Computer: CMPNT45
Description:
An I/O operation initiated by the Registry failed unrecoverably. The
Registry could not read in, or write out, or flush, one of the files that
contain the system's image of the Registry.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 00 00 00 00 01 00 6c 00 .....l.
0008: 00 00 00 00 4d 01 00 c0 ...M..Ã?
0010: 00 00 00 00 4d 01 00 c0 ...M..Ã?
0018: 00 00 00 00 00 00 00 00 ......
0020: 00 00 00 00 00 00 00 00 ......I am a consultant by trade and help people with SQL Server problems for a
living. But I gotta say when something like this occurs MY first action
would be (and my advice to my clients would be) call Microsoft PSS!! :)
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"eXavier" <eXavier@.nospam.nospam> wrote in message
news:70DC487A-4928-40E1-9DC0-59FB0AB1B5AB@.microsoft.com...
> Hello,
> We experience problems with machines running SQL Servers 2005 in our
> production environment. This problem is rather connected to OS or network
> settings but hopefully someone here can help. The error below appears
> several
> times in a minute and leads to crash of a machine.
> We have clustered environment Windows Servers 2003 SP2 x64 + SQL Server
> 2005
> SP2. This problem started to occur after installation of automatic updates
> (bunch of security updates).
> Has anyone solved similar issue? Could someone help to track down the
> problem?
> Many thanks
> eXavier
>
> Event Type: Error
> Event Source: Application Popup
> Event Category: None
> Event ID: 333
> Date: 07.04.2008
> Time: 09:01:57
> User: N/A
> Computer: CMPNT45
> Description:
> An I/O operation initiated by the Registry failed unrecoverably. The
> Registry could not read in, or write out, or flush, one of the files that
> contain the system's image of the Registry.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> Data:
> 0000: 00 00 00 00 01 00 6c 00 .....l.
> 0008: 00 00 00 00 4d 01 00 c0 ...M..À
> 0010: 00 00 00 00 4d 01 00 c0 ...M..À
> 0018: 00 00 00 00 00 00 00 00 ......
> 0020: 00 00 00 00 00 00 00 00 ......
>|||Hello,
I agree with Kevin it's best taht you call MS PSS for memory dump analysis
on this server crash issue. For a complete list of Microsoft Product
Support Services phone numbers, please go to the following address on the
World Wide Web:
http://support.microsoft.com/directory/overview.asp
Also, you may want to use add/edit the following registry key to see if it
helps
In the new HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session
Manager\Configuration Manager subkey, configure the following entry:
Name: RegistryLazyFlushInterval
Data Type: REG_DWORD
Value data: 60 (decimal)
You may try to increase Windows paging file size to see if it's helpful.
It's possible that this kind of issue occurs when there are some issues
related to server hardware driver. For example, if the operating system
cannot satisfy the contiguous memory blocks under the 4 GB space, the
server may become unresponsive.
Reference the following HP site details:
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&
objectID
=c00688313&jumpid=reg_R1002_USEN
Please let's know if you have any further questions or comments. Thanks.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up responske may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello,
It seems the problem was really caused by drivers for extra sotrage added
during maintenace period.
Thanks for all responses!
Best Regards
eXavier
""Peter Yang[MSFT]"" wrote:
> Hello,
> I agree with Kevin it's best taht you call MS PSS for memory dump analysis
> on this server crash issue. For a complete list of Microsoft Product
> Support Services phone numbers, please go to the following address on the
> World Wide Web:
> http://support.microsoft.com/directory/overview.asp
>
> Also, you may want to use add/edit the following registry key to see if it
> helps
> In the new HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session
> Manager\Configuration Manager subkey, configure the following entry:
> Name: RegistryLazyFlushInterval
> Data Type: REG_DWORD
> Value data: 60 (decimal)
> You may try to increase Windows paging file size to see if it's helpful.
> It's possible that this kind of issue occurs when there are some issues
> related to server hardware driver. For example, if the operating system
> cannot satisfy the contiguous memory blocks under the 4 GB space, the
> server may become unresponsive.
> Reference the following HP site details:
> http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&
> objectID
> =c00688313&jumpid=reg_R1002_USEN
> Please let's know if you have any further questions or comments. Thanks.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up responske may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> <http://msdn.microsoft.com/subscriptions/support/default.aspx>.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hello,
Nice to hear you solved the problem!
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================
When responding to posts, please "Reply to Group" via your
newsreader so that others may learn and benefit from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Thursday, March 8, 2012

CPU Use Rising

Hello Group,
what is a good starting point setting a trace to troubleshoot CPU usage? My
network admin asked me to look at one of the servers: it seems after our
weekly restarts, the CPU usage keeps rising. What can I begin to look at to
determine what is causing this?Rich,
Start with Task Manager to determine what app is causing the issue. If SQL
Server, then drill down using System Monitor and Profiler.
HTH
Jerry
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:B55F66D8-C41D-4C04-9BC6-87F176891311@.microsoft.com...
> Hello Group,
> what is a good starting point setting a trace to troubleshoot CPU usage?
> My
> network admin asked me to look at one of the servers: it seems after our
> weekly restarts, the CPU usage keeps rising. What can I begin to look at
> to
> determine what is causing this?

Saturday, February 25, 2012

CPAN for SSIS?

Perl has CPAN, the Comprehensive Perl Archive network, where you can download everything under the sun.

What about CSAN, a comprehensive SSIS archive network, with an archive of Script Transforms, Script Tasks, CLR Tasks and CLR Transforms, not forgetting package metadata programs either? I realize sqlis.com exists, as does this forum, but neither are repositories, and the blogs tend to be rather evanescent in nature. I don't believe there is a site/service with the ability to post SSIS transforms similar to that facility within the Perl, python and ruby communities.I started http://wiki.sqlis.com because it allows others to contribute easily. A step in the right direction from the fixed sqlis site?