Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Friday, March 30, 2012

How to insert record to SQL server which is on the other machine from client computer?

I want to write simple sql database project that that works in the network. and i need to insert record from a client to a server that is on the other machine.

This is a pretty broad question. I suggest you do some additional research online or via any one of a number of excellent books, articles or whitepapers.

This will require that you (at least)

Install and configure the SQL Server on the remote system.

Friday, March 9, 2012

How to import an mdf file into SQL Server Management Studio Express?

Hi

I had to recover my computer but before I did that I grabbed a new version of my mdf file but I don't know how to actually import it into SQL Server Management Studio Express evertime I try to open the file up it just crashes.

I rather not have to redue that whole database again. I am a noob so step by step instructions are needed.

Thanks

Open SQL Management Studio Express and log in to the server to which you want to attach the database. In the 'Object Explorer' window, right-click on the 'Databases' folder and select 'Attach...' The 'Attach Databases' window will open; inside that window click 'Add...' and then navigate to your .MDF file and click 'OK'. Click 'OK' once more to finish attaching the database and you are done. The database should be available for use.

|||

Thanks but I get an error.


|||

I think I got it working.

|||

aggiekevin:

Open SQL Management Studio Express and log in to the server to which you want to attach the database. In the 'Object Explorer' window, right-click on the 'Databases' folder and select 'Attach...' The 'Attach Databases' window will open; inside that window click 'Add...' and then navigate to your .MDF file and click 'OK'. Click 'OK' once more to finish attaching the database and you are done. The database should be available for use.

This is true. One important note I would like to menion is, it is highly recomended to take a copy of .mdf file bedore attaching it to the new database. Why? Because if this .mdf file was one of the SQL Server 2000 databases and you attached it to one of the SQL Server 2005 databases. There is no way -if you wish in futute- to detach that .mdf file from SQL Server 2005 and attached it again in SQL Server 2000 or eailer version.

Good luck.

|||

Thanks

How to import *.mdf file

I have a SQL Server 2005 database *.mdf file that I would like to import into another SQL Server 2005 engine on another computer. I don't see how to do this.

How can I import a *.mdf file to create a copy of an exiisting database from another computer?

Thanks.

Hi there,

If you want a copy of the database on both servers then you can use the Copy Database Wizard. On the server that hosts the DB you want to copy, right click on the "Databases" node in Object Explorer then go Tasks > Copy Database.

If you only want a database on one server, you can detach the database by right clicking on the "Databases" node in Object Explorer then going Tasks > Detach. If you're .mdf file isn't currently attached to a database, then ignore this bit and see below.

After detaching you can copy the .mdf and .ldf files to your target server and in Mangement Studio on your target server you can right click on the "Databases" node in Object Explorer then select the Attach option (it's either Attach or Tasks > Attach, one of those anyway)

Hope that helps a bit, but sorry if it doesn't
|||

Using Attach in the Object Explorer did the trick.

Why can't they make this easier and more consistent with other software? Why can't the us Import or Add From File under Databases or something as equally obvious? Why doesn't the documentation have help on Importing *.mdf files?

Thanks Very Much for the Assistance.

|||

Hi,

I'm trying to open a *.mdf with Microsoft SQL Server 2005 Express on Vista. The Tasks menu does not appear when I click databases in Object Explorer. How do I see my databases?

Any hints appreciated. I've tried 'restore database' but get the error message below.

HS

TITLE: Microsoft SQL Server Management Studio Express

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)


ADDITIONAL INFORMATION:

The media family on device '*.Mdf' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476


BUTTONS:

OK

How to import *.mdf file

I have a SQL Server 2005 database *.mdf file that I would like to import into another SQL Server 2005 engine on another computer. I don't see how to do this.

How can I import a *.mdf file to create a copy of an exiisting database from another computer?

Thanks.

Hi there,

If you want a copy of the database on both servers then you can use the Copy Database Wizard. On the server that hosts the DB you want to copy, right click on the "Databases" node in Object Explorer then go Tasks > Copy Database.

If you only want a database on one server, you can detach the database by right clicking on the "Databases" node in Object Explorer then going Tasks > Detach. If you're .mdf file isn't currently attached to a database, then ignore this bit and see below.

After detaching you can copy the .mdf and .ldf files to your target server and in Mangement Studio on your target server you can right click on the "Databases" node in Object Explorer then select the Attach option (it's either Attach or Tasks > Attach, one of those anyway)

Hope that helps a bit, but sorry if it doesn't
|||

Using Attach in the Object Explorer did the trick.

Why can't they make this easier and more consistent with other software? Why can't the us Import or Add From File under Databases or something as equally obvious? Why doesn't the documentation have help on Importing *.mdf files?

Thanks Very Much for the Assistance.

|||

Hi,

I'm trying to open a *.mdf with Microsoft SQL Server 2005 Express on Vista. The Tasks menu does not appear when I click databases in Object Explorer. How do I see my databases?

Any hints appreciated. I've tried 'restore database' but get the error message below.

HS

TITLE: Microsoft SQL Server Management Studio Express

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)


ADDITIONAL INFORMATION:

The media family on device '*.Mdf' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476


BUTTONS:

OK

Wednesday, March 7, 2012

How To Implement sql server database on the client's computer?

Hello,
I finished my vb.net application, the application uses sql server and run pretty well on my pc. Now I want to install this application on the customer's computer, and the issue I'm not sure about is, what do I need to install on the client's computer concerning the database?
Do I install SQL Server and restore the database there? how to secure the database and make sure nobody will be able to edit the data from Enterprise Manager. What if someone uninstalled SQL Server?

Please I need help in this issue since I'm a beginner.

Thanks.

Quote:

Originally Posted by Tea Maker

Hello,
I finished my vb.net application, the application uses sql server and run pretty well on my pc. Now I want to install this application on the customer's computer, and the issue I'm not sure about is, what do I need to install on the client's computer concerning the database?
Do I install SQL Server and restore the database there? how to secure the database and make sure nobody will be able to edit the data from Enterprise Manager. What if someone uninstalled SQL Server?

Please I need help in this issue since I'm a beginner.

Thanks.


You will need to install SQL Server on your customer's server (or just his/her computer if they're the only person that will be using it). As for security, you'll need to set up database users and set their permissions accordingly. Obviously you'll need to change your app to reflect the change of database location.|||

Quote:

Originally Posted by DonlonP

You will need to install SQL Server on your customer's server (or just his/her computer if they're the only person that will be using it). As for security, you'll need to set up database users and set their permissions accordingly. Obviously you'll need to change your app to reflect the change of database location.


If I set users permissions then nobody will be able to open the database? because I've tried this before, but anyone can access the database through Enterprise Manager without username and password? And what about if someone uninstalled sql server?
I'll be thanksfull if you provide me some links where I can read articles about this issue because I couldn't find any related articles.

Thanks|||

Quote:

Originally Posted by Tea Maker

If I set users permissions then nobody will be able to open the database? because I've tried this before, but anyone can access the database through Enterprise Manager without username and password? And what about if someone uninstalled sql server?
I'll be thanksfull if you provide me some links where I can read articles about this issue because I couldn't find any related articles.

Thanks


On second thoughts you don't even need to set user permissions if you install SQL Server 2000 desktop edition (which is free!) this doesn't come with enterprise manager anyway. Download from:
http://www.microsoft.com/downloads/...&displaylang=en
Obviously if someone uninstalled SQL Server then you wouldn't have a database and your app wouldn't work, and the person who uninstalled it would be a complete muppet!|||

Quote:

Originally Posted by DonlonP

On second thoughts you don't even need to set user permissions if you install SQL Server 2000 desktop edition (which is free!) this doesn't come with enterprise manager anyway. Download from:
http://www.microsoft.com/downloads/...&displaylang=en
Obviously if someone uninstalled SQL Server then you wouldn't have a database and your app wouldn't work, and the person who uninstalled it would be a complete muppet!


Wow, Thanks alot that helped me out so much.
Just one more question, How can I transfer the database from my computer to the other, do I create a backup and restore it there? and where do I place my databases.