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

Friday, March 30, 2012

newbie question describing tables

How can I print the structure of a table from Enterprise Manager?
Or is there another app that has a print option?"MacKenzieMouse" <no-spamkeyconc@.yahoo.com> wrote in message
news:JrmdnX6w396rZ2XcRVn-1w@.comcast.com...
> How can I print the structure of a table from Enterprise Manager?
> Or is there another app that has a print option?

You can create and print database diagrams in EM (right-click Diagrams, New
Diagram), or if you use a third-party data modelling tool (Erwin,
Embarcadero etc.) then it would be able to do the same thing. If the CREATE
TABLE script is good enough, then you can generate it in Query Analyzer
(right-click a table in the Object Browser), then print the resulting
script.

Simon|||To print the structure of a table from Query Analyzer just print the
ouput of EXEC sp_help 'table_name' or a query from the
information_schema.columns table.
--
David Portas
SQL Server MVP
--|||David Portas wrote:
> To print the structure of a table from Query Analyzer just print the
> ouput of EXEC sp_help 'table_name' or a query from the
> information_schema.columns table.
> --
> David Portas
> SQL Server MVP
> --

How do I print it ?
Is there any way to do that using the Query Analayzer ?|||Select the Text ouput option (CTRL+T), run the query, select the
Results tab then File/Print or CTRL+P.
--
David Portas
SQL Server MVP
--|||Works great! Thanks !|||MacKenzieMouse wrote:
> How can I print the structure of a table from Enterprise Manager?
> Or is there another app that has a print option?
Thanks to all that helped!sql

Wednesday, March 28, 2012

Newbie question : SQL Admin on Windows server 2003 small business edition.

I have noticed that although SQL server is packaged as part of windows 2003
server it does not include enterprise manager. How am i supposed to be able
to administor anythig, i thought i had seen an app mentioned that did it via
a web console but cannot find such an app.
I am trying to connect to my own SQL server and cannot, someone else has
tried to access it via their enterprise manager but they require a username
/ password, i have tried every password i can imagine that has been used for
the setup of the server, is there any way i can reset the pass or check what
it is?
As it's our server i have full admin rights on it.
Many thanks,
Moss
Assuming you mean SBS 2003 premium, did you select to install SQL Server in
the setup? Check under program files for Microsoft SQL Server directory. I
don't believe it installs automatically...
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"Moss" <koop@.o2.co.nsm> wrote in message
news:%23fn5$veWEHA.2340@.TK2MSFTNGP09.phx.gbl...
> I have noticed that although SQL server is packaged as part of windows
2003
> server it does not include enterprise manager. How am i supposed to be
able
> to administor anythig, i thought i had seen an app mentioned that did it
via
> a web console but cannot find such an app.
> I am trying to connect to my own SQL server and cannot, someone else has
> tried to access it via their enterprise manager but they require a
username
> / password, i have tried every password i can imagine that has been used
for
> the setup of the server, is there any way i can reset the pass or check
what
> it is?
> As it's our server i have full admin rights on it.
> Many thanks,
> Moss
>
sql

Wednesday, March 21, 2012

Newbie Question

Hi
I simply want to automate the backup of the database every hour using the
Enterprise Manager
Thank you,
Shmuel ShulmanUse "Database Maintenance Plan Wizard".
"SQL Server 2000 Administrator's Pocket Consultant: Database Automation and
Maintenance"
http://www.microsoft.com/technet/prodtechnol/sql/2000/books/c12ppcsq.mspx
"Automate database upkeep with the SQL Server Maintenance Plan Wizard"
http://techrepublic.com.com/5100-6268_11-1043672.html
Cristian Lefter, SQL Server MVP
"S Shulman" <smshulman@.hotmail.com> wrote in message
news:%234sWEVsOFHA.1176@.TK2MSFTNGP12.phx.gbl...
> Hi
> I simply want to automate the backup of the database every hour using the
> Enterprise Manager
> Thank you,
> Shmuel Shulman
>|||Steps:-
Hi,
Use the maintenance Plan wizard from enterprise manager to scdule a database
backup every one hour.
1. Open Enterprise manager and connect to server
2. Go to Managaement option
3. Select Database maintenance plans
4. Right click and select the new maintenenace plan
5. Select the database
6. Go further by clicking next
7. You couild see the Backup option, retension days...
8. schedule the maintenance plan and give a suitable name
Note:
You can also scdule by writing a backup script using Backup database command
and scheule using SQL Agent... Jobs..
Thanks
Hari
SQL Server MVP
"S Shulman" wrote:
> Hi
> I simply want to automate the backup of the database every hour using the
> Enterprise Manager
> Thank you,
> Shmuel Shulman
>
>sql

Monday, March 19, 2012

NEWBIE Needs Help automating data from another server

Hi,

I am able to do these actions interactively from SQL 2005 (not developers nor enterprise edition, just using SQL 2005 Mgmt Studio) and want to "script/batch" them so I can have them automatically run at a pre selected time.

First: I am able to delete the table by performing a right click on the table, then click Delete from Mgmt Studio SQL 2005. I verify the table is completely gone with a refresh. (I pulled the code that did this ..... DROP TABLE etc. to Notepad)

2nd: I am able to import the table (again from Mgmt Studio SQL 2005) and have saved this action as a SSIS. Execute the script and "waLa" I have all 17K rows of data. I pulled this create table code into notepad also.

Now I put the code of both of the above actions together (drop table and create table) into one SQL query and execute it. This does not give me the same results of above, instead my table is blank now.

Maybe there is a better way. The business problem I am attempting to solve: I am refreshing the data in a as/400 table weekly. I want that refreshed data to be available in the SQL2005 database without my having to press buttons first thing Monday morning. Can any one help? Thanks in advance.

Below is the Code:

USE [400kas]
GO
/****** Object: Table [dbo].[navar100] Script Date: 09/07/2007 16:09:04 ******/
DROP TABLE [dbo].[navar100]
GO


USE [400kas]
GO
/****** Object: Table [dbo].[Query] Script Date: 09/07/2007 16:12:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[navar100](
[CMPNO] [decimal](3, 0) NOT NULL,
[ARTDT] [datetime] NOT NULL,
[AUDDT] [datetime] NOT NULL,
[ARDDT] [datetime] NOT NULL,
[CCUS#] [decimal](6, 0) NOT NULL,
[CCNAM] [nvarchar](25) NOT NULL,
[CUSNO] [decimal](6, 0) NOT NULL,
[CNAME] [nvarchar](25) NOT NULL,
[SHPNO] [decimal](4, 0) NOT NULL,
[ARRCD] [nvarchar](1) NOT NULL,
[AUDUS] [nvarchar](10) NOT NULL,
[INVNO] [decimal](6, 0) NOT NULL,
[CUSPO] [nvarchar](15) NOT NULL,
[REFNO] [decimal](6, 0) NOT NULL,
[COMNT] [nvarchar](10) NOT NULL,
[SHPPO] [nvarchar](15) NOT NULL,
[AMONT] [decimal](13, 2) NOT NULL,
[AMOUNT] [decimal](24, 8) NOT NULL,
[REMAN] [decimal](13, 2) NOT NULL,
[INREG] [decimal](3, 0) NOT NULL,
[INSAL] [decimal](3, 0) NOT NULL,
[TMCOD] [nvarchar](2) NOT NULL,
[CRHLD] [nvarchar](1) NOT NULL,
[CRLIM] [decimal](13, 0) NOT NULL,
[CRDAY] [decimal](3, 0) NOT NULL,
[TCRCD] [nvarchar](3) NOT NULL,
[TEXRT] [decimal](11, 6) NOT NULL,
[R1RGL] [decimal](13, 2) NOT NULL,
[TAXAM] [decimal](13, 2) NOT NULL,
[TFRTX] [decimal](13, 3) NOT NULL,
[TFRGT] [decimal](13, 2) NOT NULL,
[TSPCH] [decimal](13, 2) NOT NULL,
[SPCST] [decimal](13, 2) NOT NULL,
[IRPFT] [decimal](13, 2) NOT NULL
) ON [PRIMARY]

Instead of dropping and recreating the table, you can just truncate it.

e.g.

Code Snippet

truncate table [400kas];

|||

1) create an ssis package that pulls the the data from the as400 to your table

-execute sql task- truncate table <tableName>

-data flow task to pull data from source to target

2)create a sql server agent job that executes the package, and runs at the time you'd like (ex. everyday at 7am)

Friday, March 9, 2012

Newbie Can't See tables of DB in Enterprise Manager

Hello,
I'm trying to view the tables of a db on a SQL7 server, but cannot. I used
to be able to... The view says "Tables 289 Items" but then also says "There
are no items to show in this view" where the tables are normally listed.
Any ideas why?
Thanks,
IvanHi,
From Query Analyzer , execute the below code to get the table details.
Use <dbname>
go
sp_tables
Thanks
Hari
MCDBA
"Ivan Starr" <ivan@.ivanstarr.com> wrote in message
news:e5I$D1OPEHA.2920@.tk2msftngp13.phx.gbl...
> Hello,
> I'm trying to view the tables of a db on a SQL7 server, but cannot. I
used
> to be able to... The view says "Tables 289 Items" but then also says
"There
> are no items to show in this view" where the tables are normally listed.
> Any ideas why?
> Thanks,
> Ivan
>

Monday, February 20, 2012

Newb: Managing multiple queries

I am currently using enterprise manager to run multiple queries on a
single table in a DB. I refresh these queries every few minutes. Due
to the huge number of them I was looking for a better way (or should I
just say "a way") to manage/save these queries so I can recall them
easier/faster for monitoring purposes. Suggestions?

TIA.Hi,

Maybe creating a stored procedure (or more, if the queries are logically
grouped) will help you. Then you would need just to execute the stored
procedures in Query Analyzer (which is the tool intended to run queries
anyway). Alternatively you can save the queries to a script file, and then
open and run in Query Analyzer.

HTH,

Plamen Ratchev
http://www.SQLStudio.com|||On Thu, 6 Dec 2007 10:38:06 -0800 (PST), Akhenaten
<jonkokko@.gmail.comwrote:

If I understand you correctly you need an application (Access ADP, or
..NET) to call your queries based on a timer or a button click. SQL
Server tools alone are probably not going to do the trick.

-Tom.

Quote:

Originally Posted by

>I am currently using enterprise manager to run multiple queries on a
>single table in a DB. I refresh these queries every few minutes. Due
>to the huge number of them I was looking for a better way (or should I
>just say "a way") to manage/save these queries so I can recall them
>easier/faster for monitoring purposes. Suggestions?
>
>TIA.

|||On Dec 6, 10:45 pm, "Plamen Ratchev" <Pla...@.SQLStudio.comwrote:

Quote:

Originally Posted by

Hi,
>
Maybe creating a stored procedure (or more, if the queries are logically
grouped) will help you. Then you would need just to execute the stored
procedures in Query Analyzer (which is the tool intended to run queries
anyway). Alternatively you can save the queries to a script file, and then
open and run in Query Analyzer.
>
HTH,
>
Plamen Ratchevhttp://www.SQLStudio.com


Are there examples of "script files"? I have a few files that are used
for creating databases and tables, but somehow I think there is more
potential in using scripts.

Thanks|||Under "script files" I meant to save your frequently used SQL code to a
file, preferably with extension ".sql". Since you indicate you already save
your code to files, then you have your script files.

In SQL Server 2005, the SQL Server Management Studio adds a new capability
to organize scripts in projects (very similar to Visual Studio projects). It
is accessible via the File menu in SSMS (File -New - Project -SQL
Server Scripts template).

Script files are good because they can be easily added to a source control
system.

HTH,

Plamen Ratchev
http://www.SQLStudio.com