Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts

Wednesday, March 7, 2012

Login to SQL Server Express using Command Prompt

How can I login to SQL Server Express instance(localhost\SqlExpress) using command prompt so that I can query database. Is there any alternative GUI tool for SQL Server Express Manager? (I think Microsoft has discontinued SQL Server Express Manager). I prefer using Command Prompt. I am using WindowsXP Professional.Have you looked for an osql.exe? I'd personaly look in the installation directory of the sql express and look at all the .exe files and see what's there.|||

oSQL is supported, but SQLCmd is the 2005 equivalent that is recommended. Simply open a command prompt and open the connection to your server as in:

SQLCmd -S .\sqlexpress -E

This will take you to a prompt where you can start typing commands. More information about SQLCmd is available in Books Online.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

I don't have SQL Server Express Manager. I want to enable ASPNET account in SQL Server Express so that my ASP.NET application can access databases created in SQL Server Express.

How can I accomplish above task using Command Promt. If anyone recommend any GUI tools other than Express Manager it may be even better.

Thanks a lot for your support.

|||

You can download Management Studio Express from http://msdn.microsoft.com/vstudio/express/sql/download/. If you want to use the command line, use SQLCmd as I suggested above.

Once you've connected using SQLCmd, you will need to write T-SQL statements to create Logins and Users for the ASPNET user. You should be able to find information about creating Logins and Users in the Books Online at http://msdn2.microsoft.com

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

Now I can connect to SQL Server Express using Command Prompt but I get some error messages when I use T-SQL commands.Following are the commands I used.

D:\Documents and Settings\Sankar>sqlcmd -S .\sqlexpress
1> use BookShop
2> SELECT Name FROM Department
3> GO

I receive following error message when I type above SELECT statement .

Msg 911, Level 16, State 1, Server JAMESGAT-5BB8A7\SQLEXPRESS, Line 1
Could not locate entry in sysdatabases for database 'BookShop'. No entry found
with that name. Make sure that the name is entered correctly.
1>

|||

Oops, I forgot to specify the path. The command should be typed as below.

sqlcmd -S .\sqlexpress -d D:\Inetpub\wwwroot\BookShop\App_Data\BookShop.mdf

We can perform T-SQL queries after connecting to the database as described above.

Friday, February 24, 2012

Login prompt when deploying solution/report to report server

Hi there,

I've seen some similar posts to this one, however none with an answer and I'm wondering if anyone has actually figured out what causes this issue. I'm running SQL Server 2005 Reporting Services.

I'm attempting to implement a folder structure for the report server, therefore am creating individual solutions in Visual Studio for each folder. At the top level i.e http://servername/reportserver/ I am able to deploy reports no problem.

However creating a folder at the next level in the tree and then deploying to that level such as http://servername/reportserver/ManagementReports causes a Reporting Services Login prompt to appear. No matter what user credentials I enter they are not accepted. I have full administrator rights the server, the site and the folders in question.

Has anyone else experienced this? Does anyone have any suggestions?

Thanks

Matt

You need to split your deployment path. Remove the folder name from TargetServerURL and add it to TargetReportFolder.

If you want to have a new report projoect that gets deployed to a folder under your ManagementReports folder, you change TargetReportFolder to be ManagementReports/Name of new folder.

Kaisa

|||

Thanks very much Kaisa, that has worked. I should have spotted that

Login Prompt after ~3min timeout

I have a report which I am running from a web front end, which, when exported
to excel with certain parameters, takes several minutes to run. After
something between 2.5mins and 3mins this will prompt for a username and
password. Providing a valid username and passoword gives you another 3mins
before you get prompted again and so on until you have been prompted 3 times,
after which you get an IIS permission denied message up.
Running a SQL Server trace against the server makes it appear as if the
report restarts running as the stored procedure is re-run (even though this
had completed successfully before the timeout was hit), so the report appears
to start again.
Looking at the Logfiles there are message about orphaned requests and Item
with session ... not found in database.
I have tried increasing the:
Database query timeout to 240 secs - no effect.
The report timeout to unlimited - no effect.
MaxMemoryLimit to 80% - no effect.
ASP timeout to 600 sec - no effect.
I can't see any error messages in the event log.
Does anybody have any idea what is actually timing out, and even where I can
set it.
Please through in random suggestions, I am willing to try anything. BTW
this is happening on both the server which is running SP2 and the one with no
service packs on.
Many thanksI should have added:
It is nothing to do with permissions as this is fine with a smaller dataset,
also I am administrator on, one of the machines on which this problem is
occuring.
Session timeout values are default of 20mins.
"Nicola Jones" wrote:
> I have a report which I am running from a web front end, which, when exported
> to excel with certain parameters, takes several minutes to run. After
> something between 2.5mins and 3mins this will prompt for a username and
> password. Providing a valid username and passoword gives you another 3mins
> before you get prompted again and so on until you have been prompted 3 times,
> after which you get an IIS permission denied message up.
> Running a SQL Server trace against the server makes it appear as if the
> report restarts running as the stored procedure is re-run (even though this
> had completed successfully before the timeout was hit), so the report appears
> to start again.
> Looking at the Logfiles there are message about orphaned requests and Item
> with session ... not found in database.
> I have tried increasing the:
> Database query timeout to 240 secs - no effect.
> The report timeout to unlimited - no effect.
> MaxMemoryLimit to 80% - no effect.
> ASP timeout to 600 sec - no effect.
> I can't see any error messages in the event log.
> Does anybody have any idea what is actually timing out, and even where I can
> set it.
> Please through in random suggestions, I am willing to try anything. BTW
> this is happening on both the server which is running SP2 and the one with no
> service packs on.
> Many thanks|||The problem was caused by the ConnectionTimeout value in machine.config.
This was set to 2mins.
"Nicola Jones" wrote:
> I should have added:
> It is nothing to do with permissions as this is fine with a smaller dataset,
> also I am administrator on, one of the machines on which this problem is
> occuring.
> Session timeout values are default of 20mins.
> "Nicola Jones" wrote:
> > I have a report which I am running from a web front end, which, when exported
> > to excel with certain parameters, takes several minutes to run. After
> > something between 2.5mins and 3mins this will prompt for a username and
> > password. Providing a valid username and passoword gives you another 3mins
> > before you get prompted again and so on until you have been prompted 3 times,
> > after which you get an IIS permission denied message up.
> >
> > Running a SQL Server trace against the server makes it appear as if the
> > report restarts running as the stored procedure is re-run (even though this
> > had completed successfully before the timeout was hit), so the report appears
> > to start again.
> >
> > Looking at the Logfiles there are message about orphaned requests and Item
> > with session ... not found in database.
> >
> > I have tried increasing the:
> >
> > Database query timeout to 240 secs - no effect.
> > The report timeout to unlimited - no effect.
> > MaxMemoryLimit to 80% - no effect.
> > ASP timeout to 600 sec - no effect.
> >
> > I can't see any error messages in the event log.
> >
> > Does anybody have any idea what is actually timing out, and even where I can
> > set it.
> >
> > Please through in random suggestions, I am willing to try anything. BTW
> > this is happening on both the server which is running SP2 and the one with no
> > service packs on.
> >
> > Many thanks|||Sorry that should have said metabase.xml not machine.config.
"Nicola Jones" wrote:
> The problem was caused by the ConnectionTimeout value in machine.config.
> This was set to 2mins.
> "Nicola Jones" wrote:
> > I should have added:
> >
> > It is nothing to do with permissions as this is fine with a smaller dataset,
> > also I am administrator on, one of the machines on which this problem is
> > occuring.
> >
> > Session timeout values are default of 20mins.
> >
> > "Nicola Jones" wrote:
> >
> > > I have a report which I am running from a web front end, which, when exported
> > > to excel with certain parameters, takes several minutes to run. After
> > > something between 2.5mins and 3mins this will prompt for a username and
> > > password. Providing a valid username and passoword gives you another 3mins
> > > before you get prompted again and so on until you have been prompted 3 times,
> > > after which you get an IIS permission denied message up.
> > >
> > > Running a SQL Server trace against the server makes it appear as if the
> > > report restarts running as the stored procedure is re-run (even though this
> > > had completed successfully before the timeout was hit), so the report appears
> > > to start again.
> > >
> > > Looking at the Logfiles there are message about orphaned requests and Item
> > > with session ... not found in database.
> > >
> > > I have tried increasing the:
> > >
> > > Database query timeout to 240 secs - no effect.
> > > The report timeout to unlimited - no effect.
> > > MaxMemoryLimit to 80% - no effect.
> > > ASP timeout to 600 sec - no effect.
> > >
> > > I can't see any error messages in the event log.
> > >
> > > Does anybody have any idea what is actually timing out, and even where I can
> > > set it.
> > >
> > > Please through in random suggestions, I am willing to try anything. BTW
> > > this is happening on both the server which is running SP2 and the one with no
> > > service packs on.
> > >
> > > Many thanks