Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Wednesday, March 21, 2012

MS SQL Server 2005

Im trying to get started on MS SQL Server 2005 Express Edition (http://www.microsoft.com/sql/editions/express/default.mspx) - is there any interface where I can create databases, tables etc ? Im used to MySQL and phpMyAdmin.

I cant get to decide between Windows authentication and SQL Server authentication when logging in - is there no root kinda login ?

ThanksDownload Management Studio Express:
http://msdn.microsoft.com/vstudio/express/sql/download/

Use Windows Authentication unless you have a reason to use mixed (SQL Server + Windows). Admins on the local computer will be members of the sysadmin role - can perform any operation (e.g. root access).
There is also a sa SQL Server logon that is a member of the sysadmin role - this is created regardless of the authentication type, but you can only use it if mixed mode authentication is enabled.

Windows - You are authenticated automatically based on your Windows/Domain user account.
SQL Server - You have to supply a username and password.|||Sorry, forgot to mention - it's possible to change the authentication mode after you have installed SQL Server. If you use mixed, be sure to use a strong password for the sa account - if you are developing applications, don't use the sa account in you application. Create another account with just enough permissions to perform its functions.|||Oh..it seems a new version of SQL Exp 2005 is out - with SP1 and with advanced services.

Im going to uninstall the current MS SQL Server 2005 Exp and install the one with advanced services.

Will SQL Server Management Studio Express work with the Advanced Services version ?|||I've not tried the advanced services version, but the management studio express is almost certain to work with it. Also, I suspect the install might include managment studio express rather than a seperate install - just a speculation...

Monday, March 19, 2012

MS SQL query, whats the default order the rows returned are sorted by?

i have a table and a column called req_id, i have it set as the primary key.. so if i just do SELECT * FROM table, shouldnt the rows returned be sorted by the order that the rows were inserted?

this database was improted from an access database.. when i did that in access it would return the rows in sorted order by the order the row was inserted.. but now in MS SQL, its not sorted in that order.. i can't really tell what type of order it's inIf you want an order, specify the order with the ORDER BY clause. If you are willing to take whatever order the optimizer decides on, omit the ORDER BY clause.

-PatP|||hmm this is weird.. in the access database if i select it, they're returned in the order the rows were inserted.. but after importing that database into ms sql, and selecting that table, the order isn't the same row i got when i ran the query in the access db|||Jet, the default database engine used by MS-Access is rather "simple-minded" when it comes to query optimization. MS-SQL has a much more powerful optimizer, which is a two-edged sword... The MS-SQL optimizer is able to easily process queries that Jet would never complete, but it does that processing in a very different way. As an interesting side effect, it also means that unless you specify an order in your query, there is no guarantee that running the exact same query on the same box will ever return the rows in the same order, even though it often will return them in a consistant order.

-PatP|||Ahhh ok i see what you're saying.

In my query, i had a left join statement in there.. i took that out and used a subquery instead of the join and it returns the rows fine now in the order they were inserted. Looks like the join caused the problem.|||No, the JOIN did not cause the problem. The absence of an ORDER BY statement caused the problem.|||The problem is actually a lot simpler than "the join caused the problem". If you want an order, specify it with the ORDER BY clause. If you don't care about an order and are willing to accept the order determined by the optimizer at the moment, omit the ORDER BY clause.

-PatP

Monday, February 20, 2012

MS SBS 2003 and RS

Hi,
I have installed SBS 2003 premium andSQL Server 2000 on my server with
default settings and patched it using Windows Update site. Also, installed
SQL Server reporting services. During setup, it warned me the Sharepoint is
installed (I don't know how Sharepoint got installed) and at the end, it
failed to initialize reporting services. Now, when I enter
"localhost/reports" in address line of IE, I get this error message:
The underlying connection was closed: Unable to connect to the remote
server.
I checked SRM*.log error log and found an error message:
<Func Name='Do_Activate_ReportService'>
<Func Name='CreateProccessAndWait'>
Error reported by child process:
Failure starting the web service:
The Report Server Web service has not generated a public key. The service
may not have started successfully. Check the log files for more
information.
<EndFunc Name='CreateProccessAndWait' Return='1603' GetLastError='0'>
Error 1603 Launching RSActivate.exe:
C:\DOCUME~1\alim\LOCALS~1\Temp\RSActivate.exe
"C:\DOCUME~1\alim\LOCALS~1\Temp\RSActivate.exe" /c "C:\Program
Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\RSReportServer.config"
Do_Activate_ReportService: Activation Failed!
<EndFunc Name='Do_Activate_ReportService' Return='0' GetLastError='0'>
<EndFunc Name='RedirectorCAX' Return='0' GetLastError='0'>
---
When I execute RSActivate on command line, I get the same error (The Report
Server Web service has not generated a public key).
I played with settings of reporting services installation (service account
and SQL Server user) in hope to get it installed successfully but it always
fails.
Do you have any idea about my problem?Alex
I had a similar issue: I had use a domain user account; the service now
starts.
Kic
"Alex" <alim@.rogers.com> wrote in message
news:#mjXxZy$EHA.2032@.tk2msftngp13.phx.gbl...
> Hi,
> I have installed SBS 2003 premium andSQL Server 2000 on my server with
> default settings and patched it using Windows Update site. Also, installed
> SQL Server reporting services. During setup, it warned me the Sharepoint
is
> installed (I don't know how Sharepoint got installed) and at the end, it
> failed to initialize reporting services. Now, when I enter
> "localhost/reports" in address line of IE, I get this error message:
> The underlying connection was closed: Unable to connect to the remote
> server.
> I checked SRM*.log error log and found an error message:
> <Func Name='Do_Activate_ReportService'>
> <Func Name='CreateProccessAndWait'>
> Error reported by child process:
> Failure starting the web service:
> The Report Server Web service has not generated a public key. The service
> may not have started successfully. Check the log files for more
> information.
> <EndFunc Name='CreateProccessAndWait' Return='1603' GetLastError='0'>
> Error 1603 Launching RSActivate.exe:
> C:\DOCUME~1\alim\LOCALS~1\Temp\RSActivate.exe
> "C:\DOCUME~1\alim\LOCALS~1\Temp\RSActivate.exe" /c "C:\Program
> Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\RSReportServer.config"
> Do_Activate_ReportService: Activation Failed!
> <EndFunc Name='Do_Activate_ReportService' Return='0' GetLastError='0'>
> <EndFunc Name='RedirectorCAX' Return='0' GetLastError='0'>
> ---
> When I execute RSActivate on command line, I get the same error (The
Report
> Server Web service has not generated a public key).
> I played with settings of reporting services installation (service account
> and SQL Server user) in hope to get it installed successfully but it
always
> fails.
> Do you have any idea about my problem?
>|||Thanks Kic for the reply.
Domain user account for service account or SQL Server access?
Alex
"kic" <kic1999@.stop.the.damn.spam.hot.mail.com> wrote in message
news:uep9mb1$EHA.4004@.tk2msftngp13.phx.gbl...
> Alex
> I had a similar issue: I had use a domain user account; the service now
> starts.
> Kic
> "Alex" <alim@.rogers.com> wrote in message
> news:#mjXxZy$EHA.2032@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I have installed SBS 2003 premium andSQL Server 2000 on my server with
> > default settings and patched it using Windows Update site. Also,
installed
> > SQL Server reporting services. During setup, it warned me the Sharepoint
> is
> > installed (I don't know how Sharepoint got installed) and at the end, it
> > failed to initialize reporting services. Now, when I enter
> > "localhost/reports" in address line of IE, I get this error message:
> > The underlying connection was closed: Unable to connect to the remote
> > server.
> >
> > I checked SRM*.log error log and found an error message:
> > <Func Name='Do_Activate_ReportService'>
> > <Func Name='CreateProccessAndWait'>
> > Error reported by child process:
> > Failure starting the web service:
> > The Report Server Web service has not generated a public key. The
service
> > may not have started successfully. Check the log files for more
> > information.
> >
> > <EndFunc Name='CreateProccessAndWait' Return='1603' GetLastError='0'>
> > Error 1603 Launching RSActivate.exe:
> > C:\DOCUME~1\alim\LOCALS~1\Temp\RSActivate.exe
> > "C:\DOCUME~1\alim\LOCALS~1\Temp\RSActivate.exe" /c "C:\Program
> > Files\Microsoft SQL Server\MSSQL\Reporting
> > Services\ReportServer\RSReportServer.config"
> > Do_Activate_ReportService: Activation Failed!
> > <EndFunc Name='Do_Activate_ReportService' Return='0' GetLastError='0'>
> > <EndFunc Name='RedirectorCAX' Return='0' GetLastError='0'>
> > ---
> >
> > When I execute RSActivate on command line, I get the same error (The
> Report
> > Server Web service has not generated a public key).
> > I played with settings of reporting services installation (service
account
> > and SQL Server user) in hope to get it installed successfully but it
> always
> > fails.
> >
> > Do you have any idea about my problem?
> >
> >
>