amin.m1993
دوشنبه 16 اردیبهشت 1392, 21:21 عصر
سلام
قبل از طرح سوال بگم تاپیک های این سایت رو خوندم و تو گوگل هم سرچ کردم و نتیجه نگرفتم در نهایت یه تاپیک جدید زدم.
از طریق یه برنامه ی win app میخوام به sql وصل بشم اما connection string رو هرچی میگیرم یه اروری میگیره
مثلا برای:
Server=(local);Database=darukhane;integrated security=true
ارور زیر رو میگیره
Cannot open database "darukhane" requested by the login. The login failed.
Login failed for user 'developer\amin'.
برای Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirec tory|\darukhane.mdf;integrated security=true
این ارور :A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)
و
Server=.\SQLExpress;AttachDbFilename=|DataDirector y|\darukhane.mdf;Integrated Security=SSPI;Persist Security Info=False;Trusted_Connection=Yes
این ارور رو میگیره:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
البته قبلا هم با این ارورها روبه رو شده بودم اما همیشه با یکی از اینها بالاخره وصل میشدم.
کارهایی که کردم و نتیجه نداد :
1) از sql server configuration manager قسمت protocols و تب ip address تمام ip هارو enable کردم و tcp port همه رو روی 1433 تنظیم کردم
2) پایگاه داده رو detach کردم
3) برای develpoer\amin (یوزر من) توی sql server management از user mapping قسمت db_owner رو فعال کردم
...
دیگه نمیدونم چی کار کنم
در ضمن من چک کردم موقع نصب sql server (من 2012 نصب کردم) IIS با اون نصب نشده آیا میتونه از اون باشه ؟؟
لطفا راهنمایی کنید .
قبل از طرح سوال بگم تاپیک های این سایت رو خوندم و تو گوگل هم سرچ کردم و نتیجه نگرفتم در نهایت یه تاپیک جدید زدم.
از طریق یه برنامه ی win app میخوام به sql وصل بشم اما connection string رو هرچی میگیرم یه اروری میگیره
مثلا برای:
Server=(local);Database=darukhane;integrated security=true
ارور زیر رو میگیره
Cannot open database "darukhane" requested by the login. The login failed.
Login failed for user 'developer\amin'.
برای Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirec tory|\darukhane.mdf;integrated security=true
این ارور :A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)
و
Server=.\SQLExpress;AttachDbFilename=|DataDirector y|\darukhane.mdf;Integrated Security=SSPI;Persist Security Info=False;Trusted_Connection=Yes
این ارور رو میگیره:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
البته قبلا هم با این ارورها روبه رو شده بودم اما همیشه با یکی از اینها بالاخره وصل میشدم.
کارهایی که کردم و نتیجه نداد :
1) از sql server configuration manager قسمت protocols و تب ip address تمام ip هارو enable کردم و tcp port همه رو روی 1433 تنظیم کردم
2) پایگاه داده رو detach کردم
3) برای develpoer\amin (یوزر من) توی sql server management از user mapping قسمت db_owner رو فعال کردم
...
دیگه نمیدونم چی کار کنم
در ضمن من چک کردم موقع نصب sql server (من 2012 نصب کردم) IIS با اون نصب نشده آیا میتونه از اون باشه ؟؟
لطفا راهنمایی کنید .