Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Thursday, March 22, 2012

Database files are "Hidden" after becoming Suspect

We had created some databases on the C Drive. Today the C drive went bad and
all the databases that
were on the C Drive became suspect.
I tried to copy the files onto another drive and I did to the D drive.
However, when I tried to attach the
datafile the data file was not showing up. I checked the properties and the
file's "Read Only" attribute was checked.
I unchecked it. However, the "Hidden" attribute has been greyed out and
looks like this is the reason why
the files are not showing up.
Would someone know how to address this problem ?
Thanks,
rgn
Hi
This is an OS issue, but here goes:
Run
ATTRIB
This returns all the files that are hidden in the current directory.
If some of your files are listed, run
ATTRIB -H <filename.ext>
This will remove the Hidden attribute on the file.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"rgn" <gopinathr@.healthasyst.com> wrote in message
news:OUyfFwoEFHA.3244@.TK2MSFTNGP15.phx.gbl...
> We had created some databases on the C Drive. Today the C drive went bad
and
> all the databases that
> were on the C Drive became suspect.
> I tried to copy the files onto another drive and I did to the D drive.
> However, when I tried to attach the
> datafile the data file was not showing up. I checked the properties and
the
> file's "Read Only" attribute was checked.
> I unchecked it. However, the "Hidden" attribute has been greyed out and
> looks like this is the reason why
> the files are not showing up.
> Would someone know how to address this problem ?
> Thanks,
> rgn
>

Database files are "Hidden" after becoming Suspect

We had created some databases on the C Drive. Today the C drive went bad and
all the databases that
were on the C Drive became suspect.
I tried to copy the files onto another drive and I did to the D drive.
However, when I tried to attach the
datafile the data file was not showing up. I checked the properties and the
file's "Read Only" attribute was checked.
I unchecked it. However, the "Hidden" attribute has been greyed out and
looks like this is the reason why
the files are not showing up.
Would someone know how to address this problem ?
Thanks,
rgnHi
This is an OS issue, but here goes:
Run
ATTRIB
This returns all the files that are hidden in the current directory.
If some of your files are listed, run
ATTRIB -H <filename.ext>
This will remove the Hidden attribute on the file.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"rgn" <gopinathr@.healthasyst.com> wrote in message
news:OUyfFwoEFHA.3244@.TK2MSFTNGP15.phx.gbl...
> We had created some databases on the C Drive. Today the C drive went bad
and
> all the databases that
> were on the C Drive became suspect.
> I tried to copy the files onto another drive and I did to the D drive.
> However, when I tried to attach the
> datafile the data file was not showing up. I checked the properties and
the
> file's "Read Only" attribute was checked.
> I unchecked it. However, the "Hidden" attribute has been greyed out and
> looks like this is the reason why
> the files are not showing up.
> Would someone know how to address this problem ?
> Thanks,
> rgn
>

database extension in MS SQL?

hello ... I am trying to copy 1 field from a table in database called DB1 to a same table in DB2 .. I am not sure if this is possible. I found out form www3.schools.com it's doable using Select Into ... but it uses MS Access for example (Northwind.mdb) ... I wonder what's the extension database in MS SQL? Does anyone know where can we check the query syntax on the web? Can anyone tell me it's correct? I dun have MS SQL from home .. so :(

======copy prodID from DB1 to DB2 table called production1 (both DB1 and DB2)=======

// this is done in SQL QUERY ANALYZER under DB1?

SELECT production1.prodID INTO production1 IN DB2 FROM DB1

=====create VIEW in DB2=======

// this has to be done in DB1 ... if I have multiple databases, is there anyway to do it using something like SELECT INTO to create view in differences databases?

CREATE VIEW production_id AS SELECT prodID from DB1

Assuming that you're running against a SQL Server instance, and not directly mounting the database files, you don't need to know the file names. If both databases are on the same server, you can reference tables on another database as [database].[owner].[table]. So, if you're logged into db2, you could do

insert into production1 select db1.production1.prodID

Thursday, March 8, 2012

database diagram

Hi !
Can we copy the database diagram from one server to another ?
Regards
The following article explains how to do it:
How To Move a Database Diagram
http://support.microsoft.com/?id=320125
-Sue
On Fri, 5 Nov 2004 14:34:06 +0530, "swati"
<swati.zingade@.ugamsolutions.com> wrote:

>Hi !
>Can we copy the database diagram from one server to another ?
>Regards
>

Wednesday, March 7, 2012

database diagram

Hi !
Can we copy the database diagram from one server to another '
RegardsThe following article explains how to do it:
How To Move a Database Diagram
http://support.microsoft.com/?id=320125
-Sue
On Fri, 5 Nov 2004 14:34:06 +0530, "swati"
<swati.zingade@.ugamsolutions.com> wrote:

>Hi !
>Can we copy the database diagram from one server to another '
>Regards
>

database diagram

Hi !
Can we copy the database diagram from one server to another '
RegardsThe following article explains how to do it:
How To Move a Database Diagram
http://support.microsoft.com/?id=320125
-Sue
On Fri, 5 Nov 2004 14:34:06 +0530, "swati"
<swati.zingade@.ugamsolutions.com> wrote:
>Hi !
>Can we copy the database diagram from one server to another '
>Regards
>

Database Diagram

hi
could someone please tell me:
can i copy database diagram from one database to another database as
they both 100% identical.
thank you
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!If on the same server, easiest is a cut and past technique.
Get the two frames next to each other (one with the diagram, one with a
create diagram).
Cut from one, paste in the other.
I have seen more elaborate methods, but can not remember them, probably
more capable as wel.
ben brugman.
"Khalid Hussain" <khalid.hussain@.pinnacle.co.uk> wrote in message
news:#SR8KSXmDHA.2432@.TK2MSFTNGP10.phx.gbl...
> hi
> could someone please tell me:
> can i copy database diagram from one database to another database as
> they both 100% identical.
> thank you
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||The following article explains how to do it:
HOW TO: Move a Database Diagram
http://support.microsoft.com/?id=320125
-Sue
On Thu, 23 Oct 2003 07:47:10 -0700, Khalid Hussain
<khalid.hussain@.pinnacle.co.uk> wrote:
>hi
>could someone please tell me:
>can i copy database diagram from one database to another database as
>they both 100% identical.
>thank you
>
>*** Sent via Developersdex http://www.developersdex.com ***
>Don't just participate in USENET...get rewarded for it!|||You could also try this procedure, though I haven't tested
it yet to see if it does what it says :)
http://www.databasejournal.com/img/sp_importdiagram.sql
>--Original Message--
>hi
>could someone please tell me:
>can i copy database diagram from one database to another
database as
>they both 100% identical.
>thank you
>
>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.
>

Tuesday, February 14, 2012

database copy wizard HELP

I have been using SQL Server 2000 but not am not an expert on it. I recently
copied databases into a new server using Database Copy Wizard. The previous
databases were copied with no problems. This problem occured when I selected
5 databases at the same time although I doubt the # of databases had anything
to do with the problem. It still copied into the new server but the
databases on the "source" server disappeared! I tried "re-copying" same
databases back into the source server but I am getting a 'name conflict'
error. From my research, this meant the mdf and ldf files are still there.
Note that I "copied" and NOT "moved" these databases. Can you please tell me
how I can restore these databases? I also tried re-creating the missing
database so I can export data back into it but I got "Error 5170: Cannot
create file 'e:\data\MSSQL\...\.MDF' because it already exists. etc" Thank
you for helping.
--
_________________
Freedom is nothing else but a chance to be better. (Albert Camus)Hi
Right click on databases in Enterprise Manager, All Tasks,
Attach. Browse for the *.mdf. If it's there, it will re-
attach it. The DB copy wizard detaches the DB, copies it
and then reattaches it. You said you selected Copy and not
Move so I guess something went wrong and it didn't re-
attach it as a final step.
Regards
Jono|||You are correct. Thank you very much!
"Jono" wrote:
> Hi
> Right click on databases in Enterprise Manager, All Tasks,
> Attach. Browse for the *.mdf. If it's there, it will re-
> attach it. The DB copy wizard detaches the DB, copies it
> and then reattaches it. You said you selected Copy and not
> Move so I guess something went wrong and it didn't re-
> attach it as a final step.
> Regards
> Jono
>