Showing posts with label creation. Show all posts
Showing posts with label creation. Show all posts

Monday, March 12, 2012

Manual creation of DSNs

I'm trying to adapt the code in the article "How to Create ODBC DSN on
multiple SQL server Machines"
(http://www.databasejournal.com/feat...cle.php/2238221) to
create a script that will automate the creation of SQL Server DSNs.
The article's code writes the DSN to the appropriate location in the
registry--HKLM\SOFTWARE\ODBC\ODBC.INI\<DSN Name>. However, the code doesn't
seem to address how to write the SQL UserID and Password. It appears that
the SQL driver doesn't store that information in the registry.
Any suggestions on how to proceed? Thanks!"Stan" <NoSpam@.I> wrote in message
news:#qSSJ77zDHA.1740@.TK2MSFTNGP09.phx.gbl...
quote:

> I'm trying to adapt the code in the article "How to Create ODBC DSN on
> multiple SQL server Machines"
> (http://www.databasejournal.com/feat...cle.php/2238221) to
> create a script that will automate the creation of SQL Server DSNs.
> The article's code writes the DSN to the appropriate location in the
> registry--HKLM\SOFTWARE\ODBC\ODBC.INI\<DSN Name>. However, the code

doesn't
quote:

> seem to address how to write the SQL UserID and Password. It appears that
> the SQL driver doesn't store that information in the registry.
> Any suggestions on how to proceed? Thanks!

This article was designed to use Trusted Connections -- reference the
TrustedConnection = "yes" entry.
Usually it's not a good idea to embed the user name and password with the
DSN entry. Consider using DSN-less entries if you are writing a VB
application to access SQL Server. Here is a starting point for the
connection strings: http://www.able-consulting.com/ADO_Conn.htm
Steve

Manual creation of aspnet database fails "does not allow remote connections"

What do I have to do to get this to work?

C:\>aspnet_regsql.exe -A m -E

Start adding the following features:
Membership

............
An error has occurred. Details of the exception:
An error has occurred while establishing a connection to the server. When conne
cting to SQL Server 2005, this failure may be caused by the fact that under the
default settings SQL Server does not allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Unable to connect to SQL Server database.

Hi,

If you're connecting to a remote machine, you will need to turn on remote connection on that server. Please follow this KB article to achieve this.

http://support.microsoft.com/kb/914277/en-us

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

|||SQL Server is set to allow remote connections already. I probably should have mentioned that in the first post.|||

Hi,

Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

Is just a basic connectivity error meaning the client could not connect to the target SQL Server. So just follow the basic connectivity troubleshooting guidelines on our SQL Protocols blog, see:

SQL Server 2005 Connectivity Issue Troubleshoot - Part I

http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx

and

SQL Server 2005 Connectivity Issue Troubleshoot - Part II

http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx

This should help you debug the problem.

Monday, February 20, 2012

Management Studio scripting options

Hi there,
Is there apossibility to set the options for script creation in SQL
Server 2005 Management Studio? I want to create a script with a drop
and create statement...
Regards
Roman
No there isn't, all you can do is one or the other at the moment. It was
somehow missed from the released version. Lots of people have complained
and I am sure it will be back in witht he next sp.
Andrew J. Kelly SQL MVP
"Roman Mellenberger" <roman.mellenberger@.info-research.ch> wrote in message
news:v9b4s1hgm6pta45ukfoh9ucnjgs8ubdl6t@.4ax.com...
> Hi there,
> Is there apossibility to set the options for script creation in SQL
> Server 2005 Management Studio? I want to create a script with a drop
> and create statement...
> Regards
> Roman
|||Perhaps Bill's utility can be useful?
http://www.sqlteam.com/item.asp?ItemID=23185
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Roman Mellenberger" <roman.mellenberger@.info-research.ch> wrote in message
news:v9b4s1hgm6pta45ukfoh9ucnjgs8ubdl6t@.4ax.com...
> Hi there,
> Is there apossibility to set the options for script creation in SQL
> Server 2005 Management Studio? I want to create a script with a drop
> and create statement...
> Regards
> Roman