Showing posts with label changing. Show all posts
Showing posts with label changing. Show all posts

Thursday, March 29, 2012

attach error in sql server express management studio

tried to attach a database in sse-ms, and for some reason the database name is changing to G:\someFolder\some\Folder\db.mdf, even tho i dont have a drive g:,

during "attach as" screens inside sse-ms, , ie attach>add> then select the database the mdf loction is what it is suppose to be ie C:\inetpub\wwwroot\app_data\chp11\wroxunited.mdf but the database name in the same screen shot is G:\someOtherFolderAndPath\wroxunited.mdf and the attach as is also the G:\someOtherFolderAndPath\wroxunited.mdf.

pretty confused, could use a clue, thanks

my data entry error above, the mdf locattion in the sse-ms attach area/screen is C:\inetpub\wwwroot\chp11\app_data\wroxunited.mdf, the rest of the intial post is ok tho,

anyone know if the log file (ldf) is causing this problem, chp11 came in a download form the wrox book site btw.

|||hmm found a work around, ie just deleted that database from within sse-ms, had a backup of the mdf so wasnt to worried, anyway after deleting the mdf that had the G:\WrongPath\db.mdf, i was able to attach the desired database and the mdf location, the database name and the attach as are now all correct, still kinda interested in what caused that but i am now, thanks people, have a lot to learn about sql and permission tho,

Tuesday, March 27, 2012

Attach db ... but changing its db name

I've a copy of my customer db detached from its server.
I need to import into my SQL to compare data and structure with my
own to release him some new feature. Problem is how to import it.
If I simple attach db, SQL server mustn't do it, trapping duplicate
db name or something else (I wish is so and not overwrite db).
If I detach my db, and attach customer db ... I must rename db ...
but how? until today I never read of some function that rename
db ...
Can anyone give me more info please?
--
Sincerely
Andrea Morowhile attaching db with sp_attach_db you can specify the required name of
the database to be. If you want to rename the existing database you can make
use of system stored proceudre sp_renamedb
--
-Vishal
Andrea Moro <moroandreaET@.tiscalinet.it> wrote in message
news:#kH0j9LcDHA.1204@.TK2MSFTNGP12.phx.gbl...
> I've a copy of my customer db detached from its server.
> I need to import into my SQL to compare data and structure with my
> own to release him some new feature. Problem is how to import it.
> If I simple attach db, SQL server mustn't do it, trapping duplicate
> db name or something else (I wish is so and not overwrite db).
> If I detach my db, and attach customer db ... I must rename db ...
> but how? until today I never read of some function that rename
> db ...
> Can anyone give me more info please?
> --
> Sincerely
> Andrea Moro
>sql

Attach Database Issue

Hello,
I have just attached a database to a new server that I
successfully detached unfortunatly it said it was 'read
only'
Tried changing it, however there was a device activation
error on the data file.
Has anyone seen this before ?
J
Julie,
I had this once and tracked it down to NTFS permissions on the attached file
only allowing read access to the account under which SQL Server is running -
Assuming that it is not so simple as the file being read only.
So I would check what account SQL server is running under, then check the
file permissions to that account for the data and log files.
Mike John
"Julie" <anonymous@.discussions.microsoft.com> wrote in message
news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
> Hello,
> I have just attached a database to a new server that I
> successfully detached unfortunatly it said it was 'read
> only'
> Tried changing it, however there was a device activation
> error on the data file.
> Has anyone seen this before ?
> J
|||Thanks Mike

>--Original Message--
>Julie,
>I had this once and tracked it down to NTFS permissions
on the attached file
>only allowing read access to the account under which SQL
Server is running -
>Assuming that it is not so simple as the file being read
only.
>So I would check what account SQL server is running
under, then check the
>file permissions to that account for the data and log
files.
>Mike John
>"Julie" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
>
>.
>
|||No problem - was that the problem?
Mike
"Julie" <anonymous@.discussions.microsoft.com> wrote in message
news:3a9f01c522fb$e8e40340$a501280a@.phx.gbl...[vbcol=seagreen]
> Thanks Mike
>
> on the attached file
> Server is running -
> only.
> under, then check the
> files.
> message

Attach Database Issue

Hello,
I have just attached a database to a new server that I
successfully detached unfortunatly it said it was 'read
only'
Tried changing it, however there was a device activation
error on the data file.
Has anyone seen this before ?
JJulie,
I had this once and tracked it down to NTFS permissions on the attached file
only allowing read access to the account under which SQL Server is running -
Assuming that it is not so simple as the file being read only.
So I would check what account SQL server is running under, then check the
file permissions to that account for the data and log files.
Mike John
"Julie" <anonymous@.discussions.microsoft.com> wrote in message
news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
> Hello,
> I have just attached a database to a new server that I
> successfully detached unfortunatly it said it was 'read
> only'
> Tried changing it, however there was a device activation
> error on the data file.
> Has anyone seen this before ?
> J|||Thanks Mike
>--Original Message--
>Julie,
>I had this once and tracked it down to NTFS permissions
on the attached file
>only allowing read access to the account under which SQL
Server is running -
>Assuming that it is not so simple as the file being read
only.
>So I would check what account SQL server is running
under, then check the
>file permissions to that account for the data and log
files.
>Mike John
>"Julie" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
>> Hello,
>> I have just attached a database to a new server that I
>> successfully detached unfortunatly it said it was 'read
>> only'
>> Tried changing it, however there was a device activation
>> error on the data file.
>> Has anyone seen this before ?
>> J
>
>.
>|||No problem - was that the problem?
Mike
"Julie" <anonymous@.discussions.microsoft.com> wrote in message
news:3a9f01c522fb$e8e40340$a501280a@.phx.gbl...
> Thanks Mike
>
>>--Original Message--
>>Julie,
>>I had this once and tracked it down to NTFS permissions
> on the attached file
>>only allowing read access to the account under which SQL
> Server is running -
>>Assuming that it is not so simple as the file being read
> only.
>>So I would check what account SQL server is running
> under, then check the
>>file permissions to that account for the data and log
> files.
>>Mike John
>>"Julie" <anonymous@.discussions.microsoft.com> wrote in
> message
>>news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
>> Hello,
>> I have just attached a database to a new server that I
>> successfully detached unfortunatly it said it was 'read
>> only'
>> Tried changing it, however there was a device activation
>> error on the data file.
>> Has anyone seen this before ?
>> J
>>
>>.

Attach Database Issue

Hello,
I have just attached a database to a new server that I
successfully detached unfortunatly it said it was 'read
only'
Tried changing it, however there was a device activation
error on the data file.
Has anyone seen this before ?
JJulie,
I had this once and tracked it down to NTFS permissions on the attached file
only allowing read access to the account under which SQL Server is running -
Assuming that it is not so simple as the file being read only.
So I would check what account SQL server is running under, then check the
file permissions to that account for the data and log files.
Mike John
"Julie" <anonymous@.discussions.microsoft.com> wrote in message
news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
> Hello,
> I have just attached a database to a new server that I
> successfully detached unfortunatly it said it was 'read
> only'
> Tried changing it, however there was a device activation
> error on the data file.
> Has anyone seen this before ?
> J|||Thanks Mike

>--Original Message--
>Julie,
>I had this once and tracked it down to NTFS permissions
on the attached file
>only allowing read access to the account under which SQL
Server is running -
>Assuming that it is not so simple as the file being read
only.
>So I would check what account SQL server is running
under, then check the
>file permissions to that account for the data and log
files.
>Mike John
>"Julie" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2f6101c520dd$804390a0$a501280a@.phx.gbl...
>
>.
>|||No problem - was that the problem?
Mike
"Julie" <anonymous@.discussions.microsoft.com> wrote in message
news:3a9f01c522fb$e8e40340$a501280a@.phx.gbl...[vbcol=seagreen]
> Thanks Mike
>
> on the attached file
> Server is running -
> only.
> under, then check the
> files.
> message

Sunday, February 12, 2012

ASP.net app error after changing sa password

Hello,
I changed the sa password and now i get the error message below. I
cannot find the old password and do not know how to change it in the
system to allow it to succelfully authenticate again.
I'm running iis on a local network with an asp app. It tries to
connect to the sql database for the customer info.
Any help would be much appreciated. jho
error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
for user 'sa'
Hi
You should not be using sa as a login for a web application, the account
will be in the connection string which could be in one of several locations
see http://msdn2.microsoft.com/en-us/library/aa302392.aspx for more.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
> Hello,
> I changed the sa password and now i get the error message below. I
> cannot find the old password and do not know how to change it in the
> system to allow it to succelfully authenticate again.
> I'm running iis on a local network with an asp app. It tries to
> connect to the sql database for the customer info.
> Any help would be much appreciated. jho
> error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> for user 'sa'
|||Hi
You should not be using sa as a login for a web application, the account
will be in the connection string which could be in one of several locations
see http://msdn2.microsoft.com/en-us/library/aa302392.aspx for more.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
> Hello,
> I changed the sa password and now i get the error message below. I
> cannot find the old password and do not know how to change it in the
> system to allow it to succelfully authenticate again.
> I'm running iis on a local network with an asp app. It tries to
> connect to the sql database for the customer info.
> Any help would be much appreciated. jho
> error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> for user 'sa'
|||Hi
You should not be using sa as a login for a web application, the account
will be in the connection string which could be in one of several locations
see http://msdn2.microsoft.com/en-us/library/aa302392.aspx for more.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
> Hello,
> I changed the sa password and now i get the error message below. I
> cannot find the old password and do not know how to change it in the
> system to allow it to succelfully authenticate again.
> I'm running iis on a local network with an asp app. It tries to
> connect to the sql database for the customer info.
> Any help would be much appreciated. jho
> error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> for user 'sa'
|||On Jan 13, 3:39Xpm, "John Bell" <jbellnewspo...@.hotmail.com> wrote:
> Hi
> You should not be using sa as a login for a web application, the account
> will be in the connection string which could be in one of several locations
> see Xhttp://msdn2.microsoft.com/en-us/library/aa302392.aspxfor more.
> John"jho" <jhogan0...@.yahoo.com> wrote in message
> news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
>
>
> - Show quoted text -
I am trying to change to nt authentication but it seems like it has no
effect when i change it in the "logins" section in sql enterprise
manager and iis. FYI i am a network guy who knows very little about
dbs' and sql but trying. I was initially trying to access the db from
a network pc when i changed or maybe enabled the sa password to gain
access for a mail merge. How do i undo this?
|||Hi
You would need to change the connection string in your ASP page to be
trusted authentication.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:4b58f408-4194-4b19-bc8d-a60f46d5eb2e@.s8g2000prg.googlegroups.com...
On Jan 13, 3:39 pm, "John Bell" <jbellnewspo...@.hotmail.com> wrote:
> Hi
> You should not be using sa as a login for a web application, the account
> will be in the connection string which could be in one of several
> locations
> see http://msdn2.microsoft.com/en-us/library/aa302392.aspxfor more.
> John"jho" <jhogan0...@.yahoo.com> wrote in message
> news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
>
>
> - Show quoted text -
I am trying to change to nt authentication but it seems like it has no
effect when i change it in the "logins" section in sql enterprise
manager and iis. FYI i am a network guy who knows very little about
dbs' and sql but trying. I was initially trying to access the db from
a network pc when i changed or maybe enabled the sa password to gain
access for a mail merge. How do i undo this?

ASP.net app error after changing sa password

Hello,
I changed the sa password and now i get the error message below. I
cannot find the old password and do not know how to change it in the
system to allow it to succelfully authenticate again.
I'm running iis on a local network with an asp app. It tries to
connect to the sql database for the customer info.
Any help would be much appreciated. jho
error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
for user 'sa'Hi
You should not be using sa as a login for a web application, the account
will be in the connection string which could be in one of several locations
see http://msdn2.microsoft.com/en-us/library/aa302392.aspx for more.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
> Hello,
> I changed the sa password and now i get the error message below. I
> cannot find the old password and do not know how to change it in the
> system to allow it to succelfully authenticate again.
> I'm running iis on a local network with an asp app. It tries to
> connect to the sql database for the customer info.
> Any help would be much appreciated. jho
> error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> for user 'sa'|||Hi
You should not be using sa as a login for a web application, the account
will be in the connection string which could be in one of several locations
see http://msdn2.microsoft.com/en-us/library/aa302392.aspx for more.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
> Hello,
> I changed the sa password and now i get the error message below. I
> cannot find the old password and do not know how to change it in the
> system to allow it to succelfully authenticate again.
> I'm running iis on a local network with an asp app. It tries to
> connect to the sql database for the customer info.
> Any help would be much appreciated. jho
> error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> for user 'sa'|||Hi
You should not be using sa as a login for a web application, the account
will be in the connection string which could be in one of several locations
see http://msdn2.microsoft.com/en-us/library/aa302392.aspx for more.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
> Hello,
> I changed the sa password and now i get the error message below. I
> cannot find the old password and do not know how to change it in the
> system to allow it to succelfully authenticate again.
> I'm running iis on a local network with an asp app. It tries to
> connect to the sql database for the customer info.
> Any help would be much appreciated. jho
> error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> for user 'sa'|||On Jan 13, 3:39=A0pm, "John Bell" <jbellnewspo...@.hotmail.com> wrote:
> Hi
> You should not be using sa as a login for a web application, the account
> will be in the connection string which could be in one of several location=s
> see =A0http://msdn2.microsoft.com/en-us/library/aa302392.aspxfor more.
> John"jho" <jhogan0...@.yahoo.com> wrote in message
> news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
>
> > Hello,
> > I changed the sa password and now i get the error message below. I
> > cannot find the old password and do not know how to change it in the
> > system to allow it to succelfully authenticate again.
> > I'm running iis on a local network with an asp app. It tries to
> > connect to the sql database for the customer info.
> > Any help would be much appreciated. jho
> > error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> > for user 'sa'- Hide quoted text -
> - Show quoted text -
I am trying to change to nt authentication but it seems like it has no
effect when i change it in the "logins" section in sql enterprise
manager and iis. FYI i am a network guy who knows very little about
dbs' and sql but trying. I was initially trying to access the db from
a network pc when i changed or maybe enabled the sa password to gain
access for a mail merge. How do i undo this?|||Hi
You would need to change the connection string in your ASP page to be
trusted authentication.
John
"jho" <jhogan0101@.yahoo.com> wrote in message
news:4b58f408-4194-4b19-bc8d-a60f46d5eb2e@.s8g2000prg.googlegroups.com...
On Jan 13, 3:39 pm, "John Bell" <jbellnewspo...@.hotmail.com> wrote:
> Hi
> You should not be using sa as a login for a web application, the account
> will be in the connection string which could be in one of several
> locations
> see http://msdn2.microsoft.com/en-us/library/aa302392.aspxfor more.
> John"jho" <jhogan0...@.yahoo.com> wrote in message
> news:2c959016-a208-44f3-a148-702eddd12032@.v29g2000hsf.googlegroups.com...
>
> > Hello,
> > I changed the sa password and now i get the error message below. I
> > cannot find the old password and do not know how to change it in the
> > system to allow it to succelfully authenticate again.
> > I'm running iis on a local network with an asp app. It tries to
> > connect to the sql database for the customer info.
> > Any help would be much appreciated. jho
> > error:microsoft OLE Provider for SQL Server (0x80040e4D) Login failed
> > for user 'sa'- Hide quoted text -
> - Show quoted text -
I am trying to change to nt authentication but it seems like it has no
effect when i change it in the "logins" section in sql enterprise
manager and iis. FYI i am a network guy who knows very little about
dbs' and sql but trying. I was initially trying to access the db from
a network pc when i changed or maybe enabled the sa password to gain
access for a mail merge. How do i undo this?