Tuesday, March 27, 2012
can't get in anymore
scripts. Worked fine for a few days.
Yesterday, I attached a database that had been created on another machine,
with SQL 2000. Seemed to work fine. I closed SQL Server to work on something
else, then opened it back up. It won't let me in now. It says that it
doesn't allow remote connections, even though I am doing it from the same
machine that it resides on.
Text of the message is below the line at the bottom of this.
I tried changing the way I log in, including Windows Authentication, SQL
Server authentication, using my network name, and then using the user name I
created just for this thing when I installed SQL Server. I alwasy get the
same message. I also tried connecting remotely from another machine.
I was able to use this same machine to connect to another SQL Server
instance on the network, so it's apparent that the installation of SQL
Server isn't messed up.
I know that I will probably get asked about an admin username and password,
but I don't know what mine is. I tried sa with no password, but it didn't
work.
This is really causing some problems and I have something due at noon today.
Any help appreciated.
If I uninstalled SQL Server and re-install, will that let me in then?
-----
TITLE: Connect to Server
--
Cannot connect to SERV423.
--
ADDITIONAL INFORMATION:
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) (Microsoft SQL Server, Error: 2)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
--
BUTTONS:
OK
--did you enable TCP/IP and gave a proper IP Address in network
configuration under configuration manager?|||I don't recall that being part of the installation. Is it something I can
change now?
"Shadow" <dinu_babu@.yahoo.com> wrote in message
news:1138289713.792093.149830@.z14g2000cwz.googlegroups.com...
> did you enable TCP/IP and gave a proper IP Address in network
> configuration under configuration manager?
>|||I had never seen Config mgr before you mentioned it. Opening it up showed me
that the services weren't running. I started them and it works now.
thanks
"Shadow" <dinu_babu@.yahoo.com> wrote in message
news:1138289713.792093.149830@.z14g2000cwz.googlegroups.com...
> did you enable TCP/IP and gave a proper IP Address in network
> configuration under configuration manager?
>
Monday, March 19, 2012
cant download/install adventureworks.sln
adventureworks and adventureworksdw databases installed. I am missing the
adventureworks.sln (adventure works project files). I tried to install
adventureworksBI.msi but I got an error that the adventureworks database is
already installed. I tried renaming the adventureworks database on the
server to something else and tried the install again but I got an error
message that it was too old of a version. I am not sure if there is a script
I need to run that will instal the project files, Any ideas? thanks.
Paul G
Software engineer.
I guess it's about Sql Server Samples. Did you download the latest version
from the following link:
http://www.codeplex.com/SqlServerSamples/Release/ProjectReleases.aspx?ReleaseId=4000
After installing it, you'll find the AdventureWorks(VB\CS).sln VS solution
file in the following path:
C:\Program Files\Microsoft SQL
Server\90\Samples\Engine\Programmability\CLR\Adven tureWorks
If this is what you are looking for...
Ekrem ?nsoy
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:31D4B610-532F-4916-9C11-325FC5147444@.microsoft.com...
> HI I have installed the adventure works db scripts and have both the
> adventureworks and adventureworksdw databases installed. I am missing the
> adventureworks.sln (adventure works project files). I tried to install
> adventureworksBI.msi but I got an error that the adventureworks database
> is
> already installed. I tried renaming the adventureworks database on the
> server to something else and tried the install again but I got an error
> message that it was too old of a version. I am not sure if there is a
> script
> I need to run that will instal the project files, Any ideas? thanks.
> --
> Paul G
> Software engineer.
|||Thanks for the response, yes I am looking for the solution, I have the
following but there is no sample folder C:\Program Files\Microsoft SQL
Server\90. I downloaded the adventureworksvbscripts and installed both the
adventureworks and adventureworksDW databases. I will try the link provided.
Paul G
Software engineer.
"Ekrem ?nsoy" wrote:
> I guess it's about Sql Server Samples. Did you download the latest version
> from the following link:
> http://www.codeplex.com/SqlServerSamples/Release/ProjectReleases.aspx?ReleaseId=4000
> After installing it, you'll find the AdventureWorks(VB\CS).sln VS solution
> file in the following path:
> C:\Program Files\Microsoft SQL
> Server\90\Samples\Engine\Programmability\CLR\Adven tureWorks
> If this is what you are looking for...
> --
> Ekrem ?nsoy
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:31D4B610-532F-4916-9C11-325FC5147444@.microsoft.com...
>
cant download/install adventureworks.sln
adventureworks and adventureworksdw databases installed. I am missing the
adventureworks.sln (adventure works project files). I tried to install
adventureworksBI.msi but I got an error that the adventureworks database is
already installed. I tried renaming the adventureworks database on the
server to something else and tried the install again but I got an error
message that it was too old of a version. I am not sure if there is a script
I need to run that will instal the project files, Any ideas? thanks.
--
Paul G
Software engineer.I guess it's about Sql Server Samples. Did you download the latest version
from the following link:
http://www.codeplex.com/SqlServerSa...Id=40
00
After installing it, you'll find the AdventureWorks(VB\CS).sln VS solution
file in the following path:
C:\Program Files\Microsoft SQL
Server\90\Samples\Engine\Programmability
\CLR\AdventureWorks
If this is what you are looking for...
Ekrem ?nsoy
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:31D4B610-532F-4916-9C11-325FC5147444@.microsoft.com...
> HI I have installed the adventure works db scripts and have both the
> adventureworks and adventureworksdw databases installed. I am missing the
> adventureworks.sln (adventure works project files). I tried to install
> adventureworksBI.msi but I got an error that the adventureworks database
> is
> already installed. I tried renaming the adventureworks database on the
> server to something else and tried the install again but I got an error
> message that it was too old of a version. I am not sure if there is a
> script
> I need to run that will instal the project files, Any ideas? thanks.
> --
> Paul G
> Software engineer.|||Thanks for the response, yes I am looking for the solution, I have the
following but there is no sample folder C:\Program Files\Microsoft SQL
Server\90. I downloaded the adventureworksvbscripts and installed both the
adventureworks and adventureworksDW databases. I will try the link provided
.
Paul G
Software engineer.
"Ekrem ?nsoy" wrote:
> I guess it's about Sql Server Samples. Did you download the latest version
> from the following link:
> http://www.codeplex.com/SqlServerSa...Id=
4000
> After installing it, you'll find the AdventureWorks(VB\CS).sln VS solution
> file in the following path:
> C:\Program Files\Microsoft SQL
> Server\90\Samples\Engine\Programmability
\CLR\AdventureWorks
> If this is what you are looking for...
> --
> Ekrem ?nsoy
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:31D4B610-532F-4916-9C11-325FC5147444@.microsoft.com...
>
cant download/install adventureworks.sln
adventureworks and adventureworksdw databases installed. I am missing the
adventureworks.sln (adventure works project files). I tried to install
adventureworksBI.msi but I got an error that the adventureworks database is
already installed. I tried renaming the adventureworks database on the
server to something else and tried the install again but I got an error
message that it was too old of a version. I am not sure if there is a script
I need to run that will instal the project files, Any ideas? thanks.
--
Paul G
Software engineer.I guess it's about Sql Server Samples. Did you download the latest version
from the following link:
http://www.codeplex.com/SqlServerSamples/Release/ProjectReleases.aspx?ReleaseId=4000
After installing it, you'll find the AdventureWorks(VB\CS).sln VS solution
file in the following path:
C:\Program Files\Microsoft SQL
Server\90\Samples\Engine\Programmability\CLR\AdventureWorks
If this is what you are looking for...
--
Ekrem Ã?nsoy
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:31D4B610-532F-4916-9C11-325FC5147444@.microsoft.com...
> HI I have installed the adventure works db scripts and have both the
> adventureworks and adventureworksdw databases installed. I am missing the
> adventureworks.sln (adventure works project files). I tried to install
> adventureworksBI.msi but I got an error that the adventureworks database
> is
> already installed. I tried renaming the adventureworks database on the
> server to something else and tried the install again but I got an error
> message that it was too old of a version. I am not sure if there is a
> script
> I need to run that will instal the project files, Any ideas? thanks.
> --
> Paul G
> Software engineer.|||Thanks for the response, yes I am looking for the solution, I have the
following but there is no sample folder C:\Program Files\Microsoft SQL
Server\90. I downloaded the adventureworksvbscripts and installed both the
adventureworks and adventureworksDW databases. I will try the link provided.
--
Paul G
Software engineer.
"Ekrem Ã?nsoy" wrote:
> I guess it's about Sql Server Samples. Did you download the latest version
> from the following link:
> http://www.codeplex.com/SqlServerSamples/Release/ProjectReleases.aspx?ReleaseId=4000
> After installing it, you'll find the AdventureWorks(VB\CS).sln VS solution
> file in the following path:
> C:\Program Files\Microsoft SQL
> Server\90\Samples\Engine\Programmability\CLR\AdventureWorks
> If this is what you are looking for...
> --
> Ekrem Ã?nsoy
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:31D4B610-532F-4916-9C11-325FC5147444@.microsoft.com...
> > HI I have installed the adventure works db scripts and have both the
> > adventureworks and adventureworksdw databases installed. I am missing the
> > adventureworks.sln (adventure works project files). I tried to install
> > adventureworksBI.msi but I got an error that the adventureworks database
> > is
> > already installed. I tried renaming the adventureworks database on the
> > server to something else and tried the install again but I got an error
> > message that it was too old of a version. I am not sure if there is a
> > script
> > I need to run that will instal the project files, Any ideas? thanks.
> > --
> > Paul G
> > Software engineer.
>
Thursday, March 8, 2012
cant create VIEW. HELP!
SQL> CREATE VIEW
2 "MY_ADDSTUDENTTARGET" ("DEMOGRAPHICID","ETHNICITYID","REFERRERID","DEMOGRAPHICSTUDENTID","ACADE
MICYEARID","DOB","EMAIL","FNAME","HOMEADDRESS1","HOMEADDRESS2","HOMECITY","HOMECOUNTRY","HOMEPOST","
HOMESTATE","LNAME","MAILINGADDRESS1","MAILINGADDRESS2","MAILINGCITY","MAILINGCOUNTRY","MAILINGPOST",
"MAILINGSTATE","MNAME","PHONE1","SEX","SSN","STUDENTSTATUS","STUDENTTYPE","SUPPCOLLEGEID","CURRENTOU
","MAJORID","OUSTUDENTTYPE","VA","SUPPHSID","HOMEHS","HSADDR1","HSADDR2","HSCITY","HSSTATE","HSPOST"
,"HSPHONE","LOGINID","STUDENTACCOUNTID", "ACCOUNTID", "ACCOUNTSTUDENTID")
3 AS
4 SELECT DEMOGRAPHIC.DEMOGRAPHICID, DEMOGRAPHIC.ETHNICITYID, DEMOGRAPHIC.REFERRERID, DEMOGRAPHIC.
STUDENTID, STUDENT.ACADEMICYEARID, STUDENT.DOB, STUDENT.EMAIL, STUDENT.FNAME, STUDENT.HOMEADDRESS1,S
TUDENT.HOMEADDRESS2, STUDENT.HOMECITY, STUDENT.HOMECOUNTRY, STUDENT.HOMEPOST, STUDENT.HOMESTATE, STU
DENT.LNAME, STUDENT.MAILINGADDRESS1, STUDENT.MAILINGADDRESS2, STUDENT.MAILINGCITY, STUDENT.MAILINGCO
UNTRY, STUDENT.MAILINGPOST, STUDENT.MAILINGSTATE, STUDENT.MNAME, STUDENT.PHONE1, STUDENT.SEX, STUDEN
T.SSN, STUDENT.STUDENTSTATUS, STUDENT.STUDENTTYPE, SUPPCOLLEGE.SUPPCOLLEGEID, SUPPCOLLEGE.CURRENTOU,
SUPPCOLLEGE.MAJORID, SUPPCOLLEGE.OUSTUDENTTYPE, SUPPCOLLEGE.VA, SUPPHS.SUPPHSID, SUPPHS.HOMEHS, SUP
PHS.HSADDR1, SUPPHS.HSADDR2, SUPPHS.HSCITY, SUPPHS.HSSTATE, SUPPHS.HSPOST, SUPPHS.HSPHONE, STUDENT.L
OGINID, STUDENTACCOUNT.STUDENTACCOUNTID, STUDENTACCOUNT.ACCOUNTID, STUDENTACCOUNT.STUDENTID
5 FROM DEMOGRAPHIC, STUDENT, SUPPCOLLEGE, SUPPHS, STUDENTACCOUNT;
i get the followimg error: "MY_ADDSTUDENTTARGET" ("DEMOGRAPHICID","ETHNICITYID","REFERRERID","DEMOGRAPHICSTUDENTID","ACADEMICYE
ERROR at line 2:
ORA-00972: identifier is too long
if i do it without the quotes around the VIEW name and column names, i get this error: MICYEARID,DOB,EMAIL,FNAME,HOMEADDRESS1,HOMEADDRESS 2,HOMECITY,HOMECOUNTRY,HOMEPOST,
*
ERROR at line 3:
ORA-00907: missing right parenthesis
help, i don't know what to do.
thanks.
system: WinXP, Oracle8iEach column name has a limit of 30 characters from SQL / PLSQL.
"SESTUDENTACCOUNT.STUDENTACCOUNTID"|||well, i got rid of that really long column name (31 chars), but i am still getting the same error. any ideas?|||never mind, i figured it out. apparently, there is a command line string limit in pl/sql. you learn something new every day i guess.
Friday, February 24, 2012
Can't connect using SqlClient after creating new database.
Hi,
I am writing a c# console application that allows you to update a database to a specified version. It does this by running a set of scripts that are listed in an xml manifest.
The application also provides an option to create the database and then run scripts to update it.
I have a method that reads blocks of SQL from each script and runs them using the ADO.NET classes in the SqlClient namespace.
I am finding that after the application runs the script to create the database, the first time the application tries to connect to that new database the connection attempt fails. The error I receive is :-
Cannot open database {dbname} requested by the login. The login failed.
Login failed for user {user}
I find that if I set the thread to sleep for 3 seconds after the database is created, I can then connect without the error occurring, but this is a bit of a nasty hack. I'd prefer to find a better solution.
This is occurring against a local SQL Server Express instance.
My machine is reasonable. 3.4 Ghz. 2Gb RAM, so I wouldn't have thought there's any problems in that regard.
Does anyone have any pointers, firstly as to why this is occurring, and secondly, how I might solve this problem in a nicer way?
Thanks,
David.
Hi David,
This is strange behaviour. Are you using Windows auth or SQL auth? Also, are there any errors written to your error log?
Thanks,
Il-Sung.
Hi ll-Sung,
Sorry it has taken so long for me to get back to you about this.
My SQL Express is set up for Windows Auth only, and I am connecting as such.
The exception I receive when I try to connect after creating the database is :-
Cannot open database "DatabaseName" requested by the login. The login failed.
Login failed for user 'Domain\UserName'.
Both the SQL Log and the Windows Event Log display a series of informational messages that occur during the creation of the database. Things like :-
Setting database option ANSI_PADDING to OFF for database DatabaseName
Also in the logs, I receive a Failure Audit error message. This occurs before any of the informational messages occur. It looks like :-
Login failed for user 'Domain\UserName'. [CLIENT: <local machine>]
However this login failure message appears whether or not the database creation succeeds or not (ie the process succeeds when I have my Sleep command in).
So overall, I guess there is no error in any of the logs indicating why this is occurring.
The SQL I am using to create the database is a script that I made simply by scripting off the db in Management Studio. I did not muck around with this at all except to put placeholders in for the database name.
Any further help you can provide for this would be much appreciated.
Thanks,
David.