Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Friday, March 30, 2012

how can i connect to sqlserver2005 express by ado

hr = m_pConnection.CreateInstance("ADODB.Connection");
if (SUCCEEDED(hr))
{
if (FAILED(m_pConnection->Open("Provider = sqloledb;Server=(local);Database=c863;Trusted_Connection=yes","","",-1)))
{
AfxMessageBox("Can not open Database!");
m_pConnection.Release();
return FALSE;
}

}
when i debug ,there is an exception at "m_pConnection->Open("Provider = sqloledb;Server=(local);Database=c863;Trusted_Connection=yes","","",-1)))"
the exception is
'Book.exe': Loaded 'C:\Program Files\Common Files\System\Ole DB\sqloledb.rll', Binary was not built with debug information.
First-chance exception at 0x7c81eb33 in Book.exe: Microsoft C++ exception: _com_error at memory location 0x0013fba4..
how should i do?

Try

Server=(local)\SQLEXPRESS

SQL Express is installed as a "named" instance by default, an drequires the instance name specification when making a connection (as opposed to a "default" instance).|||Sorry,it dont still work.the exception is
"First-chance exception at 0x7c81eb33 in Book.exe: Microsoft C++ exception: _com_error at memory location 0x0013fba4.."|||It looks like the failure may be unrelated to your connection string.

>> First-chance exception at 0x7c81eb33 in Book.exe: Microsoft C++ exception: _com_error at memory location 0x0013fba4.

Try running your application with a debugger attached and breaking at the point the exception occurs. This will likely give you more insight into the cause of the problem.

Hope this helps,
Vaughn

how can i connect to sqlserver2005 express by ado

hr = m_pConnection.CreateInstance("ADODB.Connection");
if (SUCCEEDED(hr))
{
if (FAILED(m_pConnection->Open("Provider = sqloledb;Server=(local);Database=c863;Trusted_Connection=yes","","",-1)))
{
AfxMessageBox("Can not open Database!");
m_pConnection.Release();
return FALSE;
}

}
when i debug ,there is an exception at "m_pConnection->Open("Provider = sqloledb;Server=(local);Database=c863;Trusted_Connection=yes","","",-1)))"
the exception is
'Book.exe': Loaded 'C:\Program Files\Common Files\System\Ole DB\sqloledb.rll', Binary was not built with debug information.
First-chance exception at 0x7c81eb33 in Book.exe: Microsoft C++ exception: _com_error at memory location 0x0013fba4..
how should i do?Try

Server=(local)\SQLEXPRESS

SQL Express is installed as a "named" instance by default, an drequires the instance name specification when making a connection (as opposed to a "default" instance).|||Sorry,it dont still work.the exception is
"First-chance exception at 0x7c81eb33 in Book.exe: Microsoft C++ exception: _com_error at memory location 0x0013fba4.."
|||It looks like the failure may be unrelated to your connection string.

>> First-chance exception at 0x7c81eb33 in Book.exe: Microsoft C++ exception: _com_error at memory location 0x0013fba4.

Try running your application with a debugger attached and breaking at the point the exception occurs. This will likely give you more insight into the cause of the problem.

Hope this helps,
Vaughnsql

How can I connect to Microsoft SQL Server 2005 CTP with Microsoft SQL Server 2005 Express Manage

I installed Microsoft SQL Server 2005 Express Manager and connect to SQL 2000 normally
but when I connect to Microsoft SQL Server 2005 CTP, I failed! when I open SQL Configuration Manager,
I find the SQL Server had been running, after I opened "Attribute" window, I find "This account" box had been checked,
and "NT AUTHORITY\NETWORK SERVICE" was displayed in Account Name edit box, "**********" was displayed in "Password" edit box.

I think that the reason I can't connect to Microsoft SQL Server 2005 CTP is that I can't know the name of SQL Server 200, account, password.
right? In Microsoft SQL Server 2000 I can find the name of server from "Service Manager" and default accunt is "SA", the default password is blank.
but I can't find it in Microsoft SQL Server 2005. Any more, when I open "Express Manager", there are two radio button, "Windows Authentication" and "SQL Server Authentication",
which one will I choose? Does "Server Instance" point the name of SQL Server 2000? or Does "Server Instance" point the name of my computer?

Hi,

Try connecting with '.\SqlExpress' as the instance name. If you haven't specified a username and password then, windows authentication is the mode of logging into Sql2005...

cheers,

Paul June A. Domag

|||Hi,

You can also enable SQL Authentication. Follow instructions to enable it:
Enabling SQL Authentication

STEP1:
You need to enable SQL Authentication on the machine. This is complex in SQLExpress and you need to edit the registry. Copy the following lines of text onto a Notepad and save it with extention .REG.
-COPY BELOW
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer]
"LoginMode"=dword:00000002
-COPY TILL THIS
STEP2: Double Click on the .REG file to change the registry. This change the Authentication Mode to enable SQL Authentication.

STEP3: Restart the SQL Server Express Service or reboot the machine for registry change to take effect.

Next, you need to add a user with SQLLogin.
To do this: Login to SQLExpress using Express Manager and run the script below:
-
USE MASTER
sp_addLogin 'newuser', 'newuser@.123'
GO
sp_addsrvrolemember 'newuser', 'sysadmin'
GO
-
Once this is done, you can logon with the username/password combination.

Regards,
Vikram

|||Hi Vikram,
thank you for this post - was of great help !

Regards,
Fabian
|||Hey this is very cool! But I have a question- in the past it seems these settings follows each individual SQL Server Instance, but now it seems its a global setting as it does not require any instance specific configuration?|||

Help!!!

Please help me sort through this mass of web server information and configuration. I don't know where to begin?

l

|||

Thank you, I am a novice in this area.

Charles

|||

Hi William,

No, configuration is still instance specific. Each instance has a seperate registry hive in the format:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.x
where x is some integer.

The mapping from MSSQL.x to the actual instance name can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names.

Il-Sung.

How can I connect to Microsoft SQL Server 2005 CTP with Microsoft SQL Server 2005 Express Ma

I installed Microsoft SQL Server 2005 Express Manager and connect to SQL 2000 normally
but when I connect to Microsoft SQL Server 2005 CTP, I failed! when I open SQL Configuration Manager,
I find the SQL Server had been running, after I opened "Attribute" window, I find "This account" box had been checked,
and "NT AUTHORITY\NETWORK SERVICE" was displayed in Account Name edit box, "**********" was displayed in "Password" edit box.

I think that the reason I can't connect to Microsoft SQL Server 2005 CTP is that I can't know the name of SQL Server 200, account, password.
right? In Microsoft SQL Server 2000 I can find the name of server from "Service Manager" and default accunt is "SA", the default password is blank.
but I can't find it in Microsoft SQL Server 2005. Any more, when I open "Express Manager", there are two radio button, "Windows Authentication" and "SQL Server Authentication",
which one will I choose? Does "Server Instance" point the name of SQL Server 2000? or Does "Server Instance" point the name of my computer?

Hi,

Try connecting with '.\SqlExpress' as the instance name. If you haven't specified a username and password then, windows authentication is the mode of logging into Sql2005...

cheers,

Paul June A. Domag

|||Hi,

You can also enable SQL Authentication. Follow instructions to enable it:
Enabling SQL Authentication

STEP1:
You need to enable SQL Authentication on the machine. This is complex in SQLExpress and you need to edit the registry. Copy the following lines of text onto a Notepad and save it with extention .REG.
-COPY BELOW
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer]
"LoginMode"=dword:00000002
-COPY TILL THIS
STEP2: Double Click on the .REG file to change the registry. This change the Authentication Mode to enable SQL Authentication.

STEP3: Restart the SQL Server Express Service or reboot the machine for registry change to take effect.

Next, you need to add a user with SQLLogin.
To do this: Login to SQLExpress using Express Manager and run the script below:
-
USE MASTER
sp_addLogin 'newuser', 'newuser@.123'
GO
sp_addsrvrolemember 'newuser', 'sysadmin'
GO
-
Once this is done, you can logon with the username/password combination.

Regards,
Vikram

|||Hi Vikram,
thank you for this post - was of great help !

Regards,
Fabian|||Hey this is very cool! But I have a question- in the past it seems these settings follows each individual SQL Server Instance, but now it seems its a global setting as it does not require any instance specific configuration?|||

Help!!!

Please help me sort through this mass of web server information and configuration. I don't know where to begin?

l

|||

Thank you, I am a novice in this area.

Charles

|||

Hi William,

No, configuration is still instance specific. Each instance has a seperate registry hive in the format:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.x
where x is some integer.

The mapping from MSSQL.x to the actual instance name can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names.

Il-Sung.

How can I connect to Microsoft SQL Server 2005 CTP with Microsoft SQL Server 2005 Express Ma

I installed Microsoft SQL Server 2005 Express Manager and connect to SQL 2000 normally
but when I connect to Microsoft SQL Server 2005 CTP, I failed! when I open SQL Configuration Manager,
I find the SQL Server had been running, after I opened "Attribute" window, I find "This account" box had been checked,
and "NT AUTHORITY\NETWORK SERVICE" was displayed in Account Name edit box, "**********" was displayed in "Password" edit box.

I think that the reason I can't connect to Microsoft SQL Server 2005 CTP is that I can't know the name of SQL Server 200, account, password.
right? In Microsoft SQL Server 2000 I can find the name of server from "Service Manager" and default accunt is "SA", the default password is blank.
but I can't find it in Microsoft SQL Server 2005. Any more, when I open "Express Manager", there are two radio button, "Windows Authentication" and "SQL Server Authentication",
which one will I choose? Does "Server Instance" point the name of SQL Server 2000? or Does "Server Instance" point the name of my computer?

Hi,

Try connecting with '.\SqlExpress' as the instance name. If you haven't specified a username and password then, windows authentication is the mode of logging into Sql2005...

cheers,

Paul June A. Domag

|||Hi,

You can also enable SQL Authentication. Follow instructions to enable it:
Enabling SQL Authentication

STEP1:
You need to enable SQL Authentication on the machine. This is complex in SQLExpress and you need to edit the registry. Copy the following lines of text onto a Notepad and save it with extention .REG.
-COPY BELOW
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer]
"LoginMode"=dword:00000002
-COPY TILL THIS
STEP2: Double Click on the .REG file to change the registry. This change the Authentication Mode to enable SQL Authentication.

STEP3: Restart the SQL Server Express Service or reboot the machine for registry change to take effect.

Next, you need to add a user with SQLLogin.
To do this: Login to SQLExpress using Express Manager and run the script below:
-
USE MASTER
sp_addLogin 'newuser', 'newuser@.123'
GO
sp_addsrvrolemember 'newuser', 'sysadmin'
GO
-
Once this is done, you can logon with the username/password combination.

Regards,
Vikram

|||Hi Vikram,
thank you for this post - was of great help !

Regards,
Fabian|||Hey this is very cool! But I have a question- in the past it seems these settings follows each individual SQL Server Instance, but now it seems its a global setting as it does not require any instance specific configuration?|||

Help!!!

Please help me sort through this mass of web server information and configuration. I don't know where to begin?

l

|||

Thank you, I am a novice in this area.

Charles

|||

Hi William,

No, configuration is still instance specific. Each instance has a seperate registry hive in the format:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.x
where x is some integer.

The mapping from MSSQL.x to the actual instance name can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names.

Il-Sung.

Monday, February 27, 2012

Hotfix Installation failed on named Instance on a SQL-Server-2000 Cluster

Hi all,
I have a windows 2003 cluster
with sql-server 2000 sp3
and a named instance.
I wanted to installation the hotfix ..859, but the installation failed
and I got the error:
"The logged on account does not have administrator privileges on all
possible owner nodes of the selected SQL Server configuration.
Please log on using an account that has administrator privileges on all
possible owner nodes and then run Hotfix Installer again."
I've checked different things.
My account has the correct rights, the RPC service is running, DNS
works fine ...
I have no idea what to do!
Can someone help?
Greetings
Susn
Are you running the hotfix from the controlling node? Also, you may have to
reboot each node, before the hotfix will install.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
<liebesusn@.web.de> wrote in message
news:1106919750.693602.235970@.f14g2000cwb.googlegr oups.com...
> Hi all,
> I have a windows 2003 cluster
> with sql-server 2000 sp3
> and a named instance.
> I wanted to installation the hotfix ..859, but the installation failed
> and I got the error:
> "The logged on account does not have administrator privileges on all
> possible owner nodes of the selected SQL Server configuration.
> Please log on using an account that has administrator privileges on all
> possible owner nodes and then run Hotfix Installer again."
> I've checked different things.
> My account has the correct rights, the RPC service is running, DNS
> works fine ...
> I have no idea what to do!
> Can someone help?
> Greetings
> Susn
>
|||Hi Rod,
yes, the hotfix was running from the controlling node and both nodes
was rebooted.
Any other idea?
Greetings Susn
|||No, that about does it for me, sorry!
Rod
"Susn" <liebesusn@.web.de> wrote in message
news:1107160932.634056.6880@.c13g2000cwb.googlegrou ps.com...
> Hi Rod,
> yes, the hotfix was running from the controlling node and both nodes
> was rebooted.
> Any other idea?
> Greetings Susn
>
|||Hi Susn,
Just wondering if you were able to install the hotfix. I would recommend you to log into both the nodes of the cluster with the startup account of the clustered SQL Server service (this account is a doman account and
should have all the required rights). Then start the hotfix installation on the node where SQL Server instance is currently running.
Keep up updated. If it fails, then please post the log for the hotfix failure.
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx