Showing posts with label toanother. Show all posts
Showing posts with label toanother. Show all posts

Thursday, March 22, 2012

Copy Database, can't attach it?

I'm used the Copy Database Wizard to copy a database from one server to
another. While in the copy operation the destination machine was hanging and
I had to reset it.
Now when I want to attach the source database again, I get the following
error:
"CREATE FILE encountered operating system error 5 (Access is denied.)..."
What is going on here? Why was the source machine affected in this
destructive manner?
What do I need to do in order to attach my source again?
OlavI generally find that it's 10x easier to shoot yourself in the foot and get
into serious trouble with SQL Server 2005 than it was with SQL Server 2000.
Olav
"Olav" <x@.y.com> wrote in message
news:O0Fj8YZXGHA.4212@.TK2MSFTNGP02.phx.gbl...
> I'm used the Copy Database Wizard to copy a database from one server to
> another. While in the copy operation the destination machine was hanging
> and I had to reset it.
> Now when I want to attach the source database again, I get the following
> error:
> "CREATE FILE encountered operating system error 5 (Access is denied.)..."
> What is going on here? Why was the source machine affected in this
> destructive manner?
> What do I need to do in order to attach my source again?
> Olav
>|||I read somewhere detaching databases is very risky, and can infact
corrupt the entire database if something goes wrong... Good luck to
you.|||?
Nice if that is the default option the Copy Database Wizard is using then?
Olav
"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
>|||Stop me if im boring you ...
Basically a database created using created database Test consists of 2 files
mdf for tables
ldf for transaction logs
In effect detaching a database is what happens when you stop sql server
attaching is what happens when you start sql server
so dont be afraid of this process
Be aware though that ...
Any transactions not written down to the mdf file and still in the ldf
transaction logs will need to be recovered by SQL server.
to limit this complication we
stop all users
run checkpoint 3 times to for those transactions down into mdf
then detach
at this point the logfile is emptied and can be ditched on attach
Ever wanted to shink you log file. then this method can be employed.
Note I would not used this method on prodction systems crital to business..
Lifes too short and its a hassel geting another job.
If you detached thdatabase then you basicall have 2 files
If a file gets chopped on a copy you would normally tidy up and resend file.
hope this helps
"Olav" wrote:

> ?
> Nice if that is the default option the Copy Database Wizard is using then?
> Olav
> "KBuser" <Kyle.Buser@.gmail.com> wrote in message
> news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>
>|||"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
> I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
No, detaching a database should be perfectly fine.
But you need to copy both the MDF and LDF files and attach both.

>

Copy Database Wizard w/MSDE

I am trying to use the copy database wizard in Enterprise
manager to copy a database from one MSDE installation to
another. It always returns the error:
"Your SQL Server Service is running under the local
system account. You need to to change your SQL Server
Service account to have the rights to copy files over the
Network."
When I try to change the service to run under a different
account I get another error, "The handle is invalid."
I got to thinking that perhaps MSDE doesn't allow you to
run under anything but local system. Can anyone
confirm? Or does anyone know what's wrong here?
hi bill,
"bill" <anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:2d14001c46a06$8a1cd570$a401280a@.phx.gbl...
> When I try to change the service to run under a different
> account I get another error, "The handle is invalid."
> I got to thinking that perhaps MSDE doesn't allow you to
> run under anything but local system. Can anyone
> confirm? Or does anyone know what's wrong here?
MSDE SQL Server service and SQLSERVERAgent service can run on diferent
account than LocalSystem with no problem [of mines =;-) ]
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||a little addition to "invalid" message...
please have a look at http://tinyurl.com/696hq if can help
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Monday, March 19, 2012

Copy Database from One SQL server to another fails

I am try to run a DTS package to copy a database from one SQL server to
another one.
The DTS package was running fine till yesterday morning but now I am getting
the error message
The Bulk Copy Execution Failed
Error Code 80045707
any thoughts?
drew
Does your SQL Server Service user have enough rights to copy files over the
network?
It might be a problem..
"drew" wrote:

> I am try to run a DTS package to copy a database from one SQL server to
> another one.
> The DTS package was running fine till yesterday morning but now I am getting
> the error message
> The Bulk Copy Execution Failed
> Error Code 80045707
> any thoughts?
> --
> drew
|||Yes the user right are okay, using SA on SQL and Administrator on the windows
2003 servers.
"Umut Nazlica" wrote:
[vbcol=seagreen]
> Does your SQL Server Service user have enough rights to copy files over the
> network?
> It might be a problem..
>
> "drew" wrote:
|||Hi,
Sorry if i'm not clear, what i meant is SQL Server Service on both SQL
servers are not running with Local System Account right?
"drew" wrote:
[vbcol=seagreen]
> Yes the user right are okay, using SA on SQL and Administrator on the windows
> 2003 servers.
> "Umut Nazlica" wrote:
|||The user account are okay. It seems to be a problem the database it self. If
we try and backup and the restore the database to another name on the same
SQL instance. The database hangs on the restore saying it is loading.
Regards Drew
"Umut Nazlica" wrote:
[vbcol=seagreen]
> Hi,
> Sorry if i'm not clear, what i meant is SQL Server Service on both SQL
> servers are not running with Local System Account right?
>
> "drew" wrote:
|||> The user account are okay. It seems to be a problem the database it self.
That would surprise me.

> If
> we try and backup and the restore the database to another name on the same
> SQL instance. The database hangs on the restore saying it is loading.
That is expected if you do the restore using NORECOVERY. Try using RECOVERY instead. Also, make sure
it isn't just EM that doesn't refreshed. Try logging in using Query Analyzer and access the
database.
My guess is that there has been some account changes for the Agent.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"drew" <drew@.discussions.microsoft.com> wrote in message
news:B128608B-0E23-4D66-BE8B-B40CC941B09C@.microsoft.com...[vbcol=seagreen]
> The user account are okay. It seems to be a problem the database it self. If
> we try and backup and the restore the database to another name on the same
> SQL instance. The database hangs on the restore saying it is loading.
> Regards Drew
> "Umut Nazlica" wrote:
|||We got the backup and restore working okay but still problems with the DTS
package.
We tried copying the database to another name name on the same SQL instance
but still get the problem.
If I detach the database and copy it to aother SQL server then attach it
there I again get the problem of not being able to copy it to another name on
the same SQL instance.
If I copy just the objects not the data everything is okay. If I then
compare the databases with SQL compare everything is okay.
If I try to use the DTS copy databse task to just copy the data. Using SQL
compare the permmisions on the databse tables change with the public role
being dropped and the not null constraint check becomig just not null.
Talkig with Microsoft but still not much further forward.
"Tibor Karaszi" wrote:

> That would surprise me.
>
> That is expected if you do the restore using NORECOVERY. Try using RECOVERY instead. Also, make sure
> it isn't just EM that doesn't refreshed. Try logging in using Query Analyzer and access the
> database.
> My guess is that there has been some account changes for the Agent.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "drew" <drew@.discussions.microsoft.com> wrote in message
> news:B128608B-0E23-4D66-BE8B-B40CC941B09C@.microsoft.com...
>
>
|||we final got the problem resolved with the help of Kevin at MSDN.
In the database some had created a blob bigger than 8 Meg, this caused the
DTS package to fail. hen we romved the offending records the package ran
okay.
see KB 257425
regards Drew
"drew" wrote:
[vbcol=seagreen]
> We got the backup and restore working okay but still problems with the DTS
> package.
> We tried copying the database to another name name on the same SQL instance
> but still get the problem.
> If I detach the database and copy it to aother SQL server then attach it
> there I again get the problem of not being able to copy it to another name on
> the same SQL instance.
> If I copy just the objects not the data everything is okay. If I then
> compare the databases with SQL compare everything is okay.
> If I try to use the DTS copy databse task to just copy the data. Using SQL
> compare the permmisions on the databse tables change with the public role
> being dropped and the not null constraint check becomig just not null.
> Talkig with Microsoft but still not much further forward.
> "Tibor Karaszi" wrote:

Saturday, February 25, 2012

Copy a diagram from a db to another db in sql server 2005

Hello,
is there a way in SQL Server 2005 to copy a diagram from a database to
another one that has exactly the
same structure?
Thank you in advance,
Laura
You need to create the support tables for diagrams in the
destination database first - you can just click on the
database diagrams node in the destination database and
select Yes when the message box comes up asking if you want
to create the objects to use database diagramming.
Then import the dbo.sysdiagrams table from the source
database.
-Sue
On Tue, 31 Jul 2007 07:14:01 -0700, Isotta
<laura.lega@.gmail.com> wrote:

>Hello,
>is there a way in SQL Server 2005 to copy a diagram from a database to
>another one that has exactly the
>same structure?
>Thank you in advance,
>Laura

Copy a diagram from a db to another db in sql server 2005

Hello,
is there a way in SQL Server 2005 to copy a diagram from a database to
another one that has exactly the
same structure?
Thank you in advance,
LauraYou need to create the support tables for diagrams in the
destination database first - you can just click on the
database diagrams node in the destination database and
select Yes when the message box comes up asking if you want
to create the objects to use database diagramming.
Then import the dbo.sysdiagrams table from the source
database.
-Sue
On Tue, 31 Jul 2007 07:14:01 -0700, Isotta
<laura.lega@.gmail.com> wrote:

>Hello,
>is there a way in SQL Server 2005 to copy a diagram from a database to
>another one that has exactly the
>same structure?
>Thank you in advance,
>Laura