I have installed SQL Server 2012 Express on a Windows Server 2008 Machine. The name of the machine is \"THEMACHINE\". While installation, I set SQL Server 2012 as \"Default
Reference: Creating and Configuring Universal Data Link (.udl) Files
Do following to Test connection and generate connection string,
Test connection
generate
1) Create query.udl file in the desktop
query.udl
2) Double click the file to open and do the following
3)Open the Query.udl in notepad, you will find the connectionstring.
Query.udl
connectionstring