PDA

Prikaži potpunu verziju : .mdf database import


BlueJ
29.10.2015, 0:40
Poz,
Imam projekat radjen u visual studio 2014. Zanima me kako da importujem bazu koju imam u .mdf i .ldf ekstenziji?

player1
29.10.2015, 9:03
Ako imas MS SQL serever instaliran, izguglaj malo kako da attach-ujes bazu na njega preko MS SQL Server Management Studija.

BlueJ
29.10.2015, 11:24
To sam vec uradio ali javlja gresku nakon pokretanja aplikacije. Treba li jos nedje da ucitam bazu?http://postimg.org/image/6l16e7m5j/

voodoo_
29.10.2015, 13:03
Treba da podesiš prava pristupa SQL-u koristeći Management Studio:

1. Adding Login
a) Click on the security\logins folder
b) If the ASPNet user exist you can skip this section
c) Right click login folder and choose "New Login"
d) Click the "Search" button, then the "Advance" button, and then the "Find Now". This will bring up a list of user on the computer, and select the ASPNet account
e) Make sure Windows authentication is checked and click "OK" to add user

2. Adding Database User
a) Click on "Databases\<YourDatabase>\Security\Users" folder
b) If the ASP.Net user exist you can skip this section
c) Right click the user folder and choose "New User"
d) Click on the "..." button next to the Login Name, then click on the "Browse" button
e) Check the ASPNet user and click "OK" button. Click the OK button on the Select Login screen, enter ASPNET as user name and this will add the user
f) Under database role membership check one of the following combinations. Option #2 is more secure. Click "OK" button when done
Permission Options #1
dbowner
Permission Options #2
db_datareader
db_datewriter
db_ddladmin
db_securityadmin

3. Setting Database Permissions (Only needed it Option #2 is chosen above)
a) Right click on the database you attached to and choose "Properties"
b) Click on "Permissions" under select a page (upper-left of screen)
c) Under Explicit permission for {Database Name}, make sure that the Grant box is checked for Execute

BlueJ
29.10.2015, 20:53
Hvala na trudu! Problem je bio jer je tcp po defoultu izgasen, upalio sam ga i sad je ok.