Friday, February 17, 2012

default sql server name and password

i want to know how to get default sql server name and password. os that i dont had to ask the user to enter his sql server name and passwordWhat do you mean by default server name and password ? There is no default password as you define it during the installation process. The servername of SQL Server is usally if you don′t specify any named instance, the servername itself.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||

i think you did not picked my question.i want that name of sql server used in the connection string like

user id=sa; password=;inittialcatalog=; datasource="local" or etc,

i want to know this name used in the datasource property whether it is instance name or default(instace name not specified).

|||

Hi,

this either the name of the server or the instance name (depending if you installed a default instance, then its only the server name or a named instance, then its of the following syntax: MachineName\InstanceName). If you have choosen another port than 1433 you either have to start SQL Server Browser to have this service redirect the request to the non default port, or specify it with your connection string that you have the following syntax: MachineName\InstanceName,Port OR MachineName,Port.

Sample: DATA Source=MyServer\SomeNamedInstance

For more informations pick a connectionstring from www.connectionstrings.com


HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment