Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Utter noob. please advise.
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 11/08/2013 :  11:00:02  Show Profile  Reply with Quote
I need to set up a test database, i have never really done anything like this.

I have been given a txt file to put into a query, I was told all i need to do is install an instance of sql express and execute this query but when i did, it gave me a lot of errors, beginning with AssistedSales database doesn't exist, so i found a section in the code that has "CREATE DATABASE [AssistedSales] ON PRIMARY" but it was half way down the file, i put this first in the query, and the errors changed to what you see in the image.

can anyone tell me if this is just completely wrong and i have been given a fools errand or am i missing something. Oh and also, even though the create database is at the top and i no longer receive the error about it not existing, it still doesn't get created in the left pane.

After i altered it.

Before i altered it. this is how it was given to me and told it would sort itself out...

Flowing Fount of Yak Knowledge

6065 Posts

Posted - 11/08/2013 :  11:08:10  Show Profile  Reply with Quote
>>I was told all i need to do is install an instance of sql express and execute this query
Unless you were hired as a DBA I would just copy the errors into a reply and send it back to the person that provided it.

If you need help fixing the errors then post the original script here - not as an image but as text within code tags:
[code ]
[ /code]

Be One with the Optimizer
Go to Top of Page

Aged Yak Warrior

United Kingdom
555 Posts

Posted - 11/13/2013 :  06:30:08  Show Profile  Reply with Quote
What permission have you set yourself on the server?
You first need to set yourself up as sysadmin permissions to install objects. Security - New User - YourName - set permissions to sysadmin for the account. Try script again!

Please help me to enable me to help others!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000