Tuesday, March 27, 2012
Deleting old servers still listed in Query Analyzer ????????
aliases.
But when I 1st run Query Analyzer (QA)... it shows a list of some old
servers we used to have... long ago.
How do I delete from that list?
(The old servers have already been removed from the CNU alias list... but
they seem to stay listed in QA forever.)
They have nothing to do with each other. Any registrations you did in QA or
EM you will have to manually delete them from the registrations by right
clicking and choosing Delete.
Andrew J. Kelly SQL MVP
""A_Michigan_User"" <Michigan_RE_M0VE@.ameritech.net> wrote in message
news:%23gKQ7lwOGHA.3944@.tk2msftngp13.phx.gbl...
>I can use the Client Network Utility (CNU) from SQL 2000 to create/delete
>aliases.
> But when I 1st run Query Analyzer (QA)... it shows a list of some old
> servers we used to have... long ago.
> How do I delete from that list?
> (The old servers have already been removed from the CNU alias list... but
> they seem to stay listed in QA forever.)
>
>
|||"A_Michigan_User" wrote:
> I can use the Client Network Utility (CNU) from SQL 2000 to
> create/delete aliases.
> But when I 1st run Query Analyzer (QA)... it shows a list of some old
> servers we used to have... long ago.
> How do I delete from that list?
> (The old servers have already been removed from the CNU alias list...
> but they seem to stay listed in QA forever.)
For QA, the servers are stored here in the registration database:
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server\80\Tools\Client\PrefServers
You can remove the pairs you do not need - carefully. I don't know how
to remove servers from the QA drop-down list in the connection dialog
other than by editing the regdb. I see different servers listed in QA
than I have for SQLEM, so removing the server from SQLEM does seem like
it will work in QA.
David Gugick - SQL Server MVP
Quest Software
|||> They have nothing to do with each other.
I thought I *HAD TO* add them with CNU... then they appeared as "available"
in QA and EM.
No?
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:eP%237NMyOGHA.1312@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> They have nothing to do with each other. Any registrations you did in QA
> or EM you will have to manually delete them from the registrations by
> right clicking and choosing Delete.
> --
> Andrew J. Kelly SQL MVP
>
> ""A_Michigan_User"" <Michigan_RE_M0VE@.ameritech.net> wrote in message
> news:%23gKQ7lwOGHA.3944@.tk2msftngp13.phx.gbl...
|||The CNU just allowed you to alias them. Then maybe you can see them thru
the alias but that is not a requirement to register a server. You just need
the name or IP address of the server and it has to be available on the right
port, 1433 by default.
Andrew J. Kelly SQL MVP
""A_Michigan_User"" <Michigan_RE_M0VE@.ameritech.net> wrote in message
news:eqFg7jlRGHA.2156@.tk2msftngp13.phx.gbl...
> I thought I *HAD TO* add them with CNU... then they appeared as
> "available" in QA and EM.
> No?
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eP%237NMyOGHA.1312@.TK2MSFTNGP09.phx.gbl...
>
Friday, March 9, 2012
deleted my database log file, cant reattach
A utility I was running caused our database's log file to run out of
hard drive.
So, I detached the database, deleted the log file, and tried to
reattach.
SQL server fails to reattach because it cant find the log file. (Why
it cant just create a new default one is beyond me...but...)
EXEC sp_attach_single_file_db @.dbname = 'sgvault',
@.physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\sgvault.mdf''
Could not open new database 'sgvault'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'C:\Program
Files\Microsoft SQL Server\MSSQL\data\sgvault_log.LDF' may be
incorrect.
Do you know how I can fix this dilemma? Thanks!josepinchero@.yahoo.com (Jose) wrote in message news:<b9dff992.0408251727.2fe3e679@.posting.google.com>...
> Hello,
> A utility I was running caused our database's log file to run out of
> hard drive.
> So, I detached the database, deleted the log file, and tried to
> reattach.
> SQL server fails to reattach because it cant find the log file. (Why
> it cant just create a new default one is beyond me...but...)
> EXEC sp_attach_single_file_db @.dbname = 'sgvault',
> @.physname = 'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\sgvault.mdf''
> Could not open new database 'sgvault'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'C:\Program
> Files\Microsoft SQL Server\MSSQL\data\sgvault_log.LDF' may be
> incorrect.
> Do you know how I can fix this dilemma? Thanks!
Assuming that you detached the database with sp_detach_db, then this
should work. If not, and assuming that you have the correct path to
the .mdf in your command, as well as full permissions in that folder,
then you will probably have to restore from backup. You can then
shrink the log file as described here:
http://support.microsoft.com/defaul...8&Product=sql2k
Simon|||[posted and mailed]
Jose (josepinchero@.yahoo.com) writes:
> A utility I was running caused our database's log file to run out of
> hard drive.
> So, I detached the database, deleted the log file, and tried to
> reattach.
That was a very, very bad thing to do. Never, never delete log fils
(unless you really want to get rid of that database). And if you really
must do, first make sure that copied it somewhere else first.
I leave this is as a memento not only for you, but for anyone who might
see these thread on Google in the future.
> SQL server fails to reattach because it cant find the log file. (Why
> it cant just create a new default one is beyond me...but...)
> EXEC sp_attach_single_file_db @.dbname = 'sgvault',
> @.physname = 'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\sgvault.mdf''
> Could not open new database 'sgvault'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'C:\Program
> Files\Microsoft SQL Server\MSSQL\data\sgvault_log.LDF' may be
> incorrect.
I tried this exercise (with a database I could afford to waste), and I
got this message too, but the next message said that it was creating
an LDF for me.
It may be that your database was not shut down cleanly, for instance
because you panicked and killed SQL Server before you detached.
> Do you know how I can fix this dilemma? Thanks!
If you have a good backup, restore it. If not, well, you may be able
to get to that data - or you may not.
I know of a way to make the database accessible from SQL Server, in so
far that you can say "use db". But depending on what that application
was doing, your database may be more or less corrupt. This is because
you may get the database in the middle of a transaction, so that page
linkings may be bad. And if even DBCC comes out clean, your own data
may be inconsistent.
I am not going to post the steps bring the database back online, because
they are far too dangerous. I would strongly recommend you to open a
case with Microsoft Support. No that is not going to be cheap, but you
need to weigh that against of losing the data altogether.
If you absolutely want to fight this alone, I can send the instructions
by mail.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp