Showing posts with label along. Show all posts
Showing posts with label along. Show all posts

Friday, March 30, 2012

Need Help Configuring SQL Server Express

I have Visual Studio 2005 Professional installed and SQL Server Express installed. In following along with the Microsoft Visual C# Step by Step book, there is a procedure on page xxi to get access to SQL Server Express. At the 2> prompt, however, when I type in go and then press enter, I get the following message:

Msg 15247 Level 16, State 1, Server MyServerName\SQLEXPRESS, Procedure sp_grantlogin, Line 13

User does not have permission to perform this action.

The computer is my own personal computer, with Window Vista installed and no previous versions of MSDE installed. I also have administrator persmissions. The only guidelines in the procedure regarding what to do in the event of an error message is to ensure that the commands were typed in correctly. What could be causing this message, since I do have administrator permissions?

hi,

as you are dealing with Vista and UAC related issues, please verify your actual login has the minimal required permissions to execute sp_grantlogin system stored procedure, ALTER ANY LOGIN or higher...

regards

|||

Hi. When I go to Start->Control Panel->User Accounts, and then click on the Change Your Account Type link, the window that appears shows my present status, which is Administrator. A message in the window states:

"Administrators have complete access to the computer and can make any desired changes."

Following that sentence is a sentence which has advice about creating a password. I then cancel the task, since I really didn't want to change my status. Was that sufficient to verify that I've got the minimal required permissions to execute sp_grantlogin?

I'm not sure what UAC means (User Account Control?). But I do have a problem with Windows Defender not working...giving me a message that it cannot update the definitions. In following the help threads on Windows Defender problems, I discovered that there is no wuaucpl.cpl file in my windows directory. I've opened up an email help procedure with Microsoft on that.

Edit: I realize now that wuaucpl.cpl is no longer a file included in Windows Vista (though my SQL Server problem is probably not related to my problem with Windows Defender).

|||

hi,

this is correct at the OS level, but please verify "inside" SQLExpress that your login has appropriate permissions as well..

regards

|||Hi. Unfortunately, I am a complete neophyte when it comes to SQL Server. How do I verify that my login has the appropriate permissions? I've never actually started SQLExpress or done anything with it. I know that I have a SQL Sever configuration manager tool, and when I open it and look at the SQL Server 2005 Services folder, I can see that SQLExpress is running.|||

Vista has changed the playing field and now forces everyone to run as a non-administrative user, even if you're an administrator, until you explicity request to be elevated to administrative privleges. I've explained a bit about how this works and how to correctly configure SQL Express on Vista in this blog post. You already have SQL installed, so make sure you're using SP2 and then follow the instruction for running the Provisioning tool to correctly set your access level.

Mike

|||Mike, thanks for that info. I do have SP2 installed. I just want to clear up one more thing. When I open up the SAC tool, and click on Add New Administrator, the SQL Server 2005 User Provisioning Tool for Vista window opens. In it there is a text box that has MyServerName\UserName as the user to provision. In the available privileges in the left pane, there is SQLEXPRESS with one item named: Member of SQL Server SysAdmin role on SQLEXPRESS. This is the only availbable privilege showing. So I should transfer this privilege, and I should then be able to grant myself the sp_grantlogin permission? Just want to make sure about this before I do anything.|||

All you need to do is give yourself SysAdmin privledges and you're done, no need to use sp_grantlogin. Once you're a SysAdmin you have every permission that it is possible to have.

Mike

|||Thanks for all the help, Mike.

Friday, March 23, 2012

Need distinct rows from table based on (col1) only - overall required multiple c

Need rows of specific table having distinct col1, but along with col1 I also need col2,col3, .... But distinct is required on only col1.

I tried ---
Select col1, col2, ... , coln from table1 where ( select distinct col1 from table1)

But result contain repetitive col1 rows due to wrong syntax of mine. Also tried exist, union, right join but failed finally ....

give your some site:
one is mser.net,another is msdnx.com,search by google in the site....

Saturday, February 25, 2012

Neebie Q: .MDFs and SQL Server

I'm just starting out with VWD 2005...wow this product and language has come along way, but I have a couple of simple questions of confusion. It seems that Microsoft is really pushing SQL via SQL Express over Access...and depending on the answers to these questions below...it seems like it has been accomplished.

Q

1. When I create a .mdf via VWD 2005, why doesn't this database show up in SQL Server Management Express?

2. Are you able now to simple publish the .mdf and .ldf (/appdata) folder up to any webserver and be able to access that SQL database like you normally would an Access database via SQL express on the server? And, if this is the case, doesn't this imply that an ISP will be providing SQL support via the Express edition without even explicitly allowing SQL through their actual SQL database server?

3. Besides VWD2005, how can you manage the .mdf's within the web site?

I think you almost answered yourself because the MDF (Microsoft data file) and LDF ( log data file ) are not stored in the database they are stored in the data subfolder in Microsoft SQL Server folder in programs by the SQL Server engine not you the user. So you see you cannot manage the MDF in a web server, because SQL Server from version 7.0 uses ODS(on disk) file system. Now to the ISP question you need the full version of SQL Server the developer edition cost a few dollars, it is Enterprise edition with no deployment restrictions and ask the ISP to give you management studio access and you just back up and restore your database on their server. Hope this helps.|||

Thanks Caddre:

Yeh, I'm not totally understanding this. The VWD gives you a great interface to work on modifying an SQL database on the fly while writing code. How can you get an existing SQL database already in the SQL server proper into VWD so that you can add fields and manage tables on the fly from this interface as opposed to having another Enterprise Manager or SQL client window up to do that separately. Its confusing to me.

I don't understand how SQL server knows about this database yet doesn't know about it via the Management Studio and visa versa, why can't VWD see existing databases that Management Studio can see. I see Add Exsting Item in the VWD App_Data but it doesn't pull up the SQL Management Studio or anything to let me choose an existing database.

If a Connection String can find this database via just two files within a web folder locally, why wouldn't it be able to find it on a web server in the same fashion?

|||

You can do what you want in server explorer but I don't know if you have server explorer in VDW. The quick answer is people should not be allowed to move RDBMS (relational database management systems) file as local operating system file because you risk corrupting the database. Management studio is SQL Server and VWD is an IDE (integrated development environment). So it is a choice, use inproc session which is file system or do some extra work to use SQL Server as out of proc session. The difference is algebraically processed data in SQL Server or data that is just stored in the file system of the operation system.

If a Connection String can find this database via just two files within a web folder locally, why wouldn't it be able to find it on a web server in the same fashion?

That will take Microsoft's SQL Server the new kid on the block out of the RDBMS business for serious application.

Hope this helps.

|||

double post

|||

Let's see if I can answer a few of these:

1. Because the database isn't attached to the same instance of SQL Server Management Express at the time it's running.

2. Sort of, you can if it has SQL Express installed. No.

3. Depends on what you mean by "within the web site". You can attach the .mdf/.ldf files to a non-user instance of SQL Express (The one the management studio normally sees), then you can use management studio to do whatever you want. Just don't forget to unattach it so that when you are debugging or want to use it within VWD that it'll be able to instantiate a user instance of SQL Express, and attach the files correctly.

|||

How can I get an existing SQL database into the VWD environment?