I am not sure how you go there in the GUI. Do you right-click the Security->Logins folder and choose New Login?
From T-SQL, you can just use
CREATE LOGIN domain\user FROM WINDOWS
I am not sure how you go there in the GUI. Do you right-click the Security->Logins folder and choose New Login?
From T-SQL, you can just use
CREATE LOGIN domain\user FROM WINDOWS
If I change my login string to Integrated Security=SSPI it works. Also, I
was able to add a user successfully in SQL 2000 but SQLExpress is differnt.
Can anyone tell me how to add a user and give him permissions for a
particular database? Or refer me to a URL that does.
Many thanks.
In SQL Server Management Studio Express, when you login to the SQL Express Server, you'll see "Databases" as an item in the Object Explorer. If you expand that, you'll see all of your databases listed. Select the database you want and expand that, then you'll see Security as one of the items. Expand that one more time and you'll see Users. You can create a new user there, as well as right click on a user and select Properties to fine tune the permissions of that user.
You can also create global users (Logins) by going to the Security item at the top level list in the Object Explorer. Once you've created a Login, you can map it to certain users within a database.
Thanks< MJ
I have a database that I want to add stored procedures but when I go to save the stored procedure it asked me to save it as a .sql file and doesn;t add it to the database.
This is what I'm doing:
right click on database > programability > stored procedures
select "new Stored Procedure"
writting the procedure
then save - this is when i get the save dialogue rather than seeing the sp added to the database.
There must be something very simple that I'm doing wrong but I just can't figure it out, any help would be greatly appreciated.
Damien
You need to execute this command (that begins with CREATE PROCEDURE) instead of saving to disk.
So, you need to press F5 or press the Execute Button from program bar.
|||ThanksI have the full blown Microsoft SQL Server Management Studio (MSSMS) installed on my workstation.
We have a number of existing databases that I'd like to manage with MSSMS and put into source control.
How do I get MSSMS to "import" or "Convert" an existing SQL server 2000 database into a project that I can manage with MSSMS? We have not used Source safe up to this point, but would like to start doing so now.
This seems like it ought to be explained well up front in any discussion of converting from SQL 2000 to SQL 2005 or installing 2005, but I can't find ANYTHING useful in the BOL or other help.
Thanks for any help you can give me.
-Rob Marmion
All what you need is to script your code (and other objects, if you'd like) into separate files and add them to the SSMS project (simply drag'n'dropping). The problem is that SSMS is not able to script your database objects into separate files, only into one, but you can use Enterprise Manager "Generate SQL Script" feature.If you are using the managment studio, right click on the Databases node, --> New Database. If you are using a script tool for this, the fastest way to create a database is CREATE DATABASE <name>, which stores the data files in the defautl location, specified at setup time.
HTH, Jens Suessmeyer.
|||Thanks, Jen! boy was that ever easy! I've got tables and columns now too! Tell me though, can I input some data in the management Studio Also?Make sure the database is AutoClose=true. If the database is not set to automatically close, the SQL Server service will keep it open as long as the server is running.
You can check this in the Options page of the database properties dialog in Management Studio.
Hope this helps,
Steve
|||Thanks, Steve. That was the problem. However, I still can't add data or insert blank records in the database. I noticed when I used an Access database I was able to edit and delete the data. I would like to be able to do that with Sql server express database also and in addition to inserting a blank record. I am using a a gridview component.In Visual basic 6.0 I could drop a few buttons on the form and with next, previous delete and insert methods I could alter the database where the columns were bound to individule Textboxes.
I have a lot to learn and there are very few books and tutorials written with info on what I want to learn.
I guess the gridview tasks are limited because I have no data to edit or delete, and I don't know how to use the Management Studio to enter the data. :(
|||I tried executing a query like this:
INSERT INTO family VALUES ("Paul", "Handley"); family is my table and there are only two columns. I tried putting the column names but got an error. I also get this error when I try to run the above query:
Msg 128, Level 15, State 1, Line 1
The name "Paul" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
Any suggestions?
Paul
|||
You can either set the following command:
SET QUOTED_IDENTIFIER is OFF
to use double quotation marks, or you use single quotation marks which wont cause the problem.
HTH, jens Suessmeyer.
|||Thanks, Jen. That did the trick. As far as the inserting and the editing of a database record within the web application I am developing, I still can't do that. Is it possible to attach a query to a button and just insert a blank record. Like this:|||Ok I found the where I could add the various links to Update Insert and edit my fields and when I click on New I get the blank fields to add new data but when I click on update I get this error msg:
Hi Paul,
there is no need yelling in this group. As we are doing this all in our spare free time and on a voluntary basis, the poster of a question sometimes has to wait until he gets an answer. IMHO I would rather learn the basis things first, before comming to the groups and posting question which would have been solved if you just took a walkthough-easy-to-use-example.
The question you are posting is related that you appearantly didn′t specifiy which command has to be executed in the case of an insert. YOu can either specify your own command or use a commanbuilder (But that are , as I told below some basic things which wouldn′t concern you if you have done some ADO.NET basics first)
Fell free to come any time again in this group, but be aware that you sometime need to have a bit patience.
HTH; jens Suessmeyer.
|||p3aul,tonic999 Thank you for the post. I don't remember where I was now. In working with MySQL , though, in the insert statement (fieldname, fieldname) are optional.
My original question, If I can find the file I was working on, still stands, to wit:
Ok I've got to the point where when I am configuring the datasource and I get to the "Configure the select statement and I choose "Specify columns from a table or view. I click on te advanced tab and I want to choose"Generate Insert, Update and Delete Statements" but the whole dialog box is grayed out! What do I do now? I want the capabilities of editing, insertsing, deleteing and updating my records
Thanks,
Paul
If an equipment can only belong to one customer this would be something like this:
Customers
=======
CustomeriD
(OtherColumns)
Equipment
=========
EquipmentD
(OtherColumns)
CustomerID
If one Equipment can belong to more than one customer you have a N-M relation:
Customers
=======
CustomeriD
(OtherColumns)
Equipment
=========
EquipmentD
(OtherColumns)
CustomerEquipment
================
EquipmentD
CustomeriD
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
Is it possible to create a new trigger for a SQL 2000 Database using SQL Server Management Studio Express?
hi,
yes...
connect to the desired instance.. select the required database and navigate to the "table" node.. expand the desired table/view object and select the Triggers node.. right click and write your trigger.. a template is presented as well..
or just open a new query window, select the desired database and type the trigger code..
regards
look in the master database. you might have created it there.
|||As Karl suggested, you likely created the table in a database other than your new TRADING database.
In order to use a database, you have to be in the context of that database. You do this by using the USE statement. For example:
CREATE DATABASE Trading
GO
USE Trading
CREATE TABLE MyTable (C1 int, C2 varchar(50))
GO
INSERT INTO MyTable VALUES (1, 'Test')
See the topic 'USE (Transact-SQL)' in Books Online for more information.
You can also see the current database context when you're in the SQL editor by looking at the database listed in the Standard toolbar. Selecting another database from the dropdown list in the toolbar is the same as running a USE <databasename> statement.
Regards,
Gail
I have this problem using SQL Server Management Studio Express.
When browse query/table with XML type column I cannot create manualy XML field.
Is that possible using built-in XML editor ?
I make following steps:
1. Use AdventureWorks example Database
2. Create New Query on Person.Contact table
SELECT ContactID, Title, FirstName, AdditionalContactInfo
FROM Person.Contact
3. Execute query
4. Then : first 10 records contain XML data in AdditionalContactInfo field
5. I cannot insert manualy new XML data into record 11,12 e.t.c
I thing it is possible by built-in XML editor, but HOW ?
Is it possible to change such field using MS Access version 2002 ?
Thanks in advance !
Hi Aleko_b,
You can't directly edit the XML with SQL Server Management Studio or the Express version either. We are considering this functionality in a future release. You need to construct an INSERT statement within the T-SQL Editor and copy/paste the XML from the XML editor.
As far as Access 2003 is concerned, you will want to create a Linked Table via ODBC to the table in question. The XML field will look like a Memo field that you can edit for changing the contents of the XML field. Just be careful not to modify the tags. ;-)
Thank you,
Bill Ramos, Lead PM, SQL Server Manageabilty
I just discovered the "XML Editor" today. Is there an instruction guide or a list of supported features available?
TIA,
barkingdog
I have this problem using SQL Server Management Studio Express.
When browse query/table with XML type column I cannot create manualy XML field.
Is that possible using built-in XML editor ?
I make following steps:
1. Use AdventureWorks example Database
2. Create New Query on Person.Contact table
SELECT ContactID, Title, FirstName, AdditionalContactInfo
FROM Person.Contact
3. Execute query
4. Then : first 10 records contain XML data in AdditionalContactInfo field
5. I cannot insert manualy new XML data into record 11,12 e.t.c
I thing it is possible by built-in XML editor, but HOW ?
Is it possible to change such field using MS Access version 2002 ?
Thanks in advance !
Hi Aleko_b,
You can't directly edit the XML with SQL Server Management Studio or the Express version either. We are considering this functionality in a future release. You need to construct an INSERT statement within the T-SQL Editor and copy/paste the XML from the XML editor.
As far as Access 2003 is concerned, you will want to create a Linked Table via ODBC to the table in question. The XML field will look like a Memo field that you can edit for changing the contents of the XML field. Just be careful not to modify the tags. ;-)
Thank you,
Bill Ramos, Lead PM, SQL Server Manageabilty
I just discovered the "XML Editor" today. Is there an instruction guide or a list of supported features available?
TIA,
barkingdog
I have this problem using SQL Server Management Studio Express.
When browse query/table with XML type column I cannot create manualy XML field.
Is that possible using built-in XML editor ?
I make following steps:
1. Use AdventureWorks example Database
2. Create New Query on Person.Contact table
SELECT ContactID, Title, FirstName, AdditionalContactInfo
FROM Person.Contact
3. Execute query
4. Then : first 10 records contain XML data in AdditionalContactInfo field
5. I cannot insert manualy new XML data into record 11,12 e.t.c
I thing it is possible by built-in XML editor, but HOW ?
Is it possible to change such field using MS Access version 2002 ?
Thanks in advance !
Hi Aleko_b,
You can't directly edit the XML with SQL Server Management Studio or the Express version either. We are considering this functionality in a future release. You need to construct an INSERT statement within the T-SQL Editor and copy/paste the XML from the XML editor.
As far as Access 2003 is concerned, you will want to create a Linked Table via ODBC to the table in question. The XML field will look like a Memo field that you can edit for changing the contents of the XML field. Just be careful not to modify the tags. ;-)
Thank you,
Bill Ramos, Lead PM, SQL Server Manageabilty
I just discovered the "XML Editor" today. Is there an instruction guide or a list of supported features available?
TIA,
barkingdog
Creating DB from scripts,Sql server