Thursday, March 22, 2012
Couldn't start sqlagent service
service window, it return a message: couldn't start
sqlagent$instance on local computer, the service didn't
return a error, this could by a internal windows error or
internal service error. The sqlagent use domain admin
account, and when I use my local EM, I can open the node,
database. But when I use terminal service to login in to
that server, then I can't use the server's EM to connect
that instance. The message said: a connection can't be
established. Reason: SQL server doesn't exist or access
denied. Can anyone give me a hint? Thanks in advance.
HarryWe had similar problem when the registry of a machine was messed up with a
restore of a drive image. Your problem sounds also like a registry or
Advanced Directory problem. Check with your sysadmin.
Quentin
"Harry Guo" <anonymous@.discussions.microsoft.com> wrote in message
news:2d79c01c46a75$98d28d70$a401280a@.phx
.gbl...
> I found the sqlagent stopped, I try to start it from
> service window, it return a message: couldn't start
> sqlagent$instance on local computer, the service didn't
> return a error, this could by a internal windows error or
> internal service error. The sqlagent use domain admin
> account, and when I use my local EM, I can open the node,
> database. But when I use terminal service to login in to
> that server, then I can't use the server's EM to connect
> that instance. The message said: a connection can't be
> established. Reason: SQL server doesn't exist or access
> denied. Can anyone give me a hint? Thanks in advance.
> Harrysql
Couldn't start sqlagent service
service window, it return a message: couldn't start
sqlagent$instance on local computer, the service didn't
return a error, this could by a internal windows error or
internal service error. The sqlagent use domain admin
account, and when I use my local EM, I can open the node,
database. But when I use terminal service to login in to
that server, then I can't use the server's EM to connect
that instance. The message said: a connection can't be
established. Reason: SQL server doesn't exist or access
denied. Can anyone give me a hint? Thanks in advance.
HarryWe had similar problem when the registry of a machine was messed up with a
restore of a drive image. Your problem sounds also like a registry or
Advanced Directory problem. Check with your sysadmin.
Quentin
"Harry Guo" <anonymous@.discussions.microsoft.com> wrote in message
news:2d79c01c46a75$98d28d70$a401280a@.phx.gbl...
> I found the sqlagent stopped, I try to start it from
> service window, it return a message: couldn't start
> sqlagent$instance on local computer, the service didn't
> return a error, this could by a internal windows error or
> internal service error. The sqlagent use domain admin
> account, and when I use my local EM, I can open the node,
> database. But when I use terminal service to login in to
> that server, then I can't use the server's EM to connect
> that instance. The message said: a connection can't be
> established. Reason: SQL server doesn't exist or access
> denied. Can anyone give me a hint? Thanks in advance.
> Harry
Couldn't start sqlagent service
service window, it return a message: couldn't start
sqlagent$instance on local computer, the service didn't
return a error, this could by a internal windows error or
internal service error. The sqlagent use domain admin
account, and when I use my local EM, I can open the node,
database. But when I use terminal service to login in to
that server, then I can't use the server's EM to connect
that instance. The message said: a connection can't be
established. Reason: SQL server doesn't exist or access
denied. Can anyone give me a hint? Thanks in advance.
Harry
We had similar problem when the registry of a machine was messed up with a
restore of a drive image. Your problem sounds also like a registry or
Advanced Directory problem. Check with your sysadmin.
Quentin
"Harry Guo" <anonymous@.discussions.microsoft.com> wrote in message
news:2d79c01c46a75$98d28d70$a401280a@.phx.gbl...
> I found the sqlagent stopped, I try to start it from
> service window, it return a message: couldn't start
> sqlagent$instance on local computer, the service didn't
> return a error, this could by a internal windows error or
> internal service error. The sqlagent use domain admin
> account, and when I use my local EM, I can open the node,
> database. But when I use terminal service to login in to
> that server, then I can't use the server's EM to connect
> that instance. The message said: a connection can't be
> established. Reason: SQL server doesn't exist or access
> denied. Can anyone give me a hint? Thanks in advance.
> Harry
couldn't see some of the database in the object explorer window of Management Studio
hey guys,
I have one question. But it is not related with the Reporting Service. I got my computer set up with SQL Server 2005 version yesterday. When I connect to the database engine, I can see only system databases(master,model,msdb and tempdb) under the system database folder. I couldn't see other databases(like pubs,northwind) in the object explorer window of Management Studio. Do you have any idea how to solve this difficulty?
Thanks.
Amde
Hi,
no problem there. These databases aren′t installed by default. There are scripts to build up the database from scratch:
http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en
Or you use the Adventureworks sample database:
http://www.microsoft.com/downloads/details.aspx?FamilyID=e719ecf7-9f46-4312-af89-6ad8702e4e6e&DisplayLang=en
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||Thanks a lot. I will work on that.
Amde
Couldn't see some databases in the object explorer window of Mangement Studio
hey guys,
I have one question. But it is not related with the Reporting Service. I got my computer set up with SQL Server 2005 version yesterday. When I connect to the database engine, I can see only system databases(master,model,msdb and tempdb) under the system database folder. I couldn't see other databases(like pubs,northwind) in the object explorer window of Management Studio. Do you have any idea how to solve this difficulty?
Thanks.
Amde
Pubs and northwind are no longer installed by default.|||How about the other databases like Adventurework db? If you have some idea how to configure the database engine, please let me know.
I appreciate your response.
Amde
|||Adventureworks is not installed by default either. Your questions are more appropriately suited for the "SQL Server Tools General" forum. http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1.
An easy test is to simply create a new database, refresh the object explorer, and you should see it there.
I am not certain what the best way to install the sample databases is post-installation. You should ask that question either in the tools forum or the setup forum (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=95&SiteID=1).
|||Thank you for your advise. I will post this question on the appropriate form discussion board.
|||Hi, Amde --
This content will be available in the next version of BOL --
Before you can use SQL Server 2005 samples, you must install them. Installing the samples is a two-step process. Samples are not installed by default and SQL Server Setup does not run the sample installation program for you. First, when running setup, on the Features Component page, select Samples. This will copy the samples installation program to your computer during setup. Second, to run the samples installation program, point to the Start menu, point to All Programs, point to Microsoft SQL Server 2005, point to Documentation and Samples, point to Samples, and click Microsoft SQL Server 2005 Samples. To get the most recent samples, uninstall your current samples, and download and install the latest SQL Server 2005 samples from the Microsoft download Web site. To uninstall the current version of samples, point to the Start menu, point to Control Panel, and click Add or Remove Programs. Click Microsoft SQL Server 2005 Samples, and then click Remove. To find the most current samples, search http://www.microsoft.com/downloads/ for “SQL Server 2005 Samples and Sample Databases”. Choose the edition that matches your Reporting Services installation.
-- Mary
Couldn't see some databases in the object explorer window of Mangement Studio
hey guys,
I have one question. But it is not related with the Reporting Service. I got my computer set up with SQL Server 2005 version yesterday. When I connect to the database engine, I can see only system databases(master,model,msdb and tempdb) under the system database folder. I couldn't see other databases(like pubs,northwind) in the object explorer window of Management Studio. Do you have any idea how to solve this difficulty?
Thanks.
Amde
Pubs and northwind are no longer installed by default.|||How about the other databases like Adventurework db? If you have some idea how to configure the database engine, please let me know.
I appreciate your response.
Amde
|||Adventureworks is not installed by default either. Your questions are more appropriately suited for the "SQL Server Tools General" forum. http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1.
An easy test is to simply create a new database, refresh the object explorer, and you should see it there.
I am not certain what the best way to install the sample databases is post-installation. You should ask that question either in the tools forum or the setup forum (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=95&SiteID=1).
|||Thank you for your advise. I will post this question on the appropriate form discussion board.
|||Hi, Amde --
This content will be available in the next version of BOL --
Before you can use SQL Server 2005 samples, you must install them. Installing the samples is a two-step process. Samples are not installed by default and SQL Server Setup does not run the sample installation program for you. First, when running setup, on the Features Component page, select Samples. This will copy the samples installation program to your computer during setup. Second, to run the samples installation program, point to the Start menu, point to All Programs, point to Microsoft SQL Server 2005, point to Documentation and Samples, point to Samples, and click Microsoft SQL Server 2005 Samples. To get the most recent samples, uninstall your current samples, and download and install the latest SQL Server 2005 samples from the Microsoft download Web site. To uninstall the current version of samples, point to the Start menu, point to Control Panel, and click Add or Remove Programs. Click Microsoft SQL Server 2005 Samples, and then click Remove. To find the most current samples, search http://www.microsoft.com/downloads/ for “SQL Server 2005 Samples and Sample Databases”. Choose the edition that matches your Reporting Services installation.
-- Mary
sqlMonday, March 19, 2012
could not open sql connection
Hi,
I hope this is right place to ask for help.If it is not, Please show me where and if it is please Help me
I using Window Vista bussiness, Microsoft visual 2005 professional edition, Microsoft SQL server express edtion
I have created table on Database.
My sql server name is KYAW-HQ
**but in the bar it shown like as KYAW-HQ\SQLEXPRESS
My data base name is kyaw
I have already Enabled Name Pipes and TCP/IP setting in sql studio management tool express
I using window authentication to log in to sql server management studio express.
My coding for c# is as follow:
private void button4_Click(object sender, EventArgs e)
{
//connect sql connection
SqlConnection con = new SqlConnection("Server=KYAW-HQ;Database=kyaw;UID=;PWD=;");
//open sql conection
con.Open();
SqlDataAdapter ad = new SqlDataAdapter("Select * From kyaw", con);
DataSet ds = new DataSet();
ad.Fill(ds, "kyaw");
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}
After I click the button the error has shown like below
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).
Please tell me what i have to do.
If someone read me, please tell me and advice me how to fix above problem.
Thanks
Try the servername as "KYAW-HQ\SQLEXPRESS" in the code. And check whether the SQLExpress services are running|||SQL Service is running.But I cant connect to sql server.
I inerted the code like below
SqlConnection con = new SqlConnection("Server='KYAW-HQ\SQLEXPRESS';Database=kyaw;UID=;PWD=;");
But it has error
Unrecongnised escape sequence...
I tried like this as well
SqlConnection con = new SqlConnection("Server="KYAW-HQ\SQLEXPRESS";Database=kyaw;UID=;PWD=;");
please help me. I getting head-ache now.
|||
hi,
try removing the quotes..
Server =KYAW-HQ\SQLExpress;
BTW:
UID=;PWD=; ?
you will not be able to connect that way as you do not provide credentials for the login to be authenticated..
you can choose between integrated security (where you provide information your login should be validated as an OS login or domain login, and it's SID gets checked against "granted Windows Logins") or standard SQL Server authenticated connections (where you provide your "own" UID and PWD [but you have to provide them])..
please have a look as well at connections string samples..
regards
|||hi,
I removed the quotes and place
Server=KYAW-HQ\\SQLEXPRESS;Database=kyaw;UID=;PWD=;
the error come up it was different from previous
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
if you have any idea and advice please advice me
Thanks
|||hi,
supermanNUM1 wrote:
hi,
I removed the quotes and place
Server=KYAW-HQ\\SQLEXPRESS;Database=kyaw;UID=;PWD=;
the error come up it was different from previous
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
if you have any idea and advice please advice me
Thanks
you did not provide a valid SQL Server Login (and relative password) to connect to the SQLExpress instance.. more, SQLExpress installs by default enabling only trusted connections.. you can modify that behavior at install time, providing the SECURITYMODE=SQL parameter to the SQLExpress installer or, using the full "wizard ui", unchecking the "Hide advanced configuration options" and specify the desired mixed authentication mode in the following wizard's steps...
you can modify that behavior even later, at "run time", using SQL Server Management Studio Express, accessing the server's propery and, in the "security tab", specify "mixed authentication" (you are required to restart the SQL Server service)..
regards
|||Hi,Are you connecting using SQL server ID(eg. sa). IF yes pls check the authentication mode, if its in windows authentication then change it to mixed mode and restart Sql services.
For changing authentication mode, pls proceed as Andrea suggested
you can modify that behavior even later, at "run time", using SQL Server Management Studio Express, accessing the server's propery and, in the "security tab", specify "mixed authentication" (you are required to restart the SQL Server service)..
Then try connect using your code.
|||
I sorted it out
the code is
SqlConnection con = new SqlConnection("Server='KYAW-HQ\\SQLExpress';Database=kyaw;Trusted_Connection=true;");
Just used the Trusted_Connection=True
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2176838&SiteID=1
Thanks you for help
could not open sql connection
Hi,
I hope this is right place to ask for help.If it is not, Please show me where and if it is please Help me
I using Window Vista bussiness, Microsoft visual 2005 professional edition, Microsoft SQL server express edtion
I have created table on Database.
My sql server name is KYAW-HQ
**but in the bar it shown like as KYAW-HQ\SQLEXPRESS
My data base name is kyaw
I have already Enabled Name Pipes and TCP/IP setting in sql studio management tool express
I using window authentication to log in to sql server management studio express.
My coding for c# is as follow:
private void button4_Click(object sender, EventArgs e)
{
//connect sql connection
SqlConnection con = new SqlConnection("Server=KYAW-HQ;Database=kyaw;UID=;PWD=;");
//open sql conection
con.Open();
SqlDataAdapter ad = new SqlDataAdapter("Select * From kyaw", con);
DataSet ds = new DataSet();
ad.Fill(ds, "kyaw");
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}
After I click the button the error has shown like below
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).
Please tell me what i have to do.
If someone read me, please tell me and advice me how to fix above problem.
Thanks
Try the servername as "KYAW-HQ\SQLEXPRESS" in the code. And check whether the SQLExpress services are running|||SQL Service is running.But I cant connect to sql server.
I inerted the code like below
SqlConnection con = new SqlConnection("Server='KYAW-HQ\SQLEXPRESS';Database=kyaw;UID=;PWD=;");
But it has error
Unrecongnised escape sequence...
I tried like this as well
SqlConnection con = new SqlConnection("Server="KYAW-HQ\SQLEXPRESS";Database=kyaw;UID=;PWD=;");
please help me. I getting head-ache now.
|||
hi,
try removing the quotes..
Server =KYAW-HQ\SQLExpress;
BTW:
UID=;PWD=; ?
you will not be able to connect that way as you do not provide credentials for the login to be authenticated..
you can choose between integrated security (where you provide information your login should be validated as an OS login or domain login, and it's SID gets checked against "granted Windows Logins") or standard SQL Server authenticated connections (where you provide your "own" UID and PWD [but you have to provide them])..
please have a look as well at connections string samples..
regards
|||hi,
I removed the quotes and place
Server=KYAW-HQ\\SQLEXPRESS;Database=kyaw;UID=;PWD=;
the error come up it was different from previous
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
if you have any idea and advice please advice me
Thanks
|||hi,
supermanNUM1 wrote:
hi,
I removed the quotes and place
Server=KYAW-HQ\\SQLEXPRESS;Database=kyaw;UID=;PWD=;
the error come up it was different from previous
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
if you have any idea and advice please advice me
Thanks
you did not provide a valid SQL Server Login (and relative password) to connect to the SQLExpress instance.. more, SQLExpress installs by default enabling only trusted connections.. you can modify that behavior at install time, providing the SECURITYMODE=SQL parameter to the SQLExpress installer or, using the full "wizard ui", unchecking the "Hide advanced configuration options" and specify the desired mixed authentication mode in the following wizard's steps...
you can modify that behavior even later, at "run time", using SQL Server Management Studio Express, accessing the server's propery and, in the "security tab", specify "mixed authentication" (you are required to restart the SQL Server service)..
regards
|||Hi,Are you connecting using SQL server ID(eg. sa). IF yes pls check the authentication mode, if its in windows authentication then change it to mixed mode and restart Sql services.
For changing authentication mode, pls proceed as Andrea suggested
you can modify that behavior even later, at "run time", using SQL Server Management Studio Express, accessing the server's propery and, in the "security tab", specify "mixed authentication" (you are required to restart the SQL Server service)..
Then try connect using your code.
|||
I sorted it out
the code is
SqlConnection con = new SqlConnection("Server='KYAW-HQ\\SQLExpress';Database=kyaw;Trusted_Connection=true;");
Just used the Trusted_Connection=True
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2176838&SiteID=1
Thanks you for help