Showing posts with label wizard. Show all posts
Showing posts with label wizard. Show all posts

Thursday, March 29, 2012

Failed to open a connection to the database

Hello,

I receivethis error when choosing the data connection in TableAdapter Wizard for me toreference the ASPNETDB.mdf database.

Failed to open a connection to the database

"The header for file'C:\Inetpub\wwwroot\Websites4\App_Data\ASPNETDB.MDF is not valid database
file header. The FILE SIZE property is incorrect.
An attempt to attach an auto-named database exists, orspecified file cannot
be opened, or it is located on UNC share."

Check the connection and try again.


I already have the connection at config but the errorpersists.

...
<connectionStrings>
<addname="ConnectionString1" connectionString="DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\mydatabase.mdf;IntegratedSecurity=True"providerName="System.Data.SqlClient" />
<addname="ASPNETDBConnectionString1" connectionString="DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;IntegratedSecurity=True"providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
...

cheers,
imperialx

My friend,

Why don't you use Dynamic Database connection to solve your problem.

in App_Data. ASPNET.MDF file creates automatically when u using Page.Theme or something. So please check it.

Thanks.

|||

Hi kaushikpatel71,

Instead of simple dragging the table to the form, I do this as you suggested.

...
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False"
EmptyDataText="There are no data records to display." CellPadding="4" ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
<asp:BoundField DataField="LastActivityDate" HeaderText="LastActivityDate" SortExpression="LastActivityDate" />
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<HeaderStyle BackColor="Maroon" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</asp:Content
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DataUserList()
End If
End Sub

Protected Sub DataUserList()
GridView1.DataSource = Membership.GetAllUsers
GridView1.DataBind()
End Sub
...

Thank you so much!

cheers,
imperialx


sql

Friday, March 23, 2012

Failed to copy objects from MS SQL Servert to MS SQL Server

I'm trying to copy objects and data between 2 SQL Server databases using the
import/export wizard in SQL Server 2000.
I select the source and destination database and leave everything as
default. When I try to run the DTS Package, it stalls at 22% for a few
minutes, then goes up to 96% or so very fast and gives the following message
quoted in the subject. ("Failed to copy objects...")
When I double-click the error, it reads the following:
"Need to run the object to perform this operation
[SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
I'm running the package as "sa", so I don't think I don't have privileges to
anything.
Check you have no application roles - these don't copy as they have
encrypted passwords and can break a copy DB operation.
--
Mary Bray [SQL Server MVP]
Please only reply to newsgroups
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
> the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
> message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
> to
> anything.
>
|||Agoston Bejo wrote:
> I'm trying to copy objects and data between 2 SQL Server databases using the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges to
> anything.
Are the two databases on the same machine? The same instance?
|||"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
to
> anything.
My own experience has been that I cannot successfully copy a database from
one server to the other unless I log on to the source server locally using a
Domain Admin account and also use Windows authentication when promted by the
Copy Database wizard. I'm not at all sure why...
|||Ron Hinds wrote:
> "Agoston Bejo" <gusz1@.freemail.hu> wrote in message
> news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
>
> the
>
> message
>
> to
>
> My own experience has been that I cannot successfully copy a database from
> one server to the other unless I log on to the source server locally using a
> Domain Admin account and also use Windows authentication when promted by the
> Copy Database wizard. I'm not at all sure why...
The docs say that file sharing must be enabled between the machines, and
that the server must run as an admnistrator. Sucks, eh?
|||> Are the two databases on the same machine? The same instance?
Yes, they are. Same machine, same server instance, the one user set is sa
for both.
|||Hi
Checkout out google for this seems to be quite a common problem!
http://tinyurl.com/59xw4
This is one answer http://tinyurl.com/55ck8 , but threads seem to die out,
that may be because backup/restore is a better quicker option!
John
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eSXs6W2sEHA.2300@.TK2MSFTNGP09.phx.gbl...
> Yes, they are. Same machine, same server instance, the one user set is sa
> for both.
>

Failed to copy objects from MS SQL Servert to MS SQL Server

I'm trying to copy objects and data between 2 SQL Server databases using the
import/export wizard in SQL Server 2000.
I select the source and destination database and leave everything as
default. When I try to run the DTS Package, it stalls at 22% for a few
minutes, then goes up to 96% or so very fast and gives the following message
quoted in the subject. ("Failed to copy objects...")
When I double-click the error, it reads the following:
"Need to run the object to perform this operation
[SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
I'm running the package as "sa", so I don't think I don't have privileges to
anything.
Check you have no application roles - these don't copy as they have
encrypted passwords and can break a copy DB operation.
--
Mary Bray [SQL Server MVP]
Please only reply to newsgroups
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
> the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
> message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
> to
> anything.
>
|||Agoston Bejo wrote:
> I'm trying to copy objects and data between 2 SQL Server databases using the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges to
> anything.
Are the two databases on the same machine? The same instance?
|||"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
to
> anything.
My own experience has been that I cannot successfully copy a database from
one server to the other unless I log on to the source server locally using a
Domain Admin account and also use Windows authentication when promted by the
Copy Database wizard. I'm not at all sure why...
|||Ron Hinds wrote:
> "Agoston Bejo" <gusz1@.freemail.hu> wrote in message
> news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
>
> the
>
> message
>
> to
>
> My own experience has been that I cannot successfully copy a database from
> one server to the other unless I log on to the source server locally using a
> Domain Admin account and also use Windows authentication when promted by the
> Copy Database wizard. I'm not at all sure why...
The docs say that file sharing must be enabled between the machines, and
that the server must run as an admnistrator. Sucks, eh?
|||> Are the two databases on the same machine? The same instance?
Yes, they are. Same machine, same server instance, the one user set is sa
for both.
|||Hi
Checkout out google for this seems to be quite a common problem!
http://tinyurl.com/59xw4
This is one answer http://tinyurl.com/55ck8 , but threads seem to die out,
that may be because backup/restore is a better quicker option!
John
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eSXs6W2sEHA.2300@.TK2MSFTNGP09.phx.gbl...
> Yes, they are. Same machine, same server instance, the one user set is sa
> for both.
>

Failed to copy objects from MS SQL Servert to MS SQL Server

I'm trying to copy objects and data between 2 SQL Server databases using the
import/export wizard in SQL Server 2000.
I select the source and destination database and leave everything as
default. When I try to run the DTS Package, it stalls at 22% for a few
minutes, then goes up to 96% or so very fast and gives the following message
quoted in the subject. ("Failed to copy objects...")
When I double-click the error, it reads the following:
"Need to run the object to perform this operation
[SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
I'm running the package as "sa", so I don't think I don't have privileges to
anything.Check you have no application roles - these don't copy as they have
encrypted passwords and can break a copy DB operation.
--
--
Mary Bray [SQL Server MVP]
Please only reply to newsgroups
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
> the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
> message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
> to
> anything.
>|||Agoston Bejo wrote:
> I'm trying to copy objects and data between 2 SQL Server databases using the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges to
> anything.
Are the two databases on the same machine? The same instance?|||"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
to
> anything.
My own experience has been that I cannot successfully copy a database from
one server to the other unless I log on to the source server locally using a
Domain Admin account and also use Windows authentication when promted by the
Copy Database wizard. I'm not at all sure why...|||Ron Hinds wrote:
> "Agoston Bejo" <gusz1@.freemail.hu> wrote in message
> news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
>>I'm trying to copy objects and data between 2 SQL Server databases using
> the
>>import/export wizard in SQL Server 2000.
>>I select the source and destination database and leave everything as
>>default. When I try to run the DTS Package, it stalls at 22% for a few
>>minutes, then goes up to 96% or so very fast and gives the following
> message
>>quoted in the subject. ("Failed to copy objects...")
>>When I double-click the error, it reads the following:
>>"Need to run the object to perform this operation
>>[SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
>>I'm running the package as "sa", so I don't think I don't have privileges
> to
>>anything.
>
> My own experience has been that I cannot successfully copy a database from
> one server to the other unless I log on to the source server locally using a
> Domain Admin account and also use Windows authentication when promted by the
> Copy Database wizard. I'm not at all sure why...
The docs say that file sharing must be enabled between the machines, and
that the server must run as an admnistrator. Sucks, eh?|||> Are the two databases on the same machine? The same instance?
Yes, they are. Same machine, same server instance, the one user set is sa
for both.|||Hi
Checkout out google for this seems to be quite a common problem!
http://tinyurl.com/59xw4
This is one answer http://tinyurl.com/55ck8 , but threads seem to die out,
that may be because backup/restore is a better quicker option!
John
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eSXs6W2sEHA.2300@.TK2MSFTNGP09.phx.gbl...
> > Are the two databases on the same machine? The same instance?
> Yes, they are. Same machine, same server instance, the one user set is sa
> for both.
>sql

Failed to copy objects from MS SQL Servert to MS SQL Server

I'm trying to copy objects and data between 2 SQL Server databases using the
import/export wizard in SQL Server 2000.
I select the source and destination database and leave everything as
default. When I try to run the DTS Package, it stalls at 22% for a few
minutes, then goes up to 96% or so very fast and gives the following message
quoted in the subject. ("Failed to copy objects...")
When I double-click the error, it reads the following:
"Need to run the object to perform this operation
[SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
I'm running the package as "sa", so I don't think I don't have privileges to
anything.Check you have no application roles - these don't copy as they have
encrypted passwords and can break a copy DB operation.
--
Mary Bray [SQL Server MVP]
Please only reply to newsgroups
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
> the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
> message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
> to
> anything.
>|||Agoston Bejo wrote:
> I'm trying to copy objects and data between 2 SQL Server databases using t
he
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following messa
ge
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
to
> anything.
Are the two databases on the same machine? The same instance?|||"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
> I'm trying to copy objects and data between 2 SQL Server databases using
the
> import/export wizard in SQL Server 2000.
> I select the source and destination database and leave everything as
> default. When I try to run the DTS Package, it stalls at 22% for a few
> minutes, then goes up to 96% or so very fast and gives the following
message
> quoted in the subject. ("Failed to copy objects...")
> When I double-click the error, it reads the following:
> "Need to run the object to perform this operation
> [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION"
> I'm running the package as "sa", so I don't think I don't have privileges
to
> anything.
My own experience has been that I cannot successfully copy a database from
one server to the other unless I log on to the source server locally using a
Domain Admin account and also use Windows authentication when promted by the
Copy Database wizard. I'm not at all sure why...|||Ron Hinds wrote:
> "Agoston Bejo" <gusz1@.freemail.hu> wrote in message
> news:eBk%23TgpsEHA.3460@.TK2MSFTNGP15.phx.gbl...
>
> the
>
> message
>
> to
>
>
> My own experience has been that I cannot successfully copy a database from
> one server to the other unless I log on to the source server locally using
a
> Domain Admin account and also use Windows authentication when promted by t
he
> Copy Database wizard. I'm not at all sure why...
The docs say that file sharing must be enabled between the machines, and
that the server must run as an admnistrator. Sucks, eh?|||> Are the two databases on the same machine? The same instance?
Yes, they are. Same machine, same server instance, the one user set is sa
for both.|||Hi
Checkout out google for this seems to be quite a common problem!
http://tinyurl.com/59xw4
This is one answer http://tinyurl.com/55ck8 , but threads seem to die out,
that may be because backup/restore is a better quicker option!
John
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:eSXs6W2sEHA.2300@.TK2MSFTNGP09.phx.gbl...
> Yes, they are. Same machine, same server instance, the one user set is sa
> for both.
>

Wednesday, March 21, 2012

Failed SQL 7.0/SQL200 Database copy

I recently used the copy data base wizard to copy an existing database from SQL7.0 to SQL2000. The copy was in general a success except for the fact that the copied database gives the error "could not open database "MainDB" version 5.25. Upgrade to the latest version. I performaed a detach on the database and then a reattach to force an upgrade but the reattach process fails with the error

Error 3624:
Converting database "MainDB" from version 525 to current version 539.
Database "mainDB" running the upgrade step from verion 525 to vesrion 526.
Location:Upgraddb.cpp:2230
Expression:0
SPID:53
ProcessID:1088
Description:Database upgrade failed due to MovePage

I earlier successfully moved another database between the same two servers without any problems.

Any ideas?

Thanks

JohnTry taking a backup on SQL7 and then restore on the SQL2000 server instead of copying.
--jfp