14 Replies - 1069 Views - Last Post: 10 November 2015 - 11:18 AM

#1 hami_78  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 10-July 15

retrieve database from vmware

Posted 09 November 2015 - 09:54 AM

I have C# front end application and database is stored in SQL SERVER MANAGEMENT STUDIO 2008 , database is on my pc . The connection string i am using is below.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="WpfApplication1.Properties.Settings.myprojectConnectionString"
            connectionString="Data Source=host_IP,DATABASE_TCP_PORT;Network Library=DBMSSOCN;Initial Catalog=MYPROJECT;Integrated Security=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
</configuration>



Every thing is working fine , now i transferred my frontend application on VMWARE , but database is still in SQL SERVER MANAGEMENT STUDIO 2008 on my pc .

I defined INBOUND IN both of firewalls to allow my DATABASE_TCP_PORT.
and THE NUMBER OF DATABASE_TCP_PORT is coming from SQLSERVER CONFIGURATION MANAGER / MYSQLSERVER / TCP DYNAMIC PORT

but when i run my exe in vmware whe it turns to fetch data from sql system hang and message my_application has stopped working.

extra informations :
my wmware network mode is NAT
FRAMEWORK NET IS UP TO DATE

Is This A Good Question/Topic? 0
  • +

Replies To: retrieve database from vmware

#2 sam.ganjavi  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 75
  • Joined: 03-September 15

Re: retrieve database from vmware

Posted 09 November 2015 - 11:50 AM

Hi

Have you verified that your SQL server is configured to accept a connection via TCP-IP and over the network. You have to check the SQL server Configuration Manager and make sure that SQL Server Browser is running and Client Protocol TCP/IP is enabled(Under Client Configuration) and configured properly, Ip Address and Port #(Under SQL Server Network Configuration).
Was This Post Helpful? 0
  • +
  • -

#3 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,969
  • Joined: 05-June 08

Re: retrieve database from vmware

Posted 09 November 2015 - 11:51 AM

can you ping your local pc from inside the vm?
Was This Post Helpful? 0
  • +
  • -

#4 hami_78  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 10-July 15

Re: retrieve database from vmware

Posted 09 November 2015 - 02:06 PM

View PostDamage, on 09 November 2015 - 11:51 AM, said:

can you ping your local pc from inside the vm?

yes
i ping from vmware to the server(the PC which SQLSERVER is installed)
ping myIP
pinging [MY_IP]with 32bytes of data :
request time out
request time out
request time out
request time out

sent 4 , recieve 0, lost 4

extra comments :
ip server is ipv4 from my local network and sharing center
ip vmware is ipv4 from my guest network and sharing center and put above ip as a gateway for wmvare
Was This Post Helpful? 0
  • +
  • -

#5 sam.ganjavi  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 75
  • Joined: 03-September 15

Re: retrieve database from vmware

Posted 09 November 2015 - 02:15 PM

View Posthami_78, on 09 November 2015 - 04:06 PM, said:

View PostDamage, on 09 November 2015 - 11:51 AM, said:

can you ping your local pc from inside the vm?

yes
ping myIP
pinging [MY_IP]with 32bytes of data :
request time out
request time out
request time out
request time out

sent 4 , recieve 0, lost 4


This means your ping is failing, Either your security setting blocks pinging or the Ip address you are pinging is not available and is not responding.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13560
  • View blog
  • Posts: 54,109
  • Joined: 12-June 08

Re: retrieve database from vmware

Posted 09 November 2015 - 02:51 PM

Like the TV show, lost is bad.

Quote

sent 4 , recieve 0, lost 4

Was This Post Helpful? 0
  • +
  • -

#7 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: retrieve database from vmware

Posted 09 November 2015 - 02:56 PM

Quote

database is stored in SQL SERVER MANAGEMENT STUDIO 2008


Correction: Your database is a Sql Server 2008 database. "Sql Server Management Studio" is the tool you use to manage the database.

That would be like saying your application runs on Visual Studio 2013. It was written using that IDE, but it's a tool, not a platform.

With that in mind, why would you have a DB server on your local machine, but a web front end on a VM? You can install SQL Server 2008 (or a much newer version) on your VM, and (should) be able to connect to it using SSMS on your local machine.

That doesn't answer your question, but I'm not a network guy (your question is a networking question, not a programming one).
Was This Post Helpful? 0
  • +
  • -

#8 hami_78  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 10-July 15

Re: retrieve database from vmware

Posted 10 November 2015 - 06:33 AM

View Postsam.ganjavi, on 09 November 2015 - 11:50 AM, said:

Hi

Have you verified that your SQL server is configured to accept a connection via TCP-IP and over the network. You have to check the SQL server Configuration Manager and make sure that SQL Server Browser is running and Client Protocol TCP/IP is enabled(Under Client Configuration) and configured properly, Ip Address and Port #(Under SQL Server Network Configuration).

i am sure about Client Protocol TCP/IP
but how can i check that SQL Server Browser is running ?
Was This Post Helpful? 0
  • +
  • -

#9 sam.ganjavi  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 75
  • Joined: 03-September 15

Re: retrieve database from vmware

Posted 10 November 2015 - 07:05 AM

Look for SQL Server Configuration manager either Microsoft SQL Server 2008-> Configuration tools or Microsoft SQL Server 2008 R2 in you start menu. Once you open the configuration Manager on the left hand side click on SQL Server Services, On the right side you will find SQL Server Browser. And then Also check under Network configuration the SQL TCP/IP status and configuration.
Was This Post Helpful? 0
  • +
  • -

#10 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5923
  • View blog
  • Posts: 20,254
  • Joined: 05-May 12

Re: retrieve database from vmware

Posted 10 November 2015 - 09:06 AM

This is definitely looking like software support issue and not a C# question. Moving...
Was This Post Helpful? 0
  • +
  • -

#11 hami_78  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 10-July 15

Re: retrieve database from vmware

Posted 10 November 2015 - 10:46 AM

View PostCurtis Rutland, on 09 November 2015 - 02:56 PM, said:

Quote

database is stored in SQL SERVER MANAGEMENT STUDIO 2008


Correction: Your database is a Sql Server 2008 database. "Sql Server Management Studio" is the tool you use to manage the database.

That would be like saying your application runs on Visual Studio 2013. It was written using that IDE, but it's a tool, not a platform.

With that in mind, why would you have a DB server on your local machine, but a web front end on a VM? You can install SQL Server 2008 (or a much newer version) on your VM, and (should) be able to connect to it using SSMS on your local machine.

That doesn't answer your question, but I'm not a network guy (your question is a networking question, not a programming one).

dear my friend
it is a good practice and convenient way that you just have your database installed on one server and your application is installed on other clients and connect to the database to UPDATE,INSERT , DELETE ,SELECT
for me i wanna test my app in a this environment to put it in office LAN NETWORK.
THANKS
Was This Post Helpful? 0
  • +
  • -

#12 hami_78  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 10-July 15

Re: retrieve database from vmware

Posted 10 November 2015 - 11:06 AM

I have C# front end application and database is stored in SQL SERVER MANAGEMENT STUDIO 2008 , database is on my pc . The connection string i am using is below.

01
<?xml version="1.0" encoding="utf-8" ?>
02
<configuration>
03
<configSections>
04
</configSections>
05
<connectionStrings>
06
<add name="WpfApplication1.Properties.Settings.myprojectConnectionString"
07
connectionString="Data Source=host_IP,DATABASE_TCP_PORT;Network Library=DBMSSOCN;Initial Catalog=MYPROJECT;Integrated Security=True"
08
providerName="System.Data.SqlClient" />
09
</connectionStrings>
10
</configuration>


Every thing is working fine , now i transferred my frontend application on VMWARE , but database is still in SQL SERVER MANAGEMENT STUDIO 2008 on my pc .

I defined INBOUND IN both of firewalls to allow my DATABASE_TCP_PORT.
and THE NUMBER OF DATABASE_TCP_PORT is coming from SQLSERVER CONFIGURATION MANAGER / MYSQLSERVER / TCP DYNAMIC PORT

but when i run my exe in vmware whe it turns to fetch data from sql system hang and message my_application has stopped working.

extra informations :
my wmware network mode is NAT
FRAMEWORK NET IS UP TO DATE
Was This Post Helpful? 0
  • +
  • -

#13 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13560
  • View blog
  • Posts: 54,109
  • Joined: 12-June 08

Re: retrieve database from vmware

Posted 10 November 2015 - 11:11 AM

Do not open duplicate topics. Merging.
Was This Post Helpful? 0
  • +
  • -

#14 hami_78  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 10-July 15

Re: retrieve database from vmware

Posted 10 November 2015 - 11:17 AM

View Postsam.ganjavi, on 09 November 2015 - 02:15 PM, said:

View Posthami_78, on 09 November 2015 - 04:06 PM, said:

View PostDamage, on 09 November 2015 - 11:51 AM, said:

can you ping your local pc from inside the vm?

yes
ping myIP
pinging [MY_IP]with 32bytes of data :
request time out
request time out
request time out
request time out

sent 4 , recieve 0, lost 4


This means your ping is failing, Either your security setting blocks pinging or the Ip address you are pinging is not available and is not responding.

I FOUND right now that i was doing my steps with a STANDARD WINDOWS 7 USER ACCOUNT TYPE
now i wanna change the type to ADMINISTRATOR i hope it works
is it the matter?
Was This Post Helpful? 0
  • +
  • -

#15 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6560
  • View blog
  • Posts: 30,699
  • Joined: 10-May 07

Re: retrieve database from vmware

Posted 10 November 2015 - 11:18 AM

View Posthami_78, on 10 November 2015 - 02:06 PM, said:

I defined INBOUND IN both of firewalls to allow my DATABASE_TCP_PORT.
and THE NUMBER OF DATABASE_TCP_PORT is coming from SQLSERVER CONFIGURATION MANAGER / MYSQLSERVER / TCP DYNAMIC PORT

but when i run my exe in vmware whe it turns to fetch data from sql system hang and message my_application has stopped working.


Verify, use an SQL client outside of the VM to verify that you can connect to the SQL server. Blindly assuming it's the application at fault, that you are currently working on in C#, can be a dangerous assumption. You need to verify that your 1st statement is accurate. Just because you say that you've allowed it, doesn't mean that it is working.

Set up the server.
Verify communication.
Work on your app.

Just my advise. Best of luck.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1