Showing posts with label obvious. Show all posts
Showing posts with label obvious. Show all posts

Tuesday, March 27, 2012

Create table in schema in Managment Studio

Hi all, if I create a new schema:
CREATE SCHEMA MySchema
it appears in Sql Server Management Studio's schema, but it's not
obvious to me how to create a new table (or other object) under this
schema, without using the CREATE TABLE statement. How can I create a
new table under this schema using the designed in Managment Studio?
This is Sql Server 2005 (Standard Edition) I'm using.
Thanks!
RichardHello, Richard
When you create a new table using Management Studio, choose "View /
Properties Window" (or press F4) and select the desired schema in the
combo for the "Schema" property (under the "(Identity)" category).
Razvan

Tuesday, February 14, 2012

CREATE DATABASE errors

I am creating my first database using T SQL. I am working form a book and have checked for typos and any other things that may be obvious. I got this directory path

from the address bar where these files are stored. I copied and pasted this to avoid typos.

I get a couple errors when I execute my script. Here is the code that I am using.

CREATE DATABASE Accounting

ON

(NAME = 'Accounting',

FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\

Data\AccountingData.mdf',

SIZE = 10,

MAXSIZE = 50,

FILEGROWTH = 5)

LOG ON

(NAME = 'AccountingLog',

FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\

Data\AccountingLog.ldf',

SIZE = 5MB,

MAXSIZE = 25MB,

FILEGROWTH = 5MB)

GO

These are the errors that I got.

Please help,

Thanks

Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL Data\AccountingData.mdf" failed with the operating system error 123(The filename, directory name, or volume label syntax is incorrect.).

Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

This post is identical to the post you made on Jul 1, located here.

A suggest was supplied then, have you tried it?

|||

Thanks, I just tried it. I also found a typo in the name for the "Accounting.mdf" file. I had "Accouting.mdf" on accident. I think that since I didn't have the typo before that your solution was what fixed it. I am working out of a book that basically shows the same thing. It's strange that it wouldn't work. I guess that is a by product of trying to get it to fit onto the page.

-Thanks for the help

CREATE DATABASE errors

I am creating my first database using T SQL. I am working form a book and have checked for typos and any other things that may be obvious. I got this directory path

from the address bar where these files are stored. I copied and pasted this to avoid typos.

I get a couple errors when I execute my script. Here is the code that I am using.

CREATE DATABASE Accounting

ON

(NAME = 'Accounting',

FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\

Data\AccountingData.mdf',

SIZE = 10,

MAXSIZE = 50,

FILEGROWTH = 5)

LOG ON

(NAME = 'AccountingLog',

FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\

Data\AccountingLog.ldf',

SIZE = 5MB,

MAXSIZE = 25MB,

FILEGROWTH = 5MB)

GO

These are the errors that I got.

Please help,

Thanks

Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL Data\AccountingData.mdf" failed with the operating system error 123(The filename, directory name, or volume label syntax is incorrect.).

Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

This post is identical to the post you made on Jul 1, located here.

A suggest was supplied then, have you tried it?

|||

Thanks, I just tried it. I also found a typo in the name for the "Accounting.mdf" file. I had "Accouting.mdf" on accident. I think that since I didn't have the typo before that your solution was what fixed it. I am working out of a book that basically shows the same thing. It's strange that it wouldn't work. I guess that is a by product of trying to get it to fit onto the page.

-Thanks for the help