Creating a database in SQL Server using an SQL Script

Hi,

I am trying to create the "Personal" database in my SQL server using the SQL script (Personal.sql) that is provided with the starter kit.  Does anyone know how I can run this script to create the database? Do I do it from the command line? If so how do I do this and can I use windows authentication to connect to the server?

Many thanks in advance,

Trevor Keast

0
trevorkeast
5/29/2008 12:14:46 AM
asp.net.personal-site-kit 1290 articles. 0 followers. Follow

1 Replies
959 Views

Similar Articles

[PageSpeed] 36
Get it on Google Play
Get it on Apple App Store

Hi,

     We can run the scripts in two ways.

1. Open your Sql client , if it is sql server 2005 then sql management studio Run-->sqlwb,Sql server 2000 then isqlw. Login to your database server using either sql authentication or windows authentications what ever you want. if you are having create database script in your personal.sql then , just copy the script file content and paste in query window and run it,

it will create the personal database.

2. The Alternate way is Running from comman line ,you need to run OSQL command for achieving this one.

the OSQL synatax is

OSQL -U <user name> -P <Password> -S <SQl Server Name> -i  <Script File Path>

 


Regards,
Sasi

Please remember to click "Mark as Answer" on this post if it helped you.
0
sasi
5/29/2008 5:07:33 AM
Reply:

Similar Artilces:

Problem with creating new SQL server database in VWDExpress using SQL Server 2005 Express
 when I try to create a SQL Database from Visual Web Developer 2005 Express Edition, I get the following error message: "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL http://go.microsoft.com/fwlink/?LinkID=49251" When I go to that URL, it brings me to the page to download SQL Server Express 2005. any ideathanks for advance  Did you install SQL Server Express on your server/system? JeffPlease: Don't forget to click "Mark as Answe...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi (and HELP!),   I downloaded the Personal WebSite Starter Kit and got it working no problem on my local machine.  But I've had nothing but frustration trying to get it up and running on a webhosting site.  I picked hostmysite.com which uses SQL Server 2005.  I was under the impression that it wouldn't be that big a deal to convert the .MDF files that Sql Server Express uses to a SQL Server 2005 database.  I tried using SQL Server Management Studio Express.  I was able to "see" my remote database on hostmysite.com, but I was not able to import the .mdf files ...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi,Basically i built a webpage with Login and it's working well from my local machine.Right now, i'm using Database Publishing Wizard. the problem is how do i convert.MDF files to .SQL 2005 to get my database publish in the internet? thanks  Place your .MDF file in the App_Data directory, change the connection string accordingly and then publish your web site. ----------------------------------------------------------Please click Mark As Answer if this helped in solving your problem.  Please click "Mark As Answer" if this hepled in solving your problem. ...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi (and HELP!),   I downloaded the Personal WebSite Starter Kit and got it working no problem on my local machine.  But I've had nothing but frustration trying to get it up and running on a webhosting site.  I picked hostmysite.com which uses SQL Server 2005.  I was under the impression that it wouldn't be that big a deal to convert the .MDF files that Sql Server Express uses to a SQL Server 2005 database.  I tried using SQL Server Management Studio Express.  I was able to "see" my remote database on hostmysite.com, but I was not able to import the .mdf file...

Importing SQL script to the server database using SQL Management Studio
How do i import an sql script to the server using sql management studio? Can someone advise?  I'm not sure I understand your question. Are you trying to create a stored procedure?Please mark the post(s) that have helped you as "Answer"I'm better at brewing beer than crafting code but I have to do the latter to do the former. Will code for malt. Hi, Do you want to open and execute the “.sql” file in SQL Server Management Studio?If I have misunderstood, please let me know. In the SQL Server Management Studio, click File -> Open -> File…, choose the “.sql” fi...

creating ssis packagte for sql server to sql serer using C#.net
Hi friendsdoes any one has code or urls which can help me to create the ssis pacakage which will transfer data from sql server to sql server databaseswith some manipulationsthanks so much Lad LaxmikantPune You are probably in the wrong forum.  This forum is for questions relating to ASP.NET Dynamic Data. thanks,David...

Creating a SQL Server linked server to Interbase using 64 bit SQL Server
Hi, I am trying to use the data direct odbc driver for interbase to create a linked server in SQL Server 2008 R2 64bit however, SQL Server reports an "Arcitechure Mismatch" between the System DSN and SQL Server. This did work under 32 bit SQL Server. Is there a 64bit specific odbc driver for interbase? I have tried using the IBProvider trial as well but this fails to work in SQL Server as well. Our Interbase client(s) and server are all 64 bit installations. Thank you Julian Dawson wrote: > Is there a 64bit specific odbc driver for interbase? I think Easy...

Using SQL to create a SQL script
I have a table containing table names and I want to create a SQL file using SQL select statement as below to cycle through the target table and create a file for example: select 'drop table '||table_name||'' from test_table where table_name like "test%" This will produce something like : drop table test_01 drop table test_01 etc. in the output file And the problem is ... what? I'm guessing that you want "go" interspersed throughout. So add on an identity column as you "select into", say, #temp1. Then "select text, (2...

Creating Personal Site Starter Kit w/ SQL Server 2000
I would like to be able to run the Personal Site against an existing SQL Server 2000.  I was able to configure the aspnetdb database fine using the existing tools, but I cannot find a tool to create and populate the required Personal database.  I also cannot attach the Personal.mdf file that came with the Personal Site because I think it's SQL 2005. Any ideas? I'm working to get .sql files packaged so you can create the DB's for Personal, Club, and Timetracker seperately. There is a gap in SQL 2005 Express now for hitting this scenario, we are working on it. Out of curiousit...

GENERAL SQL SERVER: Question about the Script that setups the SQL Server Database.
This is the first time I have created a script for Sql Server 2000, and I have run into a few syntax ereas that I am not familar with. Bellow is a section of the script from the Portal server packages. At the end of the sample, is "ON [PRIMARY], Can anyone explain to me what this does and why the primary key isnt setup inside the code itself? I am basically trying to take parts of the script and incorrporate it into my own script and hate added syntax that I dont understand, makes debugging a real pain in the future. CREATE TABLE [dbo].[Portal_Announcements] ( [ItemID] [in...

Can Personal Web Site Starter Kit be used with SQL Server 2000?
I have been trying to create a sample Personal Web Site using the Starter Kit.  In my previous attempts, the Personal Web Site Starter Kit appeared to have run without error.  But when I press Ctl-F5 to view the result, I get the following error: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) SQL Server 2005 is no...

How to create a copy of SQL Server 2000 database in SQL Server 2005 Express?
I have a database called 'DB1' in SQL Server 2000. I want to create the same database in SQL Server 2005 Express including the original data in tables. How would I do that? I cannot find any option to do this upgrade in SQL Server Management Studio.sun21170 Check out this:How to: Upgrade to SQL Server 2005 with the Copy Database Wizard Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! The article you mentioned does not apply to the 2005 Express Edition. The Management Studio for the Express Edition contains no Copy database opti...

SQL Server instance Error
Hi Guys, I created a default website in VS2008 & dragged in a webpartmanager into the div section (i was going to have a play with creating web parts). I tried to preview the default page to seeif it runs but i get the following error: Server Error in '/WebSite1' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - E...

How to connect to Remote SQL Server database using SQL Server 2005 Express
Hi,I've an account with a hosting service provider online for SQL Server database. I've downloaded SQL Server 2005 Express from ASP.Net. How can I use it to connect to my SQL Server Database which is sitting on remote server? The hosting provider gave me following things to connect to the remote database.Server NameDatabase NameUser NamePasswordRegards,A.K.R    Anyone? I don't want to ask the obvious, but is there not a Read Me file included with the download of SQL Express which would explain how to connect? Sorry I can't be more helpful, but I've only ever briefly ...

Web resources about - Creating a database in SQL Server using an SQL Script - asp.net.personal-site-kit

Wikipedia:Creating a bot - Wikipedia, the free encyclopedia
It is often far simpler to request a bot job from an existing bot. If you have only periodic requests or are uncomfortable with programming languages, ...

U.K. Woman Faces 20 Months For Creating Fake Facebook Accounts, Sending Herself Abusive Messages
A woman in Cornwall in the U.K. came up with a creative way to use Facebook to accelerate a family spat, and it earned her 20 months in prison. ...

Sandi Krakowski’s Tips for Creating Great Content
Quick tips to help you create great content for your business.

Bug - Creating a Video.Watches Action stopped working - Facebook-Entwickler
Since today executing a POST on a me/video.wacthes endpoints no longer works, it was working around 10 hours ago since then the call always returns ...

Facebook simplifies process for creating repeat events
Facebook introduced a new feature for events this week that allows users to quickly create a similar event as one they previously hosted or attended. ...

The Obama campaign won by creating their own Facebook, with unique features for political campaigns.
... seen as too dangerous to nominate someone who is so thoroughly narcissistic, arrogant and dishonest. The Obama campaign won basically by creating ...

Creating A Road Map To Market Your Startup
Spreading the word can be challenging when you’re new to an industry, don’t have a big budget, and have little helpbut it’s possible.You’ll need ...

Dance Machine - The Fun Video Editor for Creating Music Videos to share on Instagram, Facebook, Vine ...
Get Dance Machine - The Fun Video Editor for Creating Music Videos to share on Instagram, Facebook, Vine, and Twitter on the App Store. See screenshots ...

Creating Economic Dynamism: Joseph E. Stiglitz
DAVOS/SWITZERLAND, 25JAN13 - Joseph E. Stiglitz, Professor, Columbia University, USA talks during the session 'Creating Economic Dynamism' at ...

YouTube - Super Human Abilities: Tila Tequila Creating Energy Balls & Electricity Out of Thin Air!
Veröffentlicht am 24.04.2013 Hey Guys! For a long time now I have been able to do some pretty supernatural things that most would consider "SUPER ...

Resources last updated: 11/24/2015 1:14:29 PM