can anybody help me by providing a link on how to convert a user instance database to normal sql server database. Thanks in advance.
Copy the user instance MDF to a new directory. From SSMS, right click "Databases" and then Attach.
Related
I created a server on Microsoft Azure, and a SQL database on it. I downloaded SQL Server Management Studio, and I am able to connect to the server fine using the Server Admin Id and password I created when creating the server. But when I try and run a bulk load query to insert a picture in a picture column. It says I do not have rights. Error is:
You do not have permission to use the bulk load statement
Also in Management studio if I go to server level security folder I have logins as an option and the Server Admin ID is there, when I right click to go to properties, its missing properties as an option.
Let me know if you need more info.
Any help is appreciated,
Thank you,
Abdul
Currently i have a database that is attached to a named instance server with login credentials ,but at the same time if i attach the database to another server in other system ,the same gets opened.
How to deal with this?
Is there a way to restrict the database file to opened by others without valid credentials ?
You can do a BACKUP with MEDIAPASSWORD.
Here is the T-SQL command to backup your database:
BACKUP DATABASE Northwind TO DISK='C:\abc.BAK' WITH MEDIAPASSWORD='abc12345'
Reference Links:
Backup
I publish my SQL Server database on my local machine to Azure via Management Studio.
Say I name the database on Azure "California". The first time I do it its ok.
Then I made changes on my database on local, adding columns, adding data, etc. Then I want to deploy this database to Azure again.
But now Management Studio won't let me do it. It says database "California" already exists on Azure.
I can get away with this problem by deleting existing "California" on Azure first, then deploy again. But this seems not correct...Every time I make database changes on local, I need to delete the one on Azure before I deploy?
Does anyone know how to solve this problem?
The best way is to create a database project in Visual Studio to maintain your database schema and then you can do a database compare to create a script to update the database on Azure.
http://weblogs.asp.net/gunnarpeipman/archive/2013/01/28/using-visual-studio-database-projects-in-real-life.aspx
RedGate Schema Compare will also do a similar thing.
Update Jan 2020
(I'm assuming the question is to update the schema on Azure, not update data)
If you are using Code First for creating your database. Then it is really simple.
Assuming your connection string is pointing to a local database (the one you want to update to Azure)
Make the changes to your entities
Create a new migration for those changed (Add-Migration etc)
Update the migrations to your local database.
Now just change the connection string to point to your Azure database
Update the migrations again, which will now update to the Azure database
Voila! That simple
I know its been a while since the question was asked, however, there is no accepted answer. Thus to aid anyone coming here with a similar issue the following link describes a number of methods.
I prefer deploying a SqlDb from SQL Management Studio
http://azure.microsoft.com/en-us/documentation/articles/sql-database-deploy/
How to: Deploy to SQL Database
In Management Studio, connect to an on-premises SQL Server instance that has a database you want to migrate.
1) Right-click the database --> Tasks and click Deploy Database to SQL Azure.
2) In Deployment Settings, enter a name for the database.
3) Click Connect.
4) In Server name, enter the 10-character server name, followed by .database.windows.net.
5) In Authentication, choose SQL Server Authentication.
6) Enter the administrator login name and password that you provisioned when creating the SQL Database logical server.
7) Click Options.
8) In Connection Properties, in Connect to database, type master.
9) Click Connect. This step concludes the connection specification and takes you back to the wizard.
10) Click Next and click Finish to run the wizard.
If you are using SQL 2012, you can export a data tier application (bacpac) file, then import that when you login to your SQL Azure instance.
After creating a linked server on SSMS 2008, how should I see linked server table schema? Should I change any permission on remote SQL Server? Also, what commands can check those permissions for all accounts? Thanks.
EDIT: running on SQL Server 2000.
You specifically want to look at "sp_tables_ex" and "sp_columns_ex" if you are looking for table/column schema information. You might also be able to use DMV on the remote server to pull the information you need. The link below talks about the two SP mentioned above.
KB203638
You can either change the credentials used to connect to the linked server on the Security tab of the "New Linked Server" dialog, if you need to connect through using delegation or a specific logon, or you'll need to make changes to the permissions on the server being linked to.
I've moved a database from sql 2000 to a new 2005 server. Everything was fine until I logged into Sql Server Management studio with one particular user. It looks like i logged in successfully but when I try to expand the database I get 'The database is not accessible'. I can log in with windows authentication and with other sql users with no problem and can see everything.
I checked and made sure the DB is not in single user mode. I also checked for orphaned logins (exec sp_change_users_login 'report') and none were found.
Any help in pointing me in the right direction would be greatly appreciated.
check if the user has proper permissions to access the db.