Showing posts with label enterprise. Show all posts
Showing posts with label enterprise. Show all posts

Wednesday, March 28, 2012

How to create new database in sql server 2005

Hello Friends,
I am using sql server 2005 and cant find a way to create and / or view databases.
In sql server 2000, there was enterprise manager to display sql registrations and connections.. How sql server 2005 differs from it.
Please help me.

If you are using SQL Server 2005 Express, you have noticed that it does not install any client tools, such as 'EnterPrise Mangler'.

For SQL Server 2005 Express, you can download SQL Server Management Studio Express from here. (SSMS is the replacement for Enterprise Manager.)

Monday, March 26, 2012

How to create database from script file?

Hi
I use SQLServer 2000 with SP3
I have script file that has been created using "generate SQL script"
command from SQL server Enterprise manager.
But I can't find how to create database using this script file. Is there
any way to create database from script file?
I appreciate your help!Copy the script to the clipboard during the "generate sql script" command.
Start the query analyzer and past the script
Run the script.
(You could also save the script and open it in the query analyzer)
Nico De Greef
Belgium
Freelance Software Architect
MCP, MCSD, .NET certified
"JK" <invalid@.address> wrote in message
news:e0JzX2Q$DHA.808@.TK2MSFTNGP12.phx.gbl...
> Hi
> I use SQLServer 2000 with SP3
> I have script file that has been created using "generate SQL script"
> command from SQL server Enterprise manager.
> But I can't find how to create database using this script file. Is there
> any way to create database from script file?
>
> I appreciate your help!
>|||In the Options tab of generate script, you have the option to "Script
Database". This will include the CREATE DATABASE statement.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"JK" <invalid@.address> wrote in message
news:e0JzX2Q$DHA.808@.TK2MSFTNGP12.phx.gbl...
> Hi
> I use SQLServer 2000 with SP3
> I have script file that has been created using "generate SQL script"
> command from SQL server Enterprise manager.
> But I can't find how to create database using this script file. Is there
> any way to create database from script file?
>
> I appreciate your help!
>sql

Friday, March 23, 2012

How to create database from script file?

Hi
I use SQLServer 2000 with SP3
I have script file that has been created using "generate SQL script"
command from SQL server Enterprise manager.
But I can't find how to create database using this script file. Is there
any way to create database from script file?
I appreciate your help!check out www.dbghost.com
>--Original Message--
>Hi
>I use SQLServer 2000 with SP3
>I have script file that has been created using "generate
SQL script"
>command from SQL server Enterprise manager.
>But I can't find how to create database using this
script file. Is there
>any way to create database from script file?
>
>I appreciate your help!
>
>.
>|||Copy the script to the clipboard during the "generate sql script" command.
Start the query analyzer and past the script
Run the script.
(You could also save the script and open it in the query analyzer)
--
Nico De Greef
Belgium
Freelance Software Architect
MCP, MCSD, .NET certified
"JK" <invalid@.address> wrote in message
news:e0JzX2Q$DHA.808@.TK2MSFTNGP12.phx.gbl...
> Hi
> I use SQLServer 2000 with SP3
> I have script file that has been created using "generate SQL script"
> command from SQL server Enterprise manager.
> But I can't find how to create database using this script file. Is there
> any way to create database from script file?
>
> I appreciate your help!
>|||In the Options tab of generate script, you have the option to "Script
Database". This will include the CREATE DATABASE statement.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"JK" <invalid@.address> wrote in message
news:e0JzX2Q$DHA.808@.TK2MSFTNGP12.phx.gbl...
> Hi
> I use SQLServer 2000 with SP3
> I have script file that has been created using "generate SQL script"
> command from SQL server Enterprise manager.
> But I can't find how to create database using this script file. Is there
> any way to create database from script file?
>
> I appreciate your help!
>

Monday, March 19, 2012

how to create a partitioned table?

Hi,

How to create a partitioned table(not view) in enterprise manager and T-SQL?

Thanks,

It sounds like you're talking about SQL2000. In SQL2000, the only way you can do it is to have multiple tables and a view which makes it look like a single one.

In SQL2005, sure... the standard example is:

CREATE PARTITION FUNCTION myRangePF1 (int)
AS RANGE LEFT FOR VALUES (1, 100, 1000) ;
GO
CREATE PARTITION SCHEME myRangePS1
AS PARTITION myRangePF1
TO (test1fg, test2fg, test3fg, test4fg) ;
GO
CREATE TABLE PartitionTable (col1 int, col2 char(10))
ON myRangePS1 (col1) ;
GO

Hope this helps...

Rob

Monday, March 12, 2012

How to create a new SQL account that just has rights to a specific database?

Gurus,
You know how in SQL Enterprise Manager you click on Databases node and see
all the databases? And that the SA account has full access to all of these?
Well, if, from here on out, I wanted to create a database that beside the SA
account had a separate account that had public and DB owner rights on it,
how would I create such a SQL account? I guess what I am asking is how to
create new SQL accounts.
--
SpinHi
Check out the topic "Managing Security" in Books Online. To add a login to
your server see sp_grantlogin. To grant access to a database use
sp_grantdbaccess, to add users to a role see sp_addrolemember.
John
"Spin" wrote:
> Gurus,
> You know how in SQL Enterprise Manager you click on Databases node and see
> all the databases? And that the SA account has full access to all of these?
> Well, if, from here on out, I wanted to create a database that beside the SA
> account had a separate account that had public and DB owner rights on it,
> how would I create such a SQL account? I guess what I am asking is how to
> create new SQL accounts.
> --
> Spin
>
>|||Can this be done via the GUI?
--
Spin
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7783F616-4217-43D6-845A-B111A1DA042C@.microsoft.com...
> Hi
> Check out the topic "Managing Security" in Books Online. To add a login to
> your server see sp_grantlogin. To grant access to a database use
> sp_grantdbaccess, to add users to a role see sp_addrolemember.
> John
> "Spin" wrote:
>> Gurus,
>> You know how in SQL Enterprise Manager you click on Databases node and
>> see
>> all the databases? And that the SA account has full access to all of
>> these?
>> Well, if, from here on out, I wanted to create a database that beside the
>> SA
>> account had a separate account that had public and DB owner rights on it,
>> how would I create such a SQL account? I guess what I am asking is how
>> to
>> create new SQL accounts.
>> --
>> Spin
>>|||You first need to create a login for the account and then define the
account in the database. The general steps (In Enterprise Manager) are:
1) Expand the nodes on the left hand side of the console until you find
your SQL Server instance (e.g. \\CompName\InstanceName)
2) Expand the node for the instance & you should see a sub-node called
"Security". Expand the "Security" node and you should see a "Logins"
sub-node
3) Right click on the "Logins" node and select "New Login..." After
doing this the "New Login" window will appear
4) In the "New Login" window type in the name of the server login,
select the authentication type and set the default database (you
shouldn't need to worry about the default language)
5) Inthe "New Login" window, click on the "Database Access" tab to
bring up a list of databases on the server
6) Check the "Permit" text box next to the database you want to give
access to. A name for the user (same as the server login defined
previously) will appear next to the database name...Generally no need
to change this
NOTE: By default the server login will have access to a database on the
server IF the database has the "guest" account in it. If there is no
guest account then you need to explicitly give access as I've detailed
just now.
7) You'll notice in the bottom of the window that there is a list of
database roles. Your user will be in the "Public" role by default.
Select whatever roles are necessary.
8) That should be about it. Click OK to complete the process.
After doing the above steps you will have a server login that people
can use. This will have access to the database(s) you granted access to
in Step (6) with an access level as per the permissions you granted in
Step (7).
Hope that helps a little.|||That's great. With those steps, I do not need to go through the process of
sp_grantlogin, sp_grantdbaccess, and sp_addrolemember I take it?
Spin
<nate.vu@.gmail.com> wrote in message
news:1146956260.908362.69190@.i40g2000cwc.googlegroups.com...
> You first need to create a login for the account and then define the
> account in the database. The general steps (In Enterprise Manager) are:
> 1) Expand the nodes on the left hand side of the console until you find
> your SQL Server instance (e.g. \\CompName\InstanceName)
> 2) Expand the node for the instance & you should see a sub-node called
> "Security". Expand the "Security" node and you should see a "Logins"
> sub-node
> 3) Right click on the "Logins" node and select "New Login..." After
> doing this the "New Login" window will appear
> 4) In the "New Login" window type in the name of the server login,
> select the authentication type and set the default database (you
> shouldn't need to worry about the default language)
> 5) Inthe "New Login" window, click on the "Database Access" tab to
> bring up a list of databases on the server
> 6) Check the "Permit" text box next to the database you want to give
> access to. A name for the user (same as the server login defined
> previously) will appear next to the database name...Generally no need
> to change this
> NOTE: By default the server login will have access to a database on the
> server IF the database has the "guest" account in it. If there is no
> guest account then you need to explicitly give access as I've detailed
> just now.
> 7) You'll notice in the bottom of the window that there is a list of
> database roles. Your user will be in the "Public" role by default.
> Select whatever roles are necessary.
> 8) That should be about it. Click OK to complete the process.
> After doing the above steps you will have a server login that people
> can use. This will have access to the database(s) you granted access to
> in Step (6) with an access level as per the permissions you granted in
> Step (7).
> Hope that helps a little.
>|||Yes, that's correct...The above steps are for the GUI (Enterprise
Manager if you're on SQL Server 2000). Calling the stored procs is the
equivalent way of doing it by using T-SQL statements and using
something like Query Analyzer to execute them.
Both methods will achieve the same results.
Hope that helps a little.|||Hi
If you need to do this regularly then it will be a lot quicker if you use a
script and query analyser. The section on managing security in Books Online
will give you background information as well as tell you the different ways
of carrying out these activities this includes how to use Enterprise Manager.
John
"Spin" wrote:
> That's great. With those steps, I do not need to go through the process of
> sp_grantlogin, sp_grantdbaccess, and sp_addrolemember I take it?
>
> --
> Spin
>
> <nate.vu@.gmail.com> wrote in message
> news:1146956260.908362.69190@.i40g2000cwc.googlegroups.com...
> > You first need to create a login for the account and then define the
> > account in the database. The general steps (In Enterprise Manager) are:
> >
> > 1) Expand the nodes on the left hand side of the console until you find
> > your SQL Server instance (e.g. \\CompName\InstanceName)
> >
> > 2) Expand the node for the instance & you should see a sub-node called
> > "Security". Expand the "Security" node and you should see a "Logins"
> > sub-node
> >
> > 3) Right click on the "Logins" node and select "New Login..." After
> > doing this the "New Login" window will appear
> >
> > 4) In the "New Login" window type in the name of the server login,
> > select the authentication type and set the default database (you
> > shouldn't need to worry about the default language)
> >
> > 5) Inthe "New Login" window, click on the "Database Access" tab to
> > bring up a list of databases on the server
> >
> > 6) Check the "Permit" text box next to the database you want to give
> > access to. A name for the user (same as the server login defined
> > previously) will appear next to the database name...Generally no need
> > to change this
> >
> > NOTE: By default the server login will have access to a database on the
> > server IF the database has the "guest" account in it. If there is no
> > guest account then you need to explicitly give access as I've detailed
> > just now.
> >
> > 7) You'll notice in the bottom of the window that there is a list of
> > database roles. Your user will be in the "Public" role by default.
> > Select whatever roles are necessary.
> >
> > 8) That should be about it. Click OK to complete the process.
> >
> > After doing the above steps you will have a server login that people
> > can use. This will have access to the database(s) you granted access to
> > in Step (6) with an access level as per the permissions you granted in
> > Step (7).
> >
> > Hope that helps a little.
> >
>
>

Wednesday, March 7, 2012

How to creat a first DB?

Hello all,

I've Installed VS2005 and MSSQL express with it. I used to work with mssql 2003 enterprise edition where it had "Enterprise Manager" from which I could create and modify my Databases.

How do I creat a new database with MSSQL express?

I've tried to do this via visual studio 2005 "server explorer". I"m entering the "Create new SQL Server Database" dialog, I select my server's name and my new database name and I recive an error message which says "An error has occurred while estabilishing a connection to the server" and it also says that

"When connecting to SQL server 2005, this failure may be caused by the fact that under the defult settings SQL sever does not allow remote connections".

How do configure my MSSQL express to allow the remote connection?

Thanks in advance!

With the new SQL 2005 systems you need to use the new Management Studio to perform the same tasks as the Older Enterprise Manager and Query tools. With the full versions this is included, for the basic express product you can get a smaller version from the Microsoft Downloads site, Called SQL Management Studio Express.

In the case of remote connections have a look at this support article... http://support.microsoft.com/default.aspx/kb/914277

|||

How to configure SQL Server 2005 to allow remote connections

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

|||Thanks a lot guys :)|||


Hi,

also have a look at the screencast section on my site, which will show you a walkthrough for your problem.


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Friday, February 24, 2012

how to correctly finding memory usage.

i have a box running very slow. it has 16 gb of ram, running
a SQL 2005 Enterprise Edition (64-bit), build 9.00.3161.00, SP2 on
a win2003 R2 enterprise x64 with SP2.
during the non-busy hours, Task Manager shows 4-50 KB ram available. what
is the right way to free up the memory? is there a way to see what are the
resources not released? (like top or ps -ef |grep....)
tried the neat Activity Monitor, nothing shows where the 15 gb are used.
thanks.You need to ensure that the max memory option of sql server is set to leave
memory for the OS and any other apps that may run on the server. With 16GB
total I would recommend setting it to 14GB and see how that goes. You can
set this via sp_configure or SSMS.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:FD5F89D0-9942-4BB1-A08C-D87516983F85@.microsoft.com...
>i have a box running very slow. it has 16 gb of ram, running
> a SQL 2005 Enterprise Edition (64-bit), build 9.00.3161.00, SP2 on
> a win2003 R2 enterprise x64 with SP2.
> during the non-busy hours, Task Manager shows 4-50 KB ram available.
> what
> is the right way to free up the memory? is there a way to see what are
> the
> resources not released? (like top or ps -ef |grep....)
> tried the neat Activity Monitor, nothing shows where the 15 gb are used.
> thanks.|||setting the max memory is great.
how will i know what will be occupying the 14 GB?|||That 14GB will be used by the buffer pool of the instance. For the
distribution of the buffer pool buffers, I find DBCC MEMORYSTATUS handy.
Linchi
"light_wt" wrote:
> setting the max memory is great.
> how will i know what will be occupying the 14 GB?
>|||wow...
thank you so much Linchi. that command is so cool.
i've g* and played with it a bit. it pulls very useful info.
just wondering here, if i want to pin point to see if certain BI things
(such as: cubes, proc, partition, aggregation, and etc) is the casue of the
memory issue. will there be a way to zoom in/ narrow down the issue?
afterall, the box is a sql05 for data mining...
Thanks.|||The memory will all be used by SQL Servers buffer pool. To see how that is
broken down have a look at the sys.dm_os_buffer_descriptors DMV in
BooksOnLine.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:790A960F-9625-447C-A09E-A1818101F1FD@.microsoft.com...
> setting the max memory is great.
> how will i know what will be occupying the 14 GB?
>

How to copy..........

I have 2 files with its same name (at folder C:\a\ and C:\b\, both Name
files is SData.mdf). I wanna access the files in enterprise manager at the
time. Can I do it? Because I wanna copy a object (table, store procedure,
etc) from C:\a\Sdata.mdf to C:\b\Sdata.mdf.
How to do it efficiently?Hi
You cannot 'access/open' them . Its data files SQL Server used for. RESTORE
DATABASE with a different names and make your copies
"Bpk. Adi Wira Kusuma" <adi_wira_kusuma@.yahoo.com.sg> wrote in message
news:eLt2paOTGHA.4384@.tk2msftngp13.phx.gbl...
>I have 2 files with its same name (at folder C:\a\ and C:\b\, both Name
> files is SData.mdf). I wanna access the files in enterprise manager at the
> time. Can I do it? Because I wanna copy a object (table, store procedure,
> etc) from C:\a\Sdata.mdf to C:\b\Sdata.mdf.
> How to do it efficiently?
>

Sunday, February 19, 2012

How to copy full txt catalogs from one db to another

How can yu copy full txt catalogs from one db to another.
I have tried to go the live db through enterprise manager,
right clicked, then generated a script, went to the
otpions and checked the indexes and saved the script. When
i tried to run that script in the new db, no catalogs are
showing. Is there anything i am doing wrong.Naz,
INF: How to Move, Copy, and Back Up Full-Text Catalog Folders and Files
http://www.support.microsoft.com/?id=240867
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Naz" <milnaz@.hotmail.com> wrote in message
news:44b501c37c6e$c49d0f20$a501280a@.phx.gbl...
> How can yu copy full txt catalogs from one db to another.
> I have tried to go the live db through enterprise manager,
> right clicked, then generated a script, went to the
> otpions and checked the indexes and saved the script. When
> i tried to run that script in the new db, no catalogs are
> showing. Is there anything i am doing wrong.

how to copy design of table

i want to create a new table with the existing design of any another table without copying the data of that table in query analyzer not by enterprise managerselect *
into newtable
from anyanothertable
where 1=0:)|||Be aware that Rudy's technique, while fast, will not copy indexes, triggers, or constraints, or identities.|||is this homework?

You seem to know how to script a table in EM, so why not?|||I would just create a script file for the table and it's indexes, etc. and run it in the new server/database. I would do this creation of the script by right-clicking on "all tasks" -> "generate SQL script" in EM. I would create the script that way because I am too lazy to write it by hand/BOL lookups.|||Hi,
we can get the exact schema of procedures, triggers using sp_helptext [object name] but to get the schema of the existing table we cant use sp_helptext. so you can use the procedure mentioned in the below link to know the DDL of the current table.

http://www.koders.com/sql/fid7D3195CD2CA27581E1073314FF58005D2DA4E82B.aspx?s =datediff

Ex:
The name of the procedure used is sp__revtable
sp__revtable [table_name] will give schema of the table. By using it, you can create the schema for the new table|||thanks i got it|||Hi,
we can get the exact schema of procedures, triggers using sp_helptext [object name] but to get the schema of the existing table we cant use sp_helptext. so you can use the procedure mentioned in the below link to know the DDL of the current table.

http://www.koders.com/sql/fid7D3195CD2CA27581E1073314FF58005D2DA4E82B.aspx?s =datediff

Ex:
The name of the procedure used is sp__revtable
sp__revtable [table_name] will give schema of the table. By using it, you can create the schema for the new table

that proc is for sybase, not sql server. parts of it may work, probably not the whole thing, though.|||that proc is for sybase, not sql server. parts of it may work, probably not the whole thing, though.Oh gee, so you mean that I can't take a control computer from a Toyota and put it into a Lexus?

-PatP