New login can't access database via SSMS
I created my Azure database “MyDatabase” and established admin login “MyAdmin” at that time via the Azure management website.
Now I want to create an application login and user “MyUser” to access the data. But, when I did the below I still cannot connect via SSMS. I get error:
Cannot open database “master” requested by the login.
I’m just trying to get to the tables under MyDatabase via SSMS. What am I doing wrong please?
-- Connect to master database as myadmin and run:
CREATE LOGIN myuser WITH password=‘Blah$Blah$Etc’
-- Connect to mydatabase database as myadmin and run:
CREATE USER myuser FROM LOGIN myuser;
EXEC sp_addrolemember 'db_datareader', ‘myuser’;
EXEC sp_addrolemember 'db_datawriter', ‘myuser’;
Thanks for any help!
Hello fiverc,
Thank you for reaching out. You might be connecting to the wrong database (master instead of the user DB). In the 'Connect to Server' window in SSMS, click the 'Options' button. Then enter the name of the database ("MyDatabase"
in your case) in the 'Connect to database' field and then try to connect.
Hope that helps,
Jan
Similar Messages
-
Hello,
Since I installed Windows 8.1 I have quite big problem, can't access photos via windows explorer. iTunes and other software can see phone and works completely fine.
There is error 28 in device manager.
Tried uninstalling all services including iTunes itself and got latest iTunes today and still no luck.
Anybody knows solution to this ?
(iPhone 4S iOS 7.0.4)Is it just me, who got this issue ?
-
Can not access internet via wired connection, wireless working OK
Background information,Came home from vacation turned on PC to access email.Emails started downloading then stoped,started getting messages that firefox stopped working and Thunderbird quit working and others.My desktop is attached to a verizon router.all my other devices are wireless and are working fine through the same router.I connected my laptop to the lan connection, turned off wifi and accessed the internet via lan connection.Using device manager, checked drivers, says up to date, also says that it is working properly.I have gone to the command line and can ping google.com.I can ping the loop around. ping127.0.0.1I have done the ipconfig/release,ipconfig/renew, and ipconfig/flushdnsipconfig/all indcates that it is there and enabledMy Lan connection is part of the mother board.can not access internet via wiredconnection.Not sure what to do next.Help Please
Reply: I spent about an hour last night doing all the things that you suggested including moving the lan cable from my desktop to my laptop which worked fine. When I hoover over the connection it says; Network3 Internet Access no error messages.When I unplug the cable at the router a red x covers that connection icon.Plug it back in red x goes away.It is seeing the router, just does not appear to be providing selected web page info.Computer thinks it is working fine.
-
Can,t access wifi via airport after left my mbp idle for just 1 minute
i can,t access wifi via airport after left my mbp idle for just 1 minute, i need to turn airport off & turn airport on if i left my mbp idle for just 1 minute or less...why this thing happen? anyone can help thanks in advance
Something that came to mind after rereading you post relates to the particulars of a "hard" reset on the Snow.
A “hard” reset removes current setting from the base station. You must then connect to the base station using the AirPort Admin Utility and upload AirPort 2.0 or later software to return the base station to its default settings. A base station in a hard reset is only accessible through the LAN port, not via wireless connections ... so attempting to access with the AAU, via a wireless client, will not work.
The following is the process to reload the AirPort software: AirPort Base Station (Dual Ethernet) : How to reload software from Mac OS X -
Update Access database via OleDB from DataGridView
I have been scouring these forums and the internet in general as well as doing a lot of reading, all to no avail. I can not seem to successfully update the Access database from an edited DataGridView. I am trying to use Stored Procedures that
are in the Access database and work fine therein. The DGV is filled in properly. I have tried an ever-increasing number of variants to update the database (Private Sub BtnUpdate...) without success. I'd really, really appreciate some
guidance here.
Here is my code thus far:
Public Class Form1
Dim con As OleDbConnection
Dim cmd As OleDbCommand
Dim da As OleDbDataAdapter
Dim ds As DataSet
Dim ProviderConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Dim TargetList As String = "C:\Users\Administrator\Documents\Visual Studio 2010\Projects\Development5\Test.mdb"
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'establish a connection to the database
con = New OleDbConnection(ProviderConnectionString & TargetList)
con.Open()
'define the command to be used
cmd = New OleDbCommand
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "ListAllTargets"
'create the data adapter based on the command
da = New OleDbDataAdapter(cmd)
'fill the data set based on the command
ds = New DataSet
da.Fill(ds, "AllTargets")
'bind and load dgvTargets with the data
dgvTargetList.DataSource = ds.Tables("AllTargets") ' Binding to dgvtargetlist
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
da.UpdateCommand = New OleDbCommand("UPDATE TargetList SET;", con)
Validate()
da.Update(ds.Tables("AllTargets"))
Me.ds.AcceptChanges()
End Sub
End ClassHi John,
Welcome to MSDN forums!
Cor pointed you to the right direction. An OleDBCommandbuilder object is required, which can be used to automatically
generate DeleteCommand, UpdateCommand and InsertCommand for DataAdapter object.
Here is detailed walkthrough: How to update
(Insert/Update/Delete) data back into MS Access database from DataGridView.
1) New a WinForms project, drag&drop DataGridView1 and Button1 onto
Form1.
2) Add database file test.mdb to project via: Data menu -> Add New Data Source
Wizard ... then you can use ralative path to this database file in code
3) Select/click
your database file test.mdb in Solution Explorer
-> Properties Pane
-> change the "copy to ouput directory" to "copy
if newer"
4) Code sample
Imports System.Data.OleDb
Public
Class Form1
Dim myDA As OleDbDataAdapter
Dim myDataSet As DataSet
Private Sub Form1_Load(ByVal sender
As System.Object, ByVal e
As System.EventArgs) Handles
MyBase.Load
Dim con As OleDbConnection =
New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=|DataDirectory|\test.mdb") ' Use relative path to database file
Dim cmd As OleDbCommand =
New OleDbCommand("SELECT * FROM Table1", con)
con.Open()
myDA = New OleDbDataAdapter(cmd)
'Here one CommandBuilder object is required.
'It will automatically generate DeleteCommand,UpdateCommand and InsertCommand for DataAdapter object
Dim builder As OleDbCommandBuilder =
New OleDbCommandBuilder(myDA)
myDataSet = New DataSet()
myDA.Fill(myDataSet, "MyTable")
DataGridView1.DataSource = myDataSet.Tables("MyTable").DefaultView
con.Close()
con = Nothing
End Sub
' Save data back into database
Private Sub Button1_Click(ByVal sender
As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Me.Validate()
Me.myDA.Update(Me.myDataSet.Tables("MyTable"))
Me.myDataSet.AcceptChanges()
End Sub
End
Class
Best regards,
Martin Xie
MSDN Subscriber
Support in Forum
If you have any feedback on our support, please contact
[email protected]
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Is it possible to create a new table in the master database with SSMS ?
Hello ,
I have problems with this thread :
http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/5153c43b-7844-41c4-a414-d14730abe435/
If no user database has been created , in SSMS , we can see only the 5 system databases ( master, msdb , tempdb... ).
Logically , the user should connect automatically on the Master database ( if the user is the same as this used to install a new SQL Server instance, this user should be sysadmin that's to say he/she has all possible permissions and especially dbcreator ).
Is it true that it is impossible to create a new table on the master database ?
I have done many researches about this possibility , all I have found is the advice : don't touch to the master database. This database is used to store critical information about the instance and its user databases. Even in the last book of Kalen Delaney
about SQL Server 2012 Internals , I have found nothing clear about the creation of tables in this database ( and what about the other system databases ? I am excluding tempdb ).
If someone has an idea about this thread and my questions , I would be thankful for a reply on this thread or on the related thread in the SQL Server Express Forum ( with my poor written English , I am not sure to have poster in a correct and understandable
way ).
If you think that this thread is not in the good forum , a moderator of this forum can move this related thread ( I have not done the move as I am not sure which is the good forum Database Engine or Transact-SQL ... )
Thanks beforehand and have a nice day.
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.>>Logically , the user should connect automatically on the Master database ( if the user is the same as this used
to >>install a new SQL Server instance, this user should be sysadmin that's to say he/she has all possible permissions and >>especially dbcreator ).
If you add the current user during the installation you can have it as system admin , or you can add him/her later on
in SQL Server. BTW regarding dbcreator I have wrote some blog , need to read... :-)
http://sqlblog.com/blogs/uri_dimant/archive/2010/09/02/be-careful-to-grant-dbcreator-server-role-to-the-user.aspx
You can (if you have needed permissions) to create objects in master database, usually I create objects for instance maintenance (like rebuild indexes...)
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Update a field in an access database via TestStand
I want to read a value from a numeric field in an MS Access database, increment that value by one, and then update the database record that I got the value from with the new value. I am able to execute an Open Database step, execute a Open SQL Statement step with a SELECT query, execute a "Get" operation in a Data Operation step to get the value into a TestStand variable, and increment the value, but I'm at a loss for how to update the databse record with the incremented value.
I tried to execute another Open SQL Statement step with an UPDATE statement, but I get a "Specified value does not have the expected type." error. The TestStand variable type is a number, and the Data Type of the database field is Number. I've tried using long integer, double, and decimal as field sizes, but they all give me the same error.
I also tried to execute a "Set" operation with another Data Operation step against the original Statement Handle. When I do this, the Data Operation runs without error, but when I run a Close SQL Statement step against the statement handle I get an "ADODB.Recordset: Operation is not allowed in this context." error.
Any help would be appreciated.Scripter -
When you try to do a Set and Put, it is always good to explicitly set the statement's cursor type to something other than forward only, like keyset, and the lock type to something other than read-only. See if that helps...
Scott Richardson
National Instruments -
Can't access cluster via SQL Server Mng Studio unless node has ownership
Hi:
We have Windows and SQL 2008 R2 in a 2 node cluster. Failover and failback work like a dream. All the 'lights' are green. But we can only access the cluster when we're on the node that has ownership. I've deleted all DNS entries and successfully recreated
them via ipconfig /registerDns from each node, shutting down, restarting the actual cluster and taking the application and service offline then back on line. All DNS records got recreated perfectly. Cluster error log doesn't show anything when we
can't connect either. We can also ping all IPs, Hostnames and Clustername.Hi g_machuca,
According to your description, you want to implement failover and failback in SQL Server cluster environment. We need to verify if The cluster group containing SQL Server can be configured for automatic failback to the primary node when it becomes available
again. By default, this is set to off. First you set a preferred owner for the SQL Server service in a clustered environment; To ensure the service or application automatically moves to the correct node, select “Allow Failback” under the Failover tab. .
Auto failback saves you from having to make this change manually; however it will restart the SQL Services when it automatically fails back. Or if you don’t want to configure auto failback you’ll want to make sure that you manually fail the services
back to the more powerful node after the system has come back online.
There are details about failover cluster allows automatic failback, you can review the following articles.
http://www.mssqltips.com/sqlservertip/2672/managing-a-windows-and-sql-server-cluster-using-the-failover-cluster-manager-tool/
http://blogs.technet.com/b/rob/archive/2008/05/07/failover-clustering.aspx
For more information about troubleshooting Windows Server 2008 R2 Failover Clusters, you can review the following article.
http://windowsitpro.com/windows-server-2008/troubleshooting-windows-server-2008-r2-failover-clusters.
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Can i access internet via apple tv
Can I access the internet via Apple TV? I would like to watch BBC iPlayer and use last.fm, for example.
http://www.apple.com/appletv/
the internet services the atv support are listed on the site
the only way for the atv to work with the items you mention is by using airplay from an iphone or ipad or ipod touch -
My new users can not upload files via browse
Hi there;
When my recent created users can not download files via the browse within the Internet interface.
When I hit the via browse I face the following:
500 Internal Server Error
oracle.ifs.common.IfsException: IFS-10406: Invalid AttributeValue conversion (DIRECTORYOBJECT to Java DirectoryObject)
oracle.ifs.common.IfsException: IFS-10200: Unable to access object (insufficient privileges)
Any hint?
Sasan EbadianHi Sasan,
These are the ACL's of IFS:
PRIVATE Grants no permissions to any other user. Other users cannot view, modify, or delete a user’s document in any way, unless changed by the owner.
PROTECTED For folders only. Enables other users to see the files in the folder, add documents and folders to the folder, and remove documents and folders they have created from the folder, but are not allowed to delete the folder itself.
PUBLIC Allows full access to the item. All users can make any changes that the owner can make.
PUBLISHED Allows other users to view the contents, but they are not allowed to modify or delete the document.
If you attach the ACL Public it must work!
Bob -
Switching account to new computer can't access old account w/changed email
I'm trying to access my itunes account on a rarely used pc that was used for my ipod and authorize my account on a new computer. My itunes account had my old email address and I forgot the password, so when I try to access the account and answer the security questions to send a new password, it ends up offering to send it to my old email address which is no longer valid....how can I access the account to change my email, and de-authorize my old computer and get my music etc. synched with my new one?....maybe I can just set up a new account on the new computer and dump my music from my ipod to it?
To remove the iCloud account you need to delete it.
Settings > iCloud > scroll to the bottom and tap Delete Acccount -
We are using Small Business Server 2011. It's been a long time, more than three years, since I created a new user. I went to the Standard Console and followed the Add
New User Wizard. I assigned the user to her computer. When she logs on, she can access e-mail but can't get to the shared drives on the computer. I tried on my computer, logged her in, and it's the same scenario. What am I doing wrong? I know it's something
simple, but all the users in the Standard Console, including the new two, have the same boxes checked.Hi,
Based on your description, would you please let me confirm whether just the new created user encountered this
issue, or all users? Did new created user use other function as normal? Such as Remote Web Access.
à
can't get to the shared drives on the computer
Did you mean mapped drives? If can’t access, would you please let me know the complete error message? Or the
drive was not displayed when the new user logon the client computer? If anything I misunderstand or any update, please don’t hesitate to let me know. It may help me to understand clearly.
By the way, please run
SBS BPA and check if find relevant issues.
Hope this helps.
Best regards,
Justin Gu -
Apps can not access photos.
Apps never asked if they could access photos.
Security>Photos - there are no apps on the list.
I have restarted.
Backed up, restored.
No improvement.
Thanks.
ps my iphone allows access, so I know 'how' to do it usually.Found the answer:
Go to settings/general/restrictions/photos and allow the apps to have access to photos -
New Login can't see Music on External Disc
I recently created a new user on my computer, which I am now using as my primary login.
Under my <old> login, I had defined the location for my library in a folder on an external drive, let's say E:\foo\.
When I logged in under my <new> login, I went to Edit>Preferences>Advanced and made sure it was pointing to E:\foo\. However, my library still wouldn't show up in iTunes.
So I uninstalled the software and reinstalled under my <new> login. I went to Edit>Preferences>Advanced and noted that the library path still pointed to E:\foo\. However, my library is still not loading.
Any ideas?
-GregFigured it out.
1) Went to Edit>Preferences>Advanced and turned off the "import into library" option.
2) Went to File>Add to Library and chose the shared folder (E:\foo\).
That added 'em in.
Then turned the Import into Library checkbox back on again.
-g -
HT1657 I've rented my movies on my laptop. How can I access them via my i pad?
I rented several movies and downloaded them to my computer? Can I access these rentals somehow without renting again on my ipad?
You will need to connect the iPad to your computer's iTunes and move them over to the iPad (similar to how you sync other content from your computer) - rentals are one-time only downloads, so you can't download a copy of them on your iPad. From the page that you posted from :
If you download a rented movie on your computer: You can transfer it to a device such as your Apple TV (1st generation), iPhone, iPad, or iPod if it’s a standard-definition film (movies in HD can only be watched on your computer, iPad, iPhone 4 or later, iPod touch (4th generation or later), or Apple TV). Once you move the movie from your computer to a device, the movie will disappear from your computer's iTunes library. You can move the movie between devices as many times as you wish during the rental period, but the movie can only exist on one device at a time.
Maybe you are looking for
-
Unable to syndicate same Remote System with differnt value
Hi, I am working on MDM 7.1 SP05 and I have the following issue with syndication: I have a remote system table (Key Enabled) with System as Non-Qualifier and value as Qualifier and I have values in the MDM Datamanager as MDM ID, Remotesystem (Multiva
-
Hi! I just bought Lion and I am having a problem with the installation. It keeps telling me that the computer's hard drive has a S.M.A.R.T. problem. How can I solve it? Thanks! Angela
-
How to show only Indexes in Search Scope
Hi All, Is it possbile to allow users to choose only Indexed in search scope. I tried editing the Search Options set, there i found that I can enable and disable search scope, but whn search scope is enabled both the Indexes and folders are visible.
-
Inbound IDoc to generate Billing Document - t.code VF01
Hi, which is the inbound idoc to trigger Billing Document. pls suggest thanks in advance... Regards, Balaji
-
HI Now there is an issue while iam running powershell script for BDC service. Below is the script i am using to configure BDC service. Param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string]$ServiceName = $