Monday, March 12, 2012
Problem Dropping Database C#
i have a problem dropping a database?
I have a WinForm and i can create DB, create the Tables and drop the DB via buttons.
When i start myProgram it's no problem to drop the Database.
Then i can create the database without problems.
The tables also without problems.
Now if i try to drop my whole DB, i get the error message:
SqlException Handle :System.Data.SqlClient.SqlException: Cannot drop database "XtmsDb" because it is currently in use.
The code for dropping db:
public void deleteProjectDB()
{
conn.ConnectionString = "Data Source=TURM21;Initial Catalog=master;Integrated Security=SSPI;";
sqlStr = "Drop database XTmsDB";
try
{
System.Console.WriteLine("Opening Connection...");
conn.Open();
System.Console.WriteLine("Connection opened!!!");
SqlCommand cmd = new SqlCommand(sqlStr, conn);
cmd.ExecuteNonQuery();
System.Console.WriteLine("Database dropped!!!");
}
catch (SqlException dropEx)
{
System.Console.WriteLine("SqlException Handle :{0}", dropEx.ToString());
}
finally
{
conn.Close();
System.Console.WriteLine("Connection closed!!!");
}
}
The code for creating db:
public void createProjectDB()
{
conn.ConnectionString = "Data Source=TURM21;Initial Catalog=master;Integrated Security=SSPI;";
sqlStr = projectDBStrings.getDBCreateString();
try
{
System.Console.WriteLine("Opening Connection...");
conn.Open();
System.Console.WriteLine("Connection opened!!!");
SqlCommand cmd = new SqlCommand(sqlStr, conn);
cmd.ExecuteNonQuery();
System.Console.WriteLine("Database created!!!");
}
catch (Exception)
{
System.Console.WriteLine("Could not establish Connection!");
}
finally
{
conn.Close();
System.Console.WriteLine("Connection closed!!!");
}
}
The code for creating Tables:
public void createProjectTables()
{
conn.ConnectionString = "Data Source=TURM21;Initial Catalog=XtmsDb;Integrated Security=SSPI;";
ArrayList createList = projectDBStrings.fillProjectSchema();
SqlTransaction tx;
SqlCommand cmd = new SqlCommand("", conn);
IEnumerator createListEnum = createList.GetEnumerator();
try
{
System.Console.WriteLine("Opening Connection...");
conn.Open();
System.Console.WriteLine("Connection opened!!!");
try
{
while (createListEnum.MoveNext())
{
sqlStr = (String)createListEnum.Current.ToString();
tx = conn.BeginTransaction();
cmd.CommandText = sqlStr;
cmd.Transaction = tx;
cmd.ExecuteNonQuery();
tx.Commit();
}
System.Console.WriteLine("Schema created!!!");
}
catch (SqlException deleteEx)
{
System.Console.WriteLine("SqlException Handle :{0}", deleteEx.ToString());
}
}
catch (SqlException connectionEx)
{
System.Console.WriteLine("SqlConnection Handle : {0}", connectionEx.ToString());
}
finally
{
conn.Close();
System.Console.WriteLine("Connection closed!!!");
}
}
Who can help me?You can't drop a database while you (or anyone) are connected to it. You will need to switch your connection to a different database before issuing your command.|||But i closed the connection. Isn't that enough. How can i change connection to other DB? SOrry, but i'm a beginner.
Greetz|||Ok i know hoe to change. But why isnt it enough to close connection?|||I'm not an application programmer, but if you close the connection how can you issue ANY command to the server?|||I like to think I'm an application programmer.
Just looking at the code... isn't Crean connected to Master when he tries to drop the db?|||yes, i'm connecting to master, so i don't know where the problem is.
I changed to another db
conn.ChangeDatabase("XTMSTEST2");
Now it works. But its not a nice solution.
Anyone knows what the problem is?|||If there are any open connections to the database you cannot drop the database and the error is self-explanatory. In general it is better to use master database whenever dropping any user datatabase.|||Yes but i switched to master in the connection string.
But I solved my Problem. U have to turn pooling off in connection String.
On master and on xtms
Connection string looks like this:
Data Source=TURM21;Initial Catalog=master;Integrated Security=SSPI;pooling false
So thats the solution. But what are the drawbacks if pooling is on false?
Really a great forum. U always get an answer. Great!!!!!!!!!!!
Greets|||Looks like you just GAVE the answer.
Thanks for posting the solution.|||U can improve the perfomance of ur application by enabling pooling.
Applications often have different users performing the same type of database access.
For example, many users might be querying the same database to get the same data. In those cases, the performance of the application can be enhanced by having the application pool, connections to the data source.
The overhead of having each user open and close a separate connection can otherwise have an adverse effect on application performance.|||U can improve the perfomance of ur application by enabling pooling.
Applications often have different users performing the same type of database access.
For example, many users might be querying the same database to get the same data. In those cases, the performance of the application can be enhanced by having the application pool, connections to the data source.
The overhead of having each user open and close a separate connection can otherwise have an adverse effect on application performance.In most cases, this is quite correct. In this case, since the pooled connection stays in a database that needs to be unused in order to be dropped, turning off the pooling for this particular operation seems to be required, not optional.
-PatP|||thx all.
Thread closed. ;)
Problem Doing SQL 2005 DB Restore - Media Families
I did a full DB backup that I am trying now to restore via the SQL Server Management Studio.
I select "Restore" and then "From Device" and point to the bak file that I want to restore from.
I then go into the Options page and check "Overwrite the existing database".
Below that, shows the Restore the database files as
RB_Data_Services_MSCRM
RB_Data_Services_MSCRM_Log
sysft_ftcat_documentindex
When I then click OK I get the following error. The Media Set has 3 Media Families but only 1 are provided. All members must be provided.
Any ideas as to what I did to do to be able to complete this restore?
Thank
Rick Bellefond
Have you treid using RESTORE statement from query analyzer?|||Check that Database Name of the Database your are restoring matches that of the database your are resoring too.|||refer this it has the solution
http://forums.microsoft.com/technet/showpost.aspx?postid=259647&siteid=17&sb=0&d=1&at=7&ft=11&tf=0&pageid=1
Madhu
Problem Doing SQL 2005 DB Restore - Media Families
I did a full DB backup that I am trying now to restore via the SQL Server Management Studio.
I select "Restore" and then "From Device" and point to the bak file that I want to restore from.
I then go into the Options page and check "Overwrite the existing database".
Below that, shows the Restore the database files as
RB_Data_Services_MSCRM
RB_Data_Services_MSCRM_Log
sysft_ftcat_documentindex
When I then click OK I get the following error. The Media Set has 3 Media Families but only 1 are provided. All members must be provided.
Any ideas as to what I did to do to be able to complete this restore?
Thank
Rick Bellefond
Have you treid using RESTORE statement from query analyzer?|||Check that Database Name of the Database your are restoring matches that of the database your are resoring too.|||refer this it has the solution
http://forums.microsoft.com/technet/showpost.aspx?postid=259647&siteid=17&sb=0&d=1&at=7&ft=11&tf=0&pageid=1
Madhu
Problem Doing SQL 2005 DB Restore
I did a full DB backup that I am trying now to restore via the SQL Server Management Studio.
I select "Restore" and then "From Device" and point to the bak file that I want to restore from.
I then go into the Options page and check "Overwrite the existing database".
Below that, shows the Restore the database files as
RB_Data_Services_MSCRM
RB_Data_Services_MSCRM_Log
sysft_ftcat_documentindex
When I then click OK I get the following error. The Media Set has 3 Media Families but only 1 are provided. All members must be provided.
Any ideas as to what I did to do to be able to complete this restore?
Thank
Rick Bellefond
Looks like you created a backup that spanned multiple media families. You need to add in all of the pieces of the backup that you took for this to work.|||Michael,
I did not intend to have my backup span multiple media families but I guess that is what I did.
I was not able to use that backup but found one that I could use.
Thanks.
Rick
Monday, February 20, 2012
Problem converting rows to a string
I have two tables which are connected via a third table (N:N
relationship):
Table 1 "Locations"
LocationID (Primary Key)
Table 2 "Specialists"
SpecialistID (Primary Key)
Name (varchar)
Table 3 "SpecialistLocations"
SpecialistID (Foreign Key)
LocationID (Foreign Key)
(both together are the primary key for this table)
Issuing the following command
SELECT
L.LocationID , S.[Name]
FROM
Locations AS L
LEFT JOIN SpecialistLocations AS SL ON P.PlaceID = SL.LocationID
LEFT JOIN Specialists AS S ON SL.SpecialistID = S.SpecialistID
results in the following table:
LocationID | Name
1Specialist 1
1Specialist 2
2Specialist 3
2Specialist 4
3Specialist 1
4Specialist 4
Now my problem: I would like to have the following output:
LocationID | Names
1Specialist 1, Specialist 2
2Specialist 3, Specialist 4
3Specialist 1
4Specialist 4
...which is grouping by LocationID and concatenating the specialist
names.
Any idea on how to do this?
Thank you very much,
Dennis(dnsstaiger@.gmx.net) writes:
> Now my problem: I would like to have the following output:
> LocationID | Names
> 1 Specialist 1, Specialist 2
> 2 Specialist 3, Specialist 4
> 3 Specialist 1
> 4 Specialist 4
> ...which is grouping by LocationID and concatenating the specialist
> names.
> Any idea on how to do this?
This is one of the rare cases where you need to set up a cursor and
iterate. In SQL 2000 there is no defined way to do this. (There is
a shortcut, but it relies on undefined behaviour, so I don't recommend it.)
In SQL 2005, currently in beta, the story is different. There you
actually have a way to this in a set-based statement, although the
syntax is somewhat bewildering. (It's actually a by-product, of all
the XML stuff they thrown in.)
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I typically do things like this in my application code, i.e. while the
locationid is the same, keep tacking values onto the other column's
display in a comma delim format.|||pb648174 (google@.webpaul.net) writes:
> I typically do things like this in my application code, i.e. while the
> locationid is the same, keep tacking values onto the other column's
> display in a comma delim format.
Yes, that is also a very common advice. But people insists on asking
about how doing this in SQL, that I've given up telling them to use
application code. (And sometimes the application is not any more
sophisticated than Query Analyzer.)
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Can you post the SQL 2005 code that will do this? I've been hoping SQL
2005 would have an aggregate function for strings that would turn it
into a delimited string.|||pb648174 (google@.webpaul.net) writes:
> Can you post the SQL 2005 code that will do this? I've been hoping SQL
> 2005 would have an aggregate function for strings that would turn it
> into a delimited string.
Sure, here it is:
select CustomerID,
substring(OrdIdList, 1, datalength(OrdIdList)/2 - 1)
-- strip the last ',' from the list
from
Customers c cross apply
(select convert(nvarchar(30), OrderID) + ',' as [text()]
from Orders o
where o.CustomerID = c.CustomerID
order by o.OrderID
for xml path('')) as Dummy(OrdIdList)
go
This gives you an output like:
ALFKI 10643,10692,10702,10835,10952,11011
ANATR 10308,10625,10759,10926
ANTON 10365,10507,10535,10573,10677,10682,10856
Now, I did definitely come with this on my own, but I got it from one
of the SQL Server developers.
The part that produces the comma separated list, is the text() function,
which is activated by the XML PATH('') at the bottom. The real point
of text() is probably not to produce a comma separated list, but it's
possible to do it.
Then then comma-separated list is combined with Customers through
CROSS APPLY. APPLY is another operator I have not fully digested
yet, but you use it when you want to call a table-valued functions
with parameters from other columns in the query; something you can't
do in SQL 2000.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Problem connection to SQL Server with ODBC
Getting very frustrated by the following problem, using SQL Server 2000 (inc
SP3a), using an application that connects to a DB via ODBC and the following
error message comes up:
Connection failed:
SQLSTATE: '01000'
SQL Server Error: 1703
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error:17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server doe
s not exist
or access denied
When setting up the DSN the test works fine as does query analyzer, pretty
sure it's not the application I'm using as the SQL server connection window
that comes up after the initial error (above) gives the same error message.
Any ideas? Help is definitely needed before I tear my hair out!
Thanks
IanWhat protocols are being used by the client and what is the
server listening on?
Are the client network utilities on the clients having the
connectivity problems?
Are you using an alias for the connection?
What version of MDAC on the clients?
From your description, it sounds like the app tries to
connect twice (which is fine) but that it's just not hitting
the right protocols. You can find information on how a
client runs through the protocols trying to connect in this
article:
INF: SQL Server Clients May Change Protocols When They Try
to Connect
http://support.microsoft.com/?id=328383
You can also find some general troubleshooting for the error
at:
INF: Potential Causes of the "SQL Server Does Not Exist or
Access Denied" Error Message
http://support.microsoft.com/?id=328306
-Sue
On Tue, 6 Apr 2004 10:12:37 +0100, "Ian Spanswick"
<ian.spanswick@.eps-hq.co.uk> wrote:
>Hi,
>Getting very frustrated by the following problem, using SQL Server 2000 (in
c
>SP3a), using an application that connects to a DB via ODBC and the followin
g
>error message comes up:
>Connection failed:
>SQLSTATE: '01000'
>SQL Server Error: 1703
>[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpe
n
>(Connect()).
>Connection failed:
>SQLState: '08001'
>SQL Server Error:17
>[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server do
es not exist
>or access denied
>When setting up the DSN the test works fine as does query analyzer, pretty
>sure it's not the application I'm using as the SQL server connection window
>that comes up after the initial error (above) gives the same error message.
>Any ideas? Help is definitely needed before I tear my hair out!
>Thanks
>Ian
>|||Thanks for the links, studying them now but have moved my database to
another server and things are going better! Still want to get to the bottom
of the problem.
Ian
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:i3i670lutthh68l5mqlgn479ng66ornom3@.
4ax.com...
> What protocols are being used by the client and what is the
> server listening on?
> Are the client network utilities on the clients having the
> connectivity problems?
> Are you using an alias for the connection?
> What version of MDAC on the clients?
> From your description, it sounds like the app tries to
> connect twice (which is fine) but that it's just not hitting
> the right protocols. You can find information on how a
> client runs through the protocols trying to connect in this
> article:
> INF: SQL Server Clients May Change Protocols When They Try
> to Connect
> http://support.microsoft.com/?id=328383
> You can also find some general troubleshooting for the error
> at:
> INF: Potential Causes of the "SQL Server Does Not Exist or
> Access Denied" Error Message
> http://support.microsoft.com/?id=328306
> -Sue
> On Tue, 6 Apr 2004 10:12:37 +0100, "Ian Spanswick"
> <ian.spanswick@.eps-hq.co.uk> wrote:
>
(inc
following
exist
pretty
window
message.
>
Problem connection to FoxPro database via ole db
I'm accessing a FoxPro database via ole db and ths works fine on my local
report server. However, when I deploy the report to the live report server
I'm getting the error 'Invalid path or file name'
The FoxPro database is on a separate server and the connection string is :
string connectionString = @."provider=vfpoledb;" +
@."data source='\\server\data\foxpro.dbc';" +
"password='';user id=''";
I've read a few articles explaining that it's a permissions problem. I've
tried granting full permissions to the data folder for myself and 'Network
Service' but this still occurs. The web.config file for the report server has
impersonate set to true and IIS is configured for 'Integrated Windows
authentication' and does not use anonymous access.
Any ideas would be much appreciated.
Regards
MikeHi Mike,
Does the report server's account have permissions to the directory?
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"MikeD" <MikeD@.discussions.microsoft.com> wrote in message
news:9A295512-41F7-48A0-B406-08AE86F55CA8@.microsoft.com...
> Hi,
> I'm accessing a FoxPro database via ole db and ths works fine on my local
> report server. However, when I deploy the report to the live report server
> I'm getting the error 'Invalid path or file name'
> The FoxPro database is on a separate server and the connection string is :
> string connectionString = @."provider=vfpoledb;" +
> @."data source='\\server\data\foxpro.dbc';" +
> "password='';user id=''";
> I've read a few articles explaining that it's a permissions problem. I've
> tried granting full permissions to the data folder for myself and 'Network
> Service' but this still occurs. The web.config file for the report server
> has
> impersonate set to true and IIS is configured for 'Integrated Windows
> authentication' and does not use anonymous access.
> Any ideas would be much appreciated.
> Regards
> Mike
Problem Connecting to sql2000 via RS2005
First, I have done a search for this problem already, but have not been able
to find exactly what I'm looking for.
I know that you can connect to a sql2000 db from RS2005. However, when I try
to run a report from the 2005 report manager I get this message;
"An error has occurred during report processing.
Cannot create a connection to data source 'CommerceCenter'.
For more information about this error navigate to the report server on the
local server machine, or enable remote errors"
CommerceCenter is the datastore for the report i created using VS2005. I
have the credentials to connect to the db.
What am I doing wrong?
Thanks.Hi Damon:
Did your upgrade from RS2000 to RS2005 cause this issue? If so, and you
didn't backup and restore your encryption key according to the instructions,
you may need to re-set all of your datasources.
You might need to re-input any stored passwords you have set up.
If you are not doing so, I highly suggest you use Shared DataSources. It
makes for one-stop shopping for all of your reporting data needs!
Hope this helps. Good luck.
Todd C
"Damon Johnson" wrote:
> Hello Everyone,
> First, I have done a search for this problem already, but have not been able
> to find exactly what I'm looking for.
> I know that you can connect to a sql2000 db from RS2005. However, when I try
> to run a report from the 2005 report manager I get this message;
> "An error has occurred during report processing.
> Cannot create a connection to data source 'CommerceCenter'.
> For more information about this error navigate to the report server on the
> local server machine, or enable remote errors"
> CommerceCenter is the datastore for the report i created using VS2005. I
> have the credentials to connect to the db.
> What am I doing wrong?
> Thanks.
Problem connecting to SQL Server via Query Analyzer
I recently ran into an issue where I receive an error whenever I try
to connect to my database on a particular server via the Query Analyzer.
The error I receive is
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
Anyone else run into this before?Do you only have problem connecting to this particular
server? Your ODBC driver may be messed up somehow. See if
you can update your MDAC.
Linchi
quote:
>--Original Message--
>SQL 2000/SP3
>I recently ran into an issue where I receive an error
whenever I try
quote:
>to connect to my database on a particular server via the
Query Analyzer.
quote:
>The error I receive is
>ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver
Manager]Driver's
quote:|||I can't connect to any of our servers and only my machine seems to be
>SQLAllocHandle on SQL_HANDLE_ENV failed.
>Anyone else run into this before?
>
>.
>
having this issue. I am guessing, that yes, the drivers are fried. I
had
installed some internal application software and then ka-boom... I can't
connect anywhere.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:16a801c3df9b$3fb1d5d0$a601280a@.phx.gbl...[QUOTE]
> Do you only have problem connecting to this particular
> server? Your ODBC driver may be messed up somehow. See if
> you can update your MDAC.
> Linchi
>
> whenever I try
> Query Analyzer.
> Manager]Driver's|||Hi Simon,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, when connecting to a database on a particular
server byQuery Analyzer, you got the error message as follows:
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
and you mentiond that you install some other softwares and after that, you
encounter this problem, right?
I wonder if you could login with system administrator account and
re-install the MDAC then reboot your system. You could download MDAC2.8 at:
http://www.microsoft.com/downloads/...0fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Hope this helps and I am looking forward to your response! Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Yes, this corrected it!
Thanks!!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:M$wbGO83DHA.568@.cpmsftngxa07.phx.gbl...
quote:
> Hi Simon,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, when connecting to a database on a particular
> server byQuery Analyzer, you got the error message as follows:
> ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
> SQLAllocHandle on SQL_HANDLE_ENV failed.
> and you mentiond that you install some other softwares and after that, you
> encounter this problem, right?
> I wonder if you could login with system administrator account and
> re-install the MDAC then reboot your system. You could download MDAC2.8
at:
quote:
>
http://www.microsoft.com/downloads/...0fe3-c795-4b7d-
quote:|||Hi Simon,
> b037-185d0506396c&DisplayLang=en
> Hope this helps and I am looking forward to your response! Thanks.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
Thank you for using MSDN Newsgroup!
I would like to follow up on this issue and see if you still have questions
about this issue. Should you have any questions, please feel free to post
here. Looking forward to your reply!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi there, I see this thread is back from 2004. I am having an issue connecti
ng to a sql server located on another machine on my Intranet. I recieve the
following error:
unable to connect to server ...
server: Msg 17, Level 16, State 1
Microsoft odbc sql server driver odbnetlib sql server does not exit or acces
s
I tried to connect to other sql servers, and I got no problem, except for th
is particular server. any ideas'
From http://www.developmentnow.com/g/118...ry-Analyzer.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com|||1. Server does exist (server name spellign corrcet)?
2. You sure you have permission to access it?
3. Network library compatible?
"Efrain Juarez" <stranger_tepa@.hotmail.com> wrote in message
news:1bf20371-0394-4c54-a975-764a23b202d5@.developmentnow.com...
> Hi there, I see this thread is back from 2004. I am having an issue
> connecting to a sql server located on another machine on my Intranet. I
> recieve the following error:
> unable to connect to server ...
> server: Msg 17, Level 16, State 1
> Microsoft odbc sql server driver odbnetlib sql server does not exit or
> access
> I tried to connect to other sql servers, and I got no problem, except for
> this particular server. any ideas'
> From
> http://www.developmentnow.com/g/118...ry-Analyzer.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
Problem connecting to SQL Server via Query Analyzer
I recently ran into an issue where I receive an error whenever I try
to connect to my database on a particular server via the Query Analyzer.
The error I receive is
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
Anyone else run into this before?Do you only have problem connecting to this particular
server? Your ODBC driver may be messed up somehow. See if
you can update your MDAC.
Linchi
>--Original Message--
>SQL 2000/SP3
>I recently ran into an issue where I receive an error
whenever I try
>to connect to my database on a particular server via the
Query Analyzer.
>The error I receive is
>ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver
Manager]Driver's
>SQLAllocHandle on SQL_HANDLE_ENV failed.
>Anyone else run into this before?
>
>.
>|||I can't connect to any of our servers and only my machine seems to be
having this issue. I am guessing, that yes, the drivers are fried. I
had
installed some internal application software and then ka-boom... I can't
connect anywhere.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:16a801c3df9b$3fb1d5d0$a601280a@.phx.gbl...
> Do you only have problem connecting to this particular
> server? Your ODBC driver may be messed up somehow. See if
> you can update your MDAC.
> Linchi
> >--Original Message--
> >
> >SQL 2000/SP3
> >
> >I recently ran into an issue where I receive an error
> whenever I try
> >to connect to my database on a particular server via the
> Query Analyzer.
> >
> >The error I receive is
> >
> >ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver
> Manager]Driver's
> >SQLAllocHandle on SQL_HANDLE_ENV failed.
> >
> >Anyone else run into this before?
> >
> >
> >.
> >|||Hi Simon,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, when connecting to a database on a particular
server byQuery Analyzer, you got the error message as follows:
ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed.
and you mentiond that you install some other softwares and after that, you
encounter this problem, right?
I wonder if you could login with system administrator account and
re-install the MDAC then reboot your system. You could download MDAC2.8 at:
http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Hope this helps and I am looking forward to your response! Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Yes, this corrected it!
Thanks!!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:M$wbGO83DHA.568@.cpmsftngxa07.phx.gbl...
> Hi Simon,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, when connecting to a database on a particular
> server byQuery Analyzer, you got the error message as follows:
> ODBC: Msg 0, Level 16, State 1 [Microsoft][ODBC Driver Manager]Driver's
> SQLAllocHandle on SQL_HANDLE_ENV failed.
> and you mentiond that you install some other softwares and after that, you
> encounter this problem, right?
> I wonder if you could login with system administrator account and
> re-install the MDAC then reboot your system. You could download MDAC2.8
at:
>
http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-
> b037-185d0506396c&DisplayLang=en
> Hope this helps and I am looking forward to your response! Thanks.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>|||Hi Simon,
Thank you for using MSDN Newsgroup!
I would like to follow up on this issue and see if you still have questions
about this issue. Should you have any questions, please feel free to post
here. Looking forward to your reply!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi there, I see this thread is back from 2004. I am having an issue connecting to a sql server located on another machine on my Intranet. I recieve the following error:
unable to connect to server ...
server: Msg 17, Level 16, State 1
Microsoft odbc sql server driver odbnetlib sql server does not exit or access
I tried to connect to other sql servers, and I got no problem, except for this particular server. any ideas?
From http://www.developmentnow.com/g/118_2004_1_0_0_468284/Problem-connecting-to-SQL-Server-via-Query-Analyzer.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||1. Server does exist (server name spellign corrcet)?
2. You sure you have permission to access it?
3. Network library compatible?
"Efrain Juarez" <stranger_tepa@.hotmail.com> wrote in message
news:1bf20371-0394-4c54-a975-764a23b202d5@.developmentnow.com...
> Hi there, I see this thread is back from 2004. I am having an issue
> connecting to a sql server located on another machine on my Intranet. I
> recieve the following error:
> unable to connect to server ...
> server: Msg 17, Level 16, State 1
> Microsoft odbc sql server driver odbnetlib sql server does not exit or
> access
> I tried to connect to other sql servers, and I got no problem, except for
> this particular server. any ideas'
> From
> http://www.developmentnow.com/g/118_2004_1_0_0_468284/Problem-connecting-to-SQL-Server-via-Query-Analyzer.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
Problem connecting to SQL Server via Query Analyzer
unable to connect to server ...
server: Msg 17, Level 16, State 1
Microsoft odbc sql server driver odbnetlib sql server does not exit or access
I tried to connect to other sql servers, and I got no problem, except for this particular server. any ideas?
From http://www.developmentnow.com/g/118_2004_1_0_0_468284/Problem-connecting-to-SQL-Server-via-Query-Analyzer.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
1. Server does exist (server name spellign corrcet)?
2. You sure you have permission to access it?
3. Network library compatible?
"Efrain Juarez" <stranger_tepa@.hotmail.com> wrote in message
news:1bf20371-0394-4c54-a975-764a23b202d5@.developmentnow.com...
> Hi there, I see this thread is back from 2004. I am having an issue
> connecting to a sql server located on another machine on my Intranet. I
> recieve the following error:
> unable to connect to server ...
> server: Msg 17, Level 16, State 1
> Microsoft odbc sql server driver odbnetlib sql server does not exit or
> access
> I tried to connect to other sql servers, and I got no problem, except for
> this particular server. any ideas?
> From
> http://www.developmentnow.com/g/118_2004_1_0_0_468284/Problem-connecting-to-SQL-Server-via-Query-Analyzer.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com