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.