Create Agent Job [closed] - sql

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
How to Create Agent Job In SQL Server

Follow the steps listed below:
Start SQL Server Agent Service from your ssms
Expand SQL Server Agent
Right Click on Job select New Job
Enter Your Job name and description
Select your database then Write your Procedure or Query in command
Select Scheduler and Schedule your job and set time when you want to run it
You can execute your job manually -right click on your job an dclick on Start Job at Step

Related

Auto Delete Of Data From Database After A Fixed Time Interval? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am using sql server 2005. In my project i wanna auto delete the data from the database after a fixed interval of time say (10 minutes); Is there any automatic process to delete the data from the database without the user intervention.. I want to use the event scheduler i have created a event scheduler but its not working any help ???
this is the event i have created.
CREATE EVENT deletedata
ON SCHEDULE
EVERY 10 MINUTE
DO
DELETE FROM user WHERE id=1
just go through the link Microsoft schedule Jobs
Expand the SQL Server Agent node and right click the Jobs node in SQL Server Agent and select 'New Job'
In the 'New Job' window enter the name of the job and a description on the 'General' tab.
Select 'Steps' on the left hand side of the window and click 'New' at the bottom.
In the 'Steps' window enter a step name and select the database you want the query to run against.
Paste in the T-SQL command you want to run into the Command window and click 'OK'.
Click on the 'Schedule' menu on the left of the New Job window and enter the schedule information (e.g. daily and a time).
Click 'OK' - and that should be it.

How to copy structure of database in another database in sql server 2008? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
i have a database and want to copy all the tables in new database without copying the dat of all those tables only structure should be copy
SQL Server Management Studio offers the following:
Scripting the whole database:
Under the Object Explorer, right mouse click on the database and then select Script Database as
To script just (specific) tables:
In Object Explorer, right mouse click on the database, select Tasks, then Generate Scripts, and then select the tables that you want.
You can then use the script to create a new database / new objects elsewhere. If you change the name of the database, remember to change the USE xxx statement(s) accordingly.
In SSMS for your first database right click on the datbaase name then "Script Database as" > "CREATE To" then choose your output location and run your script.
Edit:
Note you will need to amend the script to specify the new database name, replacing the existing one in the generated script (courtesy of Oded comment).
In the SQL server Management Studio you can right click the database -> tasks -> export data. Then follow the wizard..

Making SQL Server a Linked Server [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a production database off site on another box which I reference by IP. Lets say its IP:
123.45.67.89
Now I want to do a query that references both my server here locally called MYSERVER1 with my production server.
When I try to do:
select count(*) from [MYSERVER1].MyDBName.dbo.mytable;
everything is fine. But I can't do this:
select count(*) from [123.45.67.89].MyDBName.dbo.mytable;
Is there a way to link the servers? Like using sp_addLinkedServer?
I get this error:
Msg 7202, Level 11, State 2, Line 3
Could not find server '123.45.67.89' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
Any ideas? (I want to copy X number of rows to my production server, that's why)
In SQL Management Studio add your remote server: first connect to your local server, go to Server Objects\Linked Server in the Object Explorer and right click and add a new one.
BTW: you can also do it with system storedprocs, but it is something that you do only occasionally I would stay with the GUI.

Connect SharePoint and Microsoft Outlook [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm a newbie to Microsoft SharePoint Server 2010. Can you please help me with this assignment:
Users wish to enter through the Microsoft Outlook planned absence so
that they will enter them in the calendar, which they will access
directly from Outlook. After entering the predicted absence of the
absence of such a view is their superior, who must approve or reject
the absence. Different employees have different superiors, so pairs
should be "employees" -> "superior" entered into a separate table in
SharePoint, which can be edited by the administrator, workflow validation must
find the appropriate supervisor for confirmation/certification in this table. The
result (absence of confirmed / denied) must be sended an email to the employee,
while the superior must get get e-mail in CC.
It sounds like you have a calendar which is connected to outlook. When user adds new entry in outlook, that entry is added to the SharePoint calendar. In SharePoint you can start a workflow on Item Added on a calendar list. This workflow will do logic to kick of emails , approve/reject.

Error #1044 - Access denied for user 'root'#'localhost' to database 'information_schema' [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Alright, so here is the scenario
I performed a full backup on my mysql server today. Now when I try to import that .sql dump file, I get the error mentioned in the title and it does not load all the other databases.
How can I get around this so phymyadmin will allow me to import the whole file, or is there a way I could "remove" information_schema from the sql dump
Thanks
As Dan Grossman said:
To "remove" information_schema from the dump, open the file in notepad
and delete those lines. It's just a text file of sequential queries to
run.
Open information_schema and run
FLUSH TABLES
This should clear the information_schema CACHE and will stop the error as it "resyncs" the tables to the latest schema
I use a program called Notepad++.
You open your sql file and the program will put it in a way where you can clearly see what the information_schema database is trying to do and why it is failing every time. You can safely remove that part of the database.
Then I install a WAMP on my pc, run a mysql program (mysql front) and import the database. After importing I have full access to the tables and databases.
Just export what you want and then just import then to your new database.
CREATE a new database and then then try to connect using that new db then run the schema and then try to execute the databases.

Categories