Thursday, March 29, 2012
Attach norecovery database
where the target database is in norecovery mode for continuous log files.
If we detach the database while it is in norecovery mode, could we attach
the database back in norecovery mode. I tried it and it turned into
recovery mode with few transactions rollback while detach. Thanks!
When you detach a db it rolls back any open trans so the answer is no. You
can attach it but it it will already have been put into recovery.
Andrew J. Kelly SQL MVP
"Kevin" <Kevin@.noemail.com> wrote in message
news:OWajj3qmEHA.1288@.TK2MSFTNGP10.phx.gbl...
> Is there a way to attach a database to norecovery mode? We have a 2nd
site
> where the target database is in norecovery mode for continuous log files.
> If we detach the database while it is in norecovery mode, could we attach
> the database back in norecovery mode. I tried it and it turned into
> recovery mode with few transactions rollback while detach. Thanks!
>
>
Attach norecovery database
where the target database is in norecovery mode for continuous log files.
If we detach the database while it is in norecovery mode, could we attach
the database back in norecovery mode. I tried it and it turned into
recovery mode with few transactions rollback while detach. Thanks!When you detach a db it rolls back any open trans so the answer is no. You
can attach it but it it will already have been put into recovery.
--
Andrew J. Kelly SQL MVP
"Kevin" <Kevin@.noemail.com> wrote in message
news:OWajj3qmEHA.1288@.TK2MSFTNGP10.phx.gbl...
> Is there a way to attach a database to norecovery mode? We have a 2nd
site
> where the target database is in norecovery mode for continuous log files.
> If we detach the database while it is in norecovery mode, could we attach
> the database back in norecovery mode. I tried it and it turned into
> recovery mode with few transactions rollback while detach. Thanks!
>
>sql
Attach network database Sql Server Express
I am trying to attach a network database to my sql server express
After some reading I "Enabled" tcp/ip, named pipes, and shared memory in sql server confiuration manager.
But when I go to "Attach Database" in Sql Express managemnent studio. It does not show the network drives much less allow me to attach anything on a network drive.
What am I missing here?
If I install sql server on the network machine will my local Sql express recognize it?
Database files on network shares are not supported.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||You can also see http://support.microsoft.com/kb/304261.
Attach MySql database via internet
Hie !
Please, how to manage (attach,connect to) MySql database located on host server http://www.avanti.si from my home PC with Microsoft SQL Server Management Studio Express? This "http://www.avanti.si:8080\MySqlDatabaseName,3306" fail !
Thenks!
hi,
you should ask you provider about connection info..
assuming the "server" is named and available as "www.avanti.si" and 3306 is the port you have to use to connect to, you should provide that info in the SQL Server MAnagement Studio Express connection dialog as
www.avanti.si,3306
in the server property, and provide your SQL Server standard login and pwd.. in the "options" tab you can, but is not mandatory as the <default> value will be resolved as tcp/ip, set the network protocol as tcp/ip and specify the "connect to database" property to "MySqlDatabase", but this one should be resolved as well without your intervention becouse you should be usually only grated db access to your db, MySqlDatabase...
you have to verify the www.avanti.si is the actual SQL Server instance name as well, and I doubt about it..
regards
|||Actually, you can't connect directly to MySQL database, Management Studio is designed for use with SQL Server. You can create a linked server to any database that offers an OLEDB provider, which I believe MySQL has. The linked server will allow you to query your data from MySQL, but not manage the database.
Regards,
Mike
|||ooppss...
did not notice/intended MySqlDatabase as a "MySql.. database"
thank you Mike
attach IDENTITY property to an existing column
Can any body tell me that how we can attach IDENTITY property to an existing int columnyou can not.
you have to...
1. rename the existing table
2. drop the foriegn keys referencing it.
3. drop the constraints on the renamed table.
4. define a new table with the identity property with the orginal table name
--the next 2 can go in any order based on what you decide is best
5. then reapply all constraints on the table, usually doing the primary key first.
6. insert data from the renamed table to the new table. you may want to do a INSERT IDENTITY MyTable ON to insert your existing keys. Just do not forget to turn it off when you are done.
7. drop the renamed table (optional)
you may want to wrap all or part of this in an explicit transaction with appropriate error handlers and print messages and you may not want to drop renamed table until you have committed the transaction without error and your row count after the insert matches the rowcount in the new table.
attach files to new box
Is there a way to attach the files of a db to a newly
created box? No backups as these are QA db's not
production.
TIA, ChrisR
"ChrisR" <anonymous@.discussions.microsoft.com> wrote in message
news:c6fe01c48a03$56389420$a401280a@.phx.gbl...
> sql2k sp3
> Is there a way to attach the files of a db to a newly
> created box? No backups as these are QA db's not
> production.
Assuming that these files are now in use by SQL Server there are several
methods. You can detach the database, copy the *.mdf & *.ldf file to the new
server and reattach the files. Or, use the BACKUP command, then RESTORE on
your target server.
The following reference covers your options fairly well:
http://support.microsoft.com/default...b;en-us;314546
Steve
attach files to new box
Is there a way to attach the files of a db to a newly
created box? No backups as these are QA db's not
production.
TIA, ChrisR"ChrisR" <anonymous@.discussions.microsoft.com> wrote in message
news:c6fe01c48a03$56389420$a401280a@.phx.gbl...
> sql2k sp3
> Is there a way to attach the files of a db to a newly
> created box? No backups as these are QA db's not
> production.
Assuming that these files are now in use by SQL Server there are several
methods. You can detach the database, copy the *.mdf & *.ldf file to the new
server and reattach the files. Or, use the BACKUP command, then RESTORE on
your target server.
The following reference covers your options fairly well:
http://support.microsoft.com/defaul...kb;en-us;314546
Steve
attach files to new box
Is there a way to attach the files of a db to a newly
created box? No backups as these are QA db's not
production.
TIA, ChrisR"ChrisR" <anonymous@.discussions.microsoft.com> wrote in message
news:c6fe01c48a03$56389420$a401280a@.phx.gbl...
> sql2k sp3
> Is there a way to attach the files of a db to a newly
> created box? No backups as these are QA db's not
> production.
Assuming that these files are now in use by SQL Server there are several
methods. You can detach the database, copy the *.mdf & *.ldf file to the new
server and reattach the files. Or, use the BACKUP command, then RESTORE on
your target server.
The following reference covers your options fairly well:
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
Steve
Attach failed
files I am getting this error. How do you troubleshoot this and what is the
caused of it?
Thank you.
Server: Msg 5184, Level 16, State 2, Line 1
Cannot use file 'L:\mssql\data\InterDTA_Data' for clustered server.
Only formatted files on which the cluster resource of the server has a
dependency can be used.
Your drive L: is not part of the clustered SQL group. Either place the file
on a clustered drive on which SQL Server is a dependent, or make the L:
drive a dependency.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"J Pacquiao" <JPacquiao@.discussions.microsoft.com> wrote in message
news:E1DE2C43-8554-402E-9699-27865351614D@.microsoft.com...
I moved the files to free-up some space and now when I try to attach the
files I am getting this error. How do you troubleshoot this and what is the
caused of it?
Thank you.
Server: Msg 5184, Level 16, State 2, Line 1
Cannot use file 'L:\mssql\data\InterDTA_Data' for clustered server.
Only formatted files on which the cluster resource of the server has a
dependency can be used.
sql
Attach failed
files I am getting this error. How do you troubleshoot this and what is the
caused of it?
Thank you.
Server: Msg 5184, Level 16, State 2, Line 1
Cannot use file 'L:\mssql\data\InterDTA_Data' for clustered server.
Only formatted files on which the cluster resource of the server has a
dependency can be used.Your drive L: is not part of the clustered SQL group. Either place the file
on a clustered drive on which SQL Server is a dependent, or make the L:
drive a dependency.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"J Pacquiao" <JPacquiao@.discussions.microsoft.com> wrote in message
news:E1DE2C43-8554-402E-9699-27865351614D@.microsoft.com...
I moved the files to free-up some space and now when I try to attach the
files I am getting this error. How do you troubleshoot this and what is the
caused of it?
Thank you.
Server: Msg 5184, Level 16, State 2, Line 1
Cannot use file 'L:\mssql\data\InterDTA_Data' for clustered server.
Only formatted files on which the cluster resource of the server has a
dependency can be used.
Attach failed
files I am getting this error. How do you troubleshoot this and what is the
caused of it?
Thank you.
Server: Msg 5184, Level 16, State 2, Line 1
Cannot use file 'L:\mssql\data\InterDTA_Data' for clustered server.
Only formatted files on which the cluster resource of the server has a
dependency can be used.Your drive L: is not part of the clustered SQL group. Either place the file
on a clustered drive on which SQL Server is a dependent, or make the L:
drive a dependency.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"J Pacquiao" <JPacquiao@.discussions.microsoft.com> wrote in message
news:E1DE2C43-8554-402E-9699-27865351614D@.microsoft.com...
I moved the files to free-up some space and now when I try to attach the
files I am getting this error. How do you troubleshoot this and what is the
caused of it?
Thank you.
Server: Msg 5184, Level 16, State 2, Line 1
Cannot use file 'L:\mssql\data\InterDTA_Data' for clustered server.
Only formatted files on which the cluster resource of the server has a
dependency can be used.
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 amAttach Error
computers. SQL 2005 attaches the file just fine. How can I run the
DBCC-CHECKTABLE command on the database if I can't attach it on my sql 2000
pc's? The database is 2000 format.
ERROR:
error 602: could not find row in sysindexes for database id 15, object ID 1,
index ID 1. Run DBCC-CHECKTABLE on sysindexes.
Pls post the error you get?
also read about sp_attach_single_file_db
scott wrote:
>I get the below error when trying to attach a database ONLY on my SQL 2000
>computers. SQL 2005 attaches the file just fine. How can I run the
>DBCC-CHECKTABLE command on the database if I can't attach it on my sql 2000
>pc's? The database is 2000 format.
>ERROR:
>error 602: could not find row in sysindexes for database id 15, object ID 1,
>index ID 1. Run DBCC-CHECKTABLE on sysindexes.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200603/1
|||The error is:
error 602: could not find row in sysindexes for database id 15, object ID 1,
index ID 1. Run DBCC-CHECKTABLE on sysindexes.
"ranjitjain via droptable.com" <u16198@.uwe> wrote in message
news:5cee810f493ea@.uwe...
> Pls post the error you get?
> also read about sp_attach_single_file_db
> scott wrote:
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200603/1
Attach error
I plan to move my database file to another folder, I detach it first (successfull), but I can't move (Cut&Paste) my database to another folder (Access is denied), And then I go back object explorer but error when I try to Attach
"Failed to retrieve data for this request (Microsoft.SQLServer.SmoEnum)...... CREATE FILE encountered operating system error 5 (Access is denied)"
please tell me how to attach my database, I really need the data..
thx..
Hi,
you will have to logon with a user who has access to the file first. If you don′t have any, you can logon on SSMS with a SQL Server login (if enabled) and attach the database. The SQL Server Account will be used then for attaching the database whic apparantly had the access to the database.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.desql
Attach Error
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.
If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.
I get this error when I try to attcah a Database file sitting in "My Documents" folder.
Any help will be appreciated
--Thanks
Have you verified that the file actually exists, and that there is no misspelling in the path, and all else that the message tells you to verify?
If all that is ok, maybe try to enclose the path in double quotes. (in case it's the spacing that gives you trouble.
"C:\My Documents\myfile.dat"
/Kenneth
Attach Error
computers. SQL 2005 attaches the file just fine. How can I run the
DBCC-CHECKTABLE command on the database if I can't attach it on my sql 2000
pc's? The database is 2000 format.
ERROR:
error 602: could not find row in sysindexes for database id 15, object ID 1,
index ID 1. Run DBCC-CHECKTABLE on sysindexes.Pls post the error you get?
also read about sp_attach_single_file_db
scott wrote:
>I get the below error when trying to attach a database ONLY on my SQL 2000
>computers. SQL 2005 attaches the file just fine. How can I run the
>DBCC-CHECKTABLE command on the database if I can't attach it on my sql 2000
>pc's? The database is 2000 format.
>ERROR:
>error 602: could not find row in sysindexes for database id 15, object ID 1,
>index ID 1. Run DBCC-CHECKTABLE on sysindexes.
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1|||The error is:
error 602: could not find row in sysindexes for database id 15, object ID 1,
index ID 1. Run DBCC-CHECKTABLE on sysindexes.
"ranjitjain via SQLMonster.com" <u16198@.uwe> wrote in message
news:5cee810f493ea@.uwe...
> Pls post the error you get?
> also read about sp_attach_single_file_db
> scott wrote:
>>I get the below error when trying to attach a database ONLY on my SQL 2000
>>computers. SQL 2005 attaches the file just fine. How can I run the
>>DBCC-CHECKTABLE command on the database if I can't attach it on my sql
>>2000
>>pc's? The database is 2000 format.
>>ERROR:
>>error 602: could not find row in sysindexes for database id 15, object ID
>>1,
>>index ID 1. Run DBCC-CHECKTABLE on sysindexes.
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200603/1
Attach Error
computers. SQL 2005 attaches the file just fine. How can I run the
DBCC-CHECKTABLE command on the database if I can't attach it on my sql 2000
pc's? The database is 2000 format.
ERROR:
error 602: could not find row in sysindexes for database id 15, object ID 1,
index ID 1. Run DBCC-CHECKTABLE on sysindexes.Pls post the error you get?
also read about sp_attach_single_file_db
scott wrote:
>I get the below error when trying to attach a database ONLY on my SQL 2000
>computers. SQL 2005 attaches the file just fine. How can I run the
>DBCC-CHECKTABLE command on the database if I can't attach it on my sql 2000
>pc's? The database is 2000 format.
>ERROR:
>error 602: could not find row in sysindexes for database id 15, object ID 1
,
>index ID 1. Run DBCC-CHECKTABLE on sysindexes.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200603/1|||The error is:
error 602: could not find row in sysindexes for database id 15, object ID 1,
index ID 1. Run DBCC-CHECKTABLE on sysindexes.
"ranjitjain via droptable.com" <u16198@.uwe> wrote in message
news:5cee810f493ea@.uwe...
> Pls post the error you get?
> also read about sp_attach_single_file_db
> scott wrote:
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200603/1
Attach e Detach database
and attach a database from Enterprise Manager (All Tasks-Detach/Attach) or
with the system stored procedures ?
e.g.
if I look at KB 224071
http://support.microsoft.com/support/kb/articles/q224/0/71.asp (Moving SQL
Server Databases to a New Location with Detach/Attach) the articole said to
detach the database as follows :
use master
go
sp_detach_db 'mydb'
go
and to re-attach the database as follows :
use master
go
sp_attach_db 'mydb','...','...'
go
I think it's more simple to detach and attach the database from Enterprise
Manager than to write the stored procedure ...
Thanks,
Michele L.EA justs acts as a nice GUI. In the backgroud it actually
runs the sp_detach_db, sp_attach_db.
So your answer is - no not really ;)
J
>--Original Message--
>Maybe this a stupid question, but is there any
differences beetwen detach
>and attach a database from Enterprise Manager (All Tasks-
Detach/Attach) or
>with the system stored procedures ?
>e.g.
>if I look at KB 224071
>http://support.microsoft.com/support/kb/articles/q224/0/71
.asp (Moving SQL
>Server Databases to a New Location with Detach/Attach)
the articole said to
>detach the database as follows :
>use master
>go
>sp_detach_db 'mydb'
>go
>and to re-attach the database as follows :
>use master
>go
>sp_attach_db 'mydb','...','...'
>go
>I think it's more simple to detach and attach the
database from Enterprise
>Manager than to write the stored procedure ...
>Thanks,
>Michele L.
>
>
>
>
>.
>