July 20, 2008 at 11:09 pm
problem is occured when i restore datbase using query,and problem isolved by changing configuaration settings (built in user as local system) manually .
my dbt is is there is any other method to solve this problem..
without doing manually
July 20, 2008 at 11:17 pm
Pls explain clearly and in detail.
"Keep Trying"
July 21, 2008 at 6:01 am
i have to make a setup for installing sql express and restoring database
using c#.net
i have done following
1.silent insatl sql express
..............
"/qb SECURITYMODE=SQL SAPWD=\Password\" INSTANCENAME=\"SQLExpr\" DISABLENETWORKPROTOCOLS=0 " +
"INSTALLSQLDATADIR=\"" + txtSql.Text + "\\SQLExpress\" INSTALLSQLDIR=\"" +
txtSql.Text + "\\SQLExpress\" ADDLOCAL=All AUTOSTART=1";
2.restoring database
..........................
"restore database [DatabaseName] from disk='" + file + "' with" +
" move '" + logicalFiles[0] + "' To '" + dir + "\\SchedulerPro_data.mdf'," +
" move '" + logicalFiles[1] + "' To '" + dir + "\\SchedulerPro_log.ldf'," +
" password=Password'";
//---
when executing 2nd one returns an error: cannot access folder data
//--
problem is solved when i change account as local system in configuaration manager manually
..
is there is any other method that can solve using sql query
advance thanks..
July 21, 2008 at 11:29 pm
Does the account that cause the error have proper rights on the system.
"Keep Trying"
July 22, 2008 at 12:09 am
please give me detaild instructions..
July 24, 2008 at 2:24 am
How do you login to sql server? with a network account login or sql login
"Keep Trying"
July 24, 2008 at 2:51 am
It looks like you do not have permission to access that folder. Get the sysadmins to give you permission and it should work.
July 29, 2008 at 7:50 am
i am login with sql server authentication, and account type is network service and i am restoring database from same system in which sql server is insatlled.
waiting ur reply
thnks
July 30, 2008 at 2:13 am
if sql server is running under a network service you will need to assign permissions to the folder you are referencing in the code.
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply